diff --git a/package-lock.json b/package-lock.json index 9307871f4..8455d7f87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.6.0", + "version": "6.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.6.0", + "version": "6.0.0", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index 03d583b57..32cc63e8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.6.0", + "version": "6.0.0", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", diff --git a/src/interfaces/store-interfaces/state-interfaces/business-interface.ts b/src/interfaces/store-interfaces/state-interfaces/business-interface.ts index f9496a037..ef8bb940c 100644 --- a/src/interfaces/store-interfaces/state-interfaces/business-interface.ts +++ b/src/interfaces/store-interfaces/state-interfaces/business-interface.ts @@ -45,7 +45,7 @@ export interface BusinessIF { officeAddress: OfficeAddressIF nextAnnualReport: ApiDateTimeUtc // used for BCOMP only startDate: ApiDateTimeUtc - state: EntityState + state: EntityStates stateFiling?: string submitter: string // not used taxId?: string // aka Business Number // may be undefined diff --git a/src/resources/BreadcrumbResource.ts b/src/resources/BreadcrumbResource.ts index fe9f67573..d1cecf430 100644 --- a/src/resources/BreadcrumbResource.ts +++ b/src/resources/BreadcrumbResource.ts @@ -1,4 +1,5 @@ import { FilingTypes } from '@/enums' +import { GetCorpNumberedDescription } from '@bcrs-shared-components/corp-type-module' import { BreadcrumbIF } from '@/interfaces' import { createPinia, setActivePinia } from 'pinia' import { useStore } from '@/store/store' @@ -8,18 +9,24 @@ const store = useStore() /** Returns legal name. */ function getLegalName (): string { - // name comes from different places depending on filing type - switch (store.getFilingType) { - case FilingTypes.DISSOLUTION: return store.getBusinessLegalName - case FilingTypes.INCORPORATION_APPLICATION: return store.getNameRequestApprovedName - case FilingTypes.REGISTRATION: return store.getNameRequestApprovedName - case FilingTypes.RESTORATION: return store.getNameRequestApprovedName + const getFilingType: FilingTypes = store.getFilingType + const getBusinessLegalName: string = store.getBusinessLegalName + const getNameRequestApprovedName: string = store.getNameRequestApprovedName + + switch (getFilingType) { + case FilingTypes.AMALGAMATION_APPLICATION: return getNameRequestApprovedName + case FilingTypes.CONTINUATION_IN: return getNameRequestApprovedName + case FilingTypes.DISSOLUTION: return getBusinessLegalName + case FilingTypes.INCORPORATION_APPLICATION: return getNameRequestApprovedName + case FilingTypes.REGISTRATION: return getNameRequestApprovedName + case FilingTypes.RESTORATION: return getNameRequestApprovedName } } /** Returns numbered entity name. */ function getNumberedEntityName (): string { - return GetCorpNumberedDescription(store.getEntityType as any) + const getEntityType = store.getEntityType + return GetCorpNumberedDescription(getEntityType) } /** Returns URL param string with Account ID if present, else empty string. */