This pull request is much larger than I normally like to make them, but that's because of inter-dependencies between its features: namely between the way signing in as an unregistered user will work, and the way those users are converted to registered users when they enlist.
It's 99% 100% ready to go. I just need to decide the best way to implement #234.
The main thing this pull request implements is the ability for applicants to create an enlistment record. The logic for that is copied from v2, including who's eligible to enlist, copying values from the discourse session, creating a new discourse topic, etc.
This pull request also makes the following changes:
Any discourse user can now sign in to the personnel application, even if they have no corresponding user record in the personnel database (members table). In the latter case, their discourse username is shown in the navbar where 'Pvt. Lastname' would be.
Several fields have on the enlistments table have been deprecated in favour of the equivalent fields in the associated user record (last_name, first_name, middle_name, steam_id, country_id) per #239. The forms for creating and editing enlistments update those values on the user model directly (two forms in one). The legacy fields on the enlistment table are automatically copied from the user table values for backwards compatibility.
Transferring an enlistment to another user has been moved to its own action button/page
This pull request is much larger than I normally like to make them, but that's because of inter-dependencies between its features: namely between the way signing in as an unregistered user will work, and the way those users are converted to registered users when they enlist.
It's
99%100% ready to go.I just need to decide the best way to implement #234.The main thing this pull request implements is the ability for applicants to create an enlistment record. The logic for that is copied from v2, including who's eligible to enlist, copying values from the discourse session, creating a new discourse topic, etc.
This pull request also makes the following changes:
FYI @swomma @conrad29th