diff --git a/package-lock.json b/package-lock.json index ef159702..c70e0360 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "business-create-ui", - "version": "5.10.9", + "version": "5.10.10", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index d311cefc..2f8d80ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.10.9", + "version": "5.10.10", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", diff --git a/src/components/common/NameRequestInfo.vue b/src/components/common/NameRequestInfo.vue index 38ebeada..cfc0d06c 100644 --- a/src/components/common/NameRequestInfo.vue +++ b/src/components/common/NameRequestInfo.vue @@ -300,6 +300,7 @@ export default class NameRequestInfo extends Mixins(CommonMixin, DateMixin) { case NrRequestActionCodes.NEW_BUSINESS: return 'New Business' case NrRequestActionCodes.RESTORE: return 'Restoration Request' case NrRequestActionCodes.AMALGAMATE: return 'Amalgamation' + case NrRequestActionCodes.MOVE: return 'Continuation In' } return '' // should never happen } diff --git a/src/components/common/Stepper.vue b/src/components/common/Stepper.vue index 463c0757..3131b270 100644 --- a/src/components/common/Stepper.vue +++ b/src/components/common/Stepper.vue @@ -78,7 +78,6 @@ export default class Stepper extends Vue { @Getter(useStore) isAffidavitValid!: boolean @Getter(useStore) isAmalgamationInformationValid!: boolean @Getter(useStore) isBusySaving!: boolean - @Getter(useStore) isContinuationInBusinessBcValid!: boolean @Getter(useStore) isContinuationInBusinessHomeValid!: boolean @Getter(useStore) isCreateShareStructureValid!: boolean @Getter(useStore) isDefineCompanyValid!: boolean @@ -105,7 +104,7 @@ export default class Stepper extends Vue { case RouteNames.AMALG_SHORT_REVIEW_CONFIRM: return this.isFilingValid case RouteNames.CONTINUATION_IN_BUSINESS_HOME: return this.isContinuationInBusinessHomeValid - case RouteNames.CONTINUATION_IN_BUSINESS_BC: return this.isContinuationInBusinessBcValid + case RouteNames.CONTINUATION_IN_BUSINESS_BC: return this.isDefineCompanyValid case RouteNames.CONTINUATION_IN_PEOPLE_ROLES: return this.isAddPeopleAndRolesValid case RouteNames.CONTINUATION_IN_SHARE_STRUCTURE: return this.isCreateShareStructureValid case RouteNames.CONTINUATION_IN_REVIEW_CONFIRM: return this.isFilingValid diff --git a/src/interfaces/store-interfaces/state-interfaces/continuation-in-state-interface.ts b/src/interfaces/store-interfaces/state-interfaces/continuation-in-state-interface.ts index 1af4fee1..39d0a239 100644 --- a/src/interfaces/store-interfaces/state-interfaces/continuation-in-state-interface.ts +++ b/src/interfaces/store-interfaces/state-interfaces/continuation-in-state-interface.ts @@ -2,7 +2,6 @@ import { ContinuationAuthorizationIF, ExistingBusinessInfoIF } from '@/interface // TODO: Add properties as needed export interface ContinuationInStateIF { - businessBcValid: boolean businessHomeValid: boolean continuationAuthorization: ContinuationAuthorizationIF existingBusinessInfo: ExistingBusinessInfoIF diff --git a/src/store/state/state-model.ts b/src/store/state/state-model.ts index 314c8f8e..ac47dc41 100644 --- a/src/store/state/state-model.ts +++ b/src/store/state/state-model.ts @@ -215,7 +215,6 @@ export const stateModel: StateModelIF = { type: null }, continuationIn: { - businessBcValid: false, businessHomeValid: false, continuationAuthorization: null, existingBusinessInfo: null diff --git a/src/store/store.ts b/src/store/store.ts index 014d84e8..74e691bf 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -551,11 +551,6 @@ export const useStore = defineStore('store', { return this.getDefineCompanyStep.valid }, - /** Is true when the Continuation In Business BC step is valid. */ - isContinuationInBusinessBcValid (): boolean { - return this.getContinuationIn.businessBcValid - }, - /** Is true when the Continuation In Business Home step is valid. */ isContinuationInBusinessHomeValid (): boolean { return this.getContinuationIn.businessHomeValid @@ -1160,9 +1155,6 @@ export const useStore = defineStore('store', { setDefineCompanyStepValidity (valid: boolean) { this.stateModel.defineCompanyStep.valid = valid }, - setContinuationInBusinessBcValid (valid: boolean) { - this.getContinuationIn.businessBcValid = valid - }, setContinuationInBusinessHomeValid (valid: boolean) { this.getContinuationIn.businessHomeValid = valid }, diff --git a/src/views/ContinuationIn/ContinuationInBusinessBc.vue b/src/views/ContinuationIn/ContinuationInBusinessBc.vue index c4f271b9..8189b785 100644 --- a/src/views/ContinuationIn/ContinuationInBusinessBc.vue +++ b/src/views/ContinuationIn/ContinuationInBusinessBc.vue @@ -2,11 +2,19 @@
-
-

Company Name

+
+

+ Company Name +

-
** Correct Name component goes here **
+ + + +
@@ -111,11 +119,15 @@ import { RouteNames } from '@/enums' import BusinessContactInfo from '@/components/common/BusinessContactInfo.vue' import FolioNumber from '@/components/common/FolioNumber.vue' import OfficeAddresses from '@/components/common/OfficeAddresses.vue' +import NameRequestInfo from '@/components/common/NameRequestInfo.vue' +import NameTranslations from '@/components/common/NameTranslations.vue' @Component({ components: { BusinessContactInfo, FolioNumber, + NameRequestInfo, + NameTranslations, OfficeAddresses } }) @@ -124,12 +136,13 @@ export default class ContinuationInBusinessBc extends Mixins(CommonMixin) { @Getter(useStore) getDefineCompanyStep!: DefineCompanyIF @Getter(useStore) getFolioNumber!: string @Getter(useStore) getFolioNumberValid!: boolean + @Getter(useStore) getNameTranslationsValid!: boolean @Getter(useStore) getShowErrors!: boolean @Getter(useStore) isEntityType!: boolean @Getter(useStore) isPremiumAccount!: boolean @Action(useStore) setBusinessContact!: (x: ContactPointIF) => void - @Action(useStore) setContinuationInBusinessBcValid!: (x: boolean) => void + @Action(useStore) setDefineCompanyStepValidity!: (x: boolean) => void @Action(useStore) setFolioNumber!: (x: string) => void @Action(useStore) setFolioNumberValidity!: (x: boolean) => void @Action(useStore) setIgnoreChanges!: (x: boolean) => void @@ -140,6 +153,7 @@ export default class ContinuationInBusinessBc extends Mixins(CommonMixin) { /** Array of valid components. Must match validFlags. */ readonly validComponents = [ + 'company-name-header', 'office-address-header', 'registered-office-contact-header', 'folio-reference-number-header' @@ -148,6 +162,7 @@ export default class ContinuationInBusinessBc extends Mixins(CommonMixin) { /** Object of valid flags. Must match validComponents. */ get validFlags (): object { return { + validCompanyNameForm: this.getNameTranslationsValid, validAddressForm: this.addressFormValid, validBusinessContactForm: this.businessContactFormValid, validFolioReferenceNumber: !this.isPremiumAccount || this.getFolioNumberValid @@ -201,11 +216,14 @@ export default class ContinuationInBusinessBc extends Mixins(CommonMixin) { @Watch('addressFormValid', { immediate: true }) @Watch('businessContactFormValid', { immediate: true }) @Watch('getFolioNumberValid', { immediate: true }) - private onContinuationInBusinessBcValid (): void { - this.setContinuationInBusinessBcValid( + @Watch('getNameTranslationsValid', { immediate: true }) + // Update the overall Define Company Step validity + private onDefineCompanyStepValid (): void { + this.setDefineCompanyStepValidity( this.addressFormValid && this.businessContactFormValid && - (!this.isPremiumAccount || this.getFolioNumberValid) + (!this.isPremiumAccount || this.getFolioNumberValid) && + this.getNameTranslationsValid ) } diff --git a/tests/unit/ContinuationInBusinessBc.spec.ts b/tests/unit/ContinuationInBusinessBc.spec.ts index f9e0348f..9ac8784f 100644 --- a/tests/unit/ContinuationInBusinessBc.spec.ts +++ b/tests/unit/ContinuationInBusinessBc.spec.ts @@ -4,6 +4,8 @@ import ContinuationInBusinessBc from '@/views/ContinuationIn/ContinuationInBusin import OfficeAddresses from '@/components/common/OfficeAddresses.vue' import BusinessContactInfo from '@/components/common/BusinessContactInfo.vue' import FolioNumber from '@/components/common/FolioNumber.vue' +import NameRequestInfo from '@/components/common/NameRequestInfo.vue' +import NameTranslations from '@/components/common/NameTranslations.vue' describe('Continuation In Business BC component', () => { it('renders the component correctly', async () => { @@ -28,7 +30,8 @@ describe('Continuation In Business BC component', () => { const firstSection = wrapper.findAll('section').at(0) expect(firstSection.find('header').exists()).toBe(true) expect(firstSection.find('header h2').text()).toBe('Company Name') - // FUTURE: finish this ^^^ + expect(firstSection.findComponent(NameRequestInfo).exists()).toBe(true) + expect(firstSection.findComponent(NameTranslations).exists()).toBe(true) const secondSection = wrapper.findAll('section').at(1) expect(secondSection.find('header').exists()).toBe(true)