From 3b7998632e1b708e2279d3245e036e7b7b50eafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Beauvais?= Date: Tue, 16 Apr 2024 10:38:52 -0700 Subject: [PATCH] - app version = 5.9.11 (#674) - saved correct name option for other filings (not used but denotes code intent for future debugging/audit) - updated unit tests Co-authored-by: Severin Beauvais --- package-lock.json | 4 ++-- package.json | 2 +- src/mixins/filing-template-mixin.ts | 6 ++++++ tests/unit/Actions.spec.ts | 3 ++- tests/unit/filing-template-mixin.spec.ts | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 437a11d8e..40f391fb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.9.10", + "version": "5.9.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.9.10", + "version": "5.9.11", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index 1ffc23e34..4c9942b4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.9.10", + "version": "5.9.11", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index 3f1a3a520..8e2f95d87 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -384,6 +384,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM switch (this.getCorrectNameOption) { case CorrectNameOptions.CORRECT_AML_ADOPT: // save adopted name + // *** FUTURE: is there really an adopted name option in a continuation in? filing.continuationIn.nameRequest.correctNameOption = CorrectNameOptions.CORRECT_AML_ADOPT filing.continuationIn.nameRequest.legalName = this.getNameRequestApprovedName break @@ -584,9 +585,13 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM } // If this is a named IA then add Name Request Number and Approved Name. + // Otherwise it's a numbered IA. if (this.getNameRequestNumber) { + filing.incorporationApplication.nameRequest.correctNameOption = CorrectNameOptions.CORRECT_NEW_NR filing.incorporationApplication.nameRequest.nrNumber = this.getNameRequestNumber filing.incorporationApplication.nameRequest.legalName = this.getNameRequestApprovedName + } else { + filing.incorporationApplication.nameRequest.correctNameOption = CorrectNameOptions.CORRECT_NAME_TO_NUMBER } // If this is a future effective filing then save the effective date. @@ -772,6 +777,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM : {} }, nameRequest: { + correctNameOption: CorrectNameOptions.CORRECT_NEW_NR, legalName: this.getNameRequestApprovedName, legalType: this.getEntityType, nrNumber: this.getNameRequestNumber diff --git a/tests/unit/Actions.spec.ts b/tests/unit/Actions.spec.ts index e1c054319..a370c7e1a 100644 --- a/tests/unit/Actions.spec.ts +++ b/tests/unit/Actions.spec.ts @@ -12,7 +12,7 @@ import Actions from '@/components/common/Actions.vue' import mockRouter from './MockRouter' import LegalServices from '@/services/legal-services' import { FilingTypes } from '@/enums' -import { NameRequestStates } from '@bcrs-shared-components/enums' +import { CorrectNameOptions, NameRequestStates } from '@bcrs-shared-components/enums' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' import { CourtOrderStepIF, DefineCompanyIF, EffectiveDateTimeIF, IncorporationAgreementIF, NameRequestIF, OrgPersonIF, PeopleAndRoleIF, ShareStructureIF, TombstoneIF } from '@/interfaces' @@ -212,6 +212,7 @@ describe('Actions component - Filing Functionality', () => { }, incorporationApplication: { nameRequest: { + correctNameOption: CorrectNameOptions.CORRECT_NEW_NR, nrNumber: 'NR 1234567', legalType: 'BEN', legalName: 'My Name Request Inc.' diff --git a/tests/unit/filing-template-mixin.spec.ts b/tests/unit/filing-template-mixin.spec.ts index 6aaf26d39..6fedc8e98 100644 --- a/tests/unit/filing-template-mixin.spec.ts +++ b/tests/unit/filing-template-mixin.spec.ts @@ -5,6 +5,7 @@ import { useStore } from '@/store/store' import { BusinessTypes, PartyTypes, RoleTypes } from '@/enums' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' import { NameRequestIF } from '@/interfaces' +import { CorrectNameOptions } from '@bcrs-shared-components/enums' setActivePinia(createPinia()) const store = useStore() @@ -202,6 +203,7 @@ describe('Registration Filing', () => { extension: 444 }, nameRequest: { + correctNameOption: CorrectNameOptions.CORRECT_NEW_NR, legalName: 'My Approved Name', legalType: 'SP', nrNumber: 'NR 1234567'