Linking the Domain Model with the System User Details
The above shows the flow of the Employee Onboarding app that i am trying to build.After the user Registers and the log-in into the account he needs to fill the following forms one by one. The Domain model is given below: The Job portal asks the user to fill in the entity “job” and then comes the three sections Personal Details, Personal History and Uploads where the user fill the entity “General” for Basic Details and so on in the respective sections. What i want to achieve is: 1.Link all these Data to the login Credentials of the User(System.User) 2.Allow the User to fill these forms only once. 3.Once he fill up the forms and again tries to get back to the forms he should see the already filled up forms and an option to change his inputs How that i achieve these?
to link all this data with System.User you can simply create an association between the entity general and System.User and set it when you save.
3. to be sure the user will fill the data only one time and have an option to change his inputs, I think the best solution is adding a boolean attribute “isEditing” inside the entity and setting editability of the textboxs with that. You need to set the default to false in the beginning and change it when the user saves the first time.
When the user will press the button to change his inputs you need to change the boolean and the user will be able to write new data.