12656: prepopulate applicant form on landuse-form from pas-form #886
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Pre-populate the applicants section on the Land Use Form from data that was saved on the Pas Form.
When the user loads the Land Use Form, they should see all the applicants that they previously entered on the Pas Form.
Task/Bug Number
Fixes AB#12656
Technical Explanation
When a user loads the landuse-form, we grab the
_dcp_project_value
from the current landuse-form. We use this value to find the pas-form that is associated with that project. We check for whether the applicants on the landuse-form have matching emails with those on the pas-form. If these are matching, we do not runcrmService.update
. If they do not match, then we usecrmService.update
to associate the applicant with the landuse-form using@odata.bind
. This should make these already-created applicants now show up on the landuse-form when the user loads the page.