Skip to content
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

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

severinbeauvais
Copy link
Collaborator

Issue #: bcgov/entity#19756

Description of changes:

  • 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)

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).

- updated some code comments
- on draft resume, update prepopulated data after the legal name is restored (as we may override it)
@severinbeauvais severinbeauvais self-assigned this Feb 16, 2024
@@ -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()
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

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)
}
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Feb 16, 2024

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.

@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

bcregistry-sre commented Feb 16, 2024

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 ;)

@severinbeauvais
Copy link
Collaborator Author

See ticket for Test Notes.

@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://business-create-dev--pr-659-hvz9hxbh.web.app

Copy link
Contributor

@PaulGarewal PaulGarewal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@severinbeauvais severinbeauvais merged commit cb96b26 into bcgov:main Feb 16, 2024
5 checks passed
JazzarKarim pushed a commit to JazzarKarim/business-create-ui that referenced this pull request Feb 23, 2024
* - 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants