-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
19756 Small change so prepopulated data overrides legal name #659
Conversation
- updated some code comments - on draft resume, update prepopulated data after the legal name is restored (as we may override it)
@@ -429,7 +429,7 @@ export default class AmalgamationMixin extends Vue { | |||
} | |||
|
|||
// set new resulting business name and legal type | |||
// and update resources (since legal type may have changed) | |||
// and update resources (since legal type may have changed) | |||
this.setNameRequestApprovedName(business.name) | |||
this.setEntityType(business.legalType) | |||
this.updateResources() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is updatePrepopulatedData()
and this code overrides the previous legal name and legal type. This is called when:
- a draft amalgamation is restored (see filing-template-mixin.ts below)
- the user marks a different business as holding/primary
- the user is submitting this filing (see Actions.vue above)
// If there's a holding or primary business, re-fetch its data and update the prepopulated data. | ||
// This will overwrite office addresses, directors and share structure. | ||
// This will overwrite office addresses, directors, share structure, legal name and legal type. | ||
if (holdingPrimary) await this.updatePrepopulatedData(holdingPrimary) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called when the user submits an amalgamation filing. This is to catch the scenario where the holding/primary business name or type has changed in the background while this amalgamation remained open.
// This will overwrite office addresses, directors, share structure, legal name and legal type | ||
// that were set above from draft data. | ||
if (holdingPrimary) await this.updatePrepopulatedData(holdingPrimary) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called when a draft amalgamation is restored. This is to catch the scenario where the holding/primary business name or type has changed in the background and then this amalgamation is resumed.
This block of code was simply moved down (in particular, below the name request code) as it may overwrite the legal name and legal type set above.
/gcbrun |
Temporary Url for review: https://business-create-dev--pr-659-hvz9hxbh.web.app SB says, feel free to test this, but you'll need several windows open: one (or 2) at the URL above (+ route/id for the amalgamation), another one for the holding/primary/TING whose name or type you'll change in the background, and maybe a window for the NR you'll use to change the name/type. Or, you can look at the ticket and see what I've already tested ;) |
See ticket for Test Notes. |
/gcbrun |
Temporary Url for review: https://business-create-dev--pr-659-hvz9hxbh.web.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* - app version = 5.9.4 - updated some code comments - on draft resume, update prepopulated data after the legal name is restored (as we may override it) * - deleted obsolete comment --------- Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
Issue #: bcgov/entity#19756
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).