From 30ec8b395a6077d0d3c74d9b32aec79b72214d07 Mon Sep 17 00:00:00 2001
From: ketaki-deodhar <116035339+ketaki-deodhar@users.noreply.github.com>
Date: Fri, 26 Apr 2024 09:23:36 -0700
Subject: [PATCH] 19259 - show draft continuation in (#650)
* 19259 - draft continuation in-1
* 19259 - draft continuation in-2
* 19259 - misc fixes and unit tests
* 19259 - install again
* 19259 - update package version
* 19259 - update based on review
* 19259 - update to use enumUtilities
* 19259 - create a getter to show NR
* 19259 - update comments
---
package-lock.json | 44 ++---
package.json | 8 +-
src/App.vue | 11 +-
src/components/Dashboard/TodoList.vue | 96 +++++++++-
src/components/EntityInfo/EntityHeader.vue | 13 +-
src/enums/entityStatus.ts | 2 +
src/interfaces/api-filing-interface.ts | 3 +
src/interfaces/api-task-interface.ts | 1 +
src/services/enum-utilities.ts | 6 +
src/stores/businessStore.ts | 20 +++
src/stores/rootStore.ts | 12 +-
tests/unit/App.spec.ts | 196 +++++++++++++++++++++
tests/unit/EntityHeader.spec.ts | 106 +++++++++++
tests/unit/enum-utilities.spec.ts | 2 +
14 files changed, 474 insertions(+), 46 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index e2a0ede49..f4b32c8de 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,25 +1,25 @@
{
"name": "business-filings-ui",
- "version": "7.2.2",
+ "version": "7.2.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "business-filings-ui",
- "version": "7.2.2",
+ "version": "7.2.3",
"dependencies": {
"@babel/compat-data": "^7.21.5",
"@bcrs-shared-components/base-address": "2.0.9",
"@bcrs-shared-components/breadcrumb": "2.1.11",
"@bcrs-shared-components/confirm-dialog": "1.2.1",
- "@bcrs-shared-components/corp-type-module": "1.0.14",
+ "@bcrs-shared-components/corp-type-module": "1.0.16",
"@bcrs-shared-components/court-order-poa": "2.1.4",
"@bcrs-shared-components/date-picker": "1.2.39",
"@bcrs-shared-components/document-delivery": "1.2.1",
- "@bcrs-shared-components/enums": "1.1.9",
+ "@bcrs-shared-components/enums": "1.1.10",
"@bcrs-shared-components/expandable-help": "1.0.1",
"@bcrs-shared-components/folio-number-input": "1.1.18",
- "@bcrs-shared-components/interfaces": "1.1.12",
+ "@bcrs-shared-components/interfaces": "1.1.13",
"@bcrs-shared-components/mixins": "1.1.30",
"@bcrs-shared-components/staff-comments": "1.3.11",
"@bcrs-shared-components/staff-payment": "2.1.11",
@@ -246,9 +246,9 @@
}
},
"node_modules/@bcrs-shared-components/corp-type-module": {
- "version": "1.0.14",
- "resolved": "https://registry.npmjs.org/@bcrs-shared-components/corp-type-module/-/corp-type-module-1.0.14.tgz",
- "integrity": "sha512-SZhJw4hpqQT2BL3RuVB0Z1hmShhrv5byhH4gnaF1fVl9jsUGkjC/Ytic08UnEX4DIyR1/VWNyjTclNgxi9+0Bw=="
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/@bcrs-shared-components/corp-type-module/-/corp-type-module-1.0.16.tgz",
+ "integrity": "sha512-3MumJZ/0Urfnp1AGJpnUifk5DMrLcjDD+8YiGXy1WXjvpVLwA0S4bNPuvFUf0w4My+0HyXWZ/XsZWiQydVGYHw=="
},
"node_modules/@bcrs-shared-components/court-order-poa": {
"version": "2.1.4",
@@ -287,18 +287,13 @@
}
},
"node_modules/@bcrs-shared-components/enums": {
- "version": "1.1.9",
- "resolved": "https://registry.npmjs.org/@bcrs-shared-components/enums/-/enums-1.1.9.tgz",
- "integrity": "sha512-rYmRG0QH9hMWXRJNrxzNQhM3tT/b6mubfLBREx2ICzUtSIDc9UvQ0VqmyX/q84xQdzAOYqh0Nth9vXYm7Ypdxg==",
+ "version": "1.1.10",
+ "resolved": "https://registry.npmjs.org/@bcrs-shared-components/enums/-/enums-1.1.10.tgz",
+ "integrity": "sha512-eKGpm0Nx5g+plhKdYiaUnLgwFsmBgyw/5yGcFAJm4jrPJY4VsDiYLFOEI9b5bEZKX9arSdAzNV5zmQneN8zD4w==",
"dependencies": {
- "@bcrs-shared-components/corp-type-module": "^1.0.15"
+ "@bcrs-shared-components/corp-type-module": "^1.0.16"
}
},
- "node_modules/@bcrs-shared-components/enums/node_modules/@bcrs-shared-components/corp-type-module": {
- "version": "1.0.15",
- "resolved": "https://registry.npmjs.org/@bcrs-shared-components/corp-type-module/-/corp-type-module-1.0.15.tgz",
- "integrity": "sha512-g/TcNSR7zJsG2lBjn/NnM+/+k7dJzhAiy5PiPj0ObN56bUV1PrUWVVlg5lz4/JZUEAZetWhwnyAzPVGsn7kr1w=="
- },
"node_modules/@bcrs-shared-components/expandable-help": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@bcrs-shared-components/expandable-help/-/expandable-help-1.0.1.tgz",
@@ -315,20 +310,15 @@
}
},
"node_modules/@bcrs-shared-components/interfaces": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/@bcrs-shared-components/interfaces/-/interfaces-1.1.12.tgz",
- "integrity": "sha512-LR93tcUPyRoOrkLul2PBpGhgUXbDse7ZDT3MKlnMNOx8P+5vNjeowB/a7SAZo098QuNYkyhaRafhgqtM6kO+Eg==",
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/@bcrs-shared-components/interfaces/-/interfaces-1.1.13.tgz",
+ "integrity": "sha512-+ukMaxz8mChD3gF5km8fW+afsO+7l4tZKyNsBkgWUVIC4eSqDO9XVSVOEAJS3e+R5dM4jdORbiHZzL4kkUT4ZQ==",
"dependencies": {
- "@bcrs-shared-components/corp-type-module": "^1.0.15",
- "@bcrs-shared-components/enums": "^1.1.9",
+ "@bcrs-shared-components/corp-type-module": "^1.0.16",
+ "@bcrs-shared-components/enums": "^1.1.10",
"vue": "^2.7.14"
}
},
- "node_modules/@bcrs-shared-components/interfaces/node_modules/@bcrs-shared-components/corp-type-module": {
- "version": "1.0.15",
- "resolved": "https://registry.npmjs.org/@bcrs-shared-components/corp-type-module/-/corp-type-module-1.0.15.tgz",
- "integrity": "sha512-g/TcNSR7zJsG2lBjn/NnM+/+k7dJzhAiy5PiPj0ObN56bUV1PrUWVVlg5lz4/JZUEAZetWhwnyAzPVGsn7kr1w=="
- },
"node_modules/@bcrs-shared-components/mixins": {
"version": "1.1.30",
"resolved": "https://registry.npmjs.org/@bcrs-shared-components/mixins/-/mixins-1.1.30.tgz",
diff --git a/package.json b/package.json
index 3689c4a60..d79638a17 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "business-filings-ui",
- "version": "7.2.2",
+ "version": "7.2.3",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
@@ -17,14 +17,14 @@
"@bcrs-shared-components/base-address": "2.0.9",
"@bcrs-shared-components/breadcrumb": "2.1.11",
"@bcrs-shared-components/confirm-dialog": "1.2.1",
- "@bcrs-shared-components/corp-type-module": "1.0.14",
+ "@bcrs-shared-components/corp-type-module": "1.0.16",
"@bcrs-shared-components/court-order-poa": "2.1.4",
"@bcrs-shared-components/date-picker": "1.2.39",
"@bcrs-shared-components/document-delivery": "1.2.1",
- "@bcrs-shared-components/enums": "1.1.9",
+ "@bcrs-shared-components/enums": "1.1.10",
"@bcrs-shared-components/expandable-help": "1.0.1",
"@bcrs-shared-components/folio-number-input": "1.1.18",
- "@bcrs-shared-components/interfaces": "1.1.12",
+ "@bcrs-shared-components/interfaces": "1.1.13",
"@bcrs-shared-components/mixins": "1.1.30",
"@bcrs-shared-components/staff-comments": "1.3.11",
"@bcrs-shared-components/staff-payment": "2.1.11",
diff --git a/src/App.vue b/src/App.vue
index 2e08cb1bd..893cc70f5 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -214,13 +214,17 @@ export default class App extends Mixins(
/** Currently supported entity types in Filings UI. */
supportedEntityTypes = [
- CorpTypeCd.BENEFIT_COMPANY,
CorpTypeCd.BC_CCC,
CorpTypeCd.BC_COMPANY,
CorpTypeCd.BC_ULC_COMPANY,
+ CorpTypeCd.BEN_CONTINUE_IN,
+ CorpTypeCd.BENEFIT_COMPANY,
+ CorpTypeCd.CCC_CONTINUE_IN,
+ CorpTypeCd.CONTINUE_IN,
CorpTypeCd.COOP,
CorpTypeCd.PARTNERSHIP,
- CorpTypeCd.SOLE_PROP
+ CorpTypeCd.SOLE_PROP,
+ CorpTypeCd.ULC_CONTINUE_IN
]
// store references
@Getter(useBusinessStore) getEntityName!: string
@@ -614,6 +618,7 @@ export default class App extends Mixins(
}
const isAmalgamation = (filingName === FilingTypes.AMALGAMATION_APPLICATION)
+ const isContinuationInApplication = (filingName === FilingTypes.CONTINUATION_IN)
const isIncorporationApplication = (filingName === FilingTypes.INCORPORATION_APPLICATION)
const isRegistration = (filingName === FilingTypes.REGISTRATION)
@@ -623,6 +628,7 @@ export default class App extends Mixins(
case FilingStatus.PENDING:
// this is a boostrap task
if (isAmalgamation) entityStatus = EntityStatus.DRAFT_AMALGAMATION
+ else if (isContinuationInApplication) entityStatus = EntityStatus.DRAFT_CONTINUATION_IN
else if (isIncorporationApplication) entityStatus = EntityStatus.DRAFT_INCORP_APP
else if (isRegistration) entityStatus = EntityStatus.DRAFT_REGISTRATION
else throw new Error(`Invalid ${filingName} filing - filing name`)
@@ -632,6 +638,7 @@ export default class App extends Mixins(
case FilingStatus.PAID:
// this is a bootstrap filing
if (isAmalgamation) entityStatus = EntityStatus.FILED_AMALGAMATION
+ else if (isContinuationInApplication) entityStatus = EntityStatus.FILED_CONTINUATION_IN
else if (isIncorporationApplication) entityStatus = EntityStatus.FILED_INCORP_APP
else if (isRegistration) entityStatus = EntityStatus.FILED_REGISTRATION
else throw new Error(`Invalid ${filingName} filing - filing name`)
diff --git a/src/components/Dashboard/TodoList.vue b/src/components/Dashboard/TodoList.vue
index 8ade44fdf..81118e9c5 100644
--- a/src/components/Dashboard/TodoList.vue
+++ b/src/components/Dashboard/TodoList.vue
@@ -189,6 +189,14 @@
{{ item.subtitle }}
+
+
+ {{ item.subtitle }}
+
+
-
+
Fill out Amalgamation Application
-
+
Incorporate using this NR
Incorporate a Numbered Company
-
+
Register using this NR
+
+ Continue In using this NR
+ Continue In as a Numbered Company
+
Resume
@@ -536,10 +548,9 @@
-
+
@@ -733,6 +744,12 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
return this.todoItems.sort((a, b) => (a.order - b.order))
}
+ /** Whether to show Name Request Info section */
+ isFilingWithNr (item: TodoItemIF): boolean {
+ return EnumUtilities.isTypeAmalgamation(item) || EnumUtilities.isTypeIncorporationApplication(item) ||
+ EnumUtilities.isTypeContinuationInApplication(item) || EnumUtilities.isTypeRegistration(item)
+ }
+
/** Whether to show the invalid section styling. */
showInvalidSection (item: TodoItemIF): boolean {
if (item.isAlteringToBen && !this.isGoodStanding) return true
@@ -763,11 +780,13 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
showDetailsBtnBlue (item: TodoItemIF): boolean {
if (this.isStatusNew(item) && this.isTypeConversion(item)) return true
if (this.isStatusDraft(item) && this.isTypeConversion(item)) return true
- if (this.isStatusDraft(item) && this.isTypeAmalgamation(item) &&
+ if (this.isStatusDraft(item) && EnumUtilities.isTypeAmalgamation(item) &&
item.nameRequest) return true
- if (this.isStatusDraft(item) && this.isTypeIncorporationApplication(item) &&
+ if (this.isStatusDraft(item) && EnumUtilities.isTypeContinuationInApplication(item) &&
item.nameRequest) return true
- if (this.isStatusDraft(item) && this.isTypeRegistration(item) &&
+ if (this.isStatusDraft(item) && EnumUtilities.isTypeIncorporationApplication(item) &&
+ item.nameRequest) return true
+ if (this.isStatusDraft(item) && EnumUtilities.isTypeRegistration(item) &&
item.nameRequest) return true
if (this.isStatusPending(item)) return true
if (this.isAffiliationInvitation(item)) return true
@@ -1080,6 +1099,9 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
case FilingTypes.CONTINUATION_OUT:
await this.loadContinuationOut(task)
break
+ case FilingTypes.CONTINUATION_IN:
+ await this.loadContinuationInApplication(task)
+ break
case FilingTypes.CONVERSION:
await this.loadConversion(task)
break
@@ -1424,6 +1446,55 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
}
}
+ async loadContinuationInApplication (task: ApiTaskIF): Promise {
+ const filing = task.task.filing
+ const header = filing.header
+ const continuationIn = filing.continuationIn
+
+ if (header) {
+ let subtitle: string = null
+ if (this.isStatusDraft(header)) {
+ if (this.getNameRequest) {
+ subtitle = `NR APPROVED - ${this.expiresText(this.getNameRequest)}`
+ } else {
+ subtitle = 'DRAFT'
+ }
+ }
+
+ const paymentStatusCode = header.paymentStatusCode
+ const payErrorObj = paymentStatusCode && await PayServices.getPayErrorObj(this.getPayApiUrl, paymentStatusCode)
+
+ // NB: continuationIn application may be undefined
+ const haveData = Boolean(
+ continuationIn?.offices ||
+ continuationIn?.contactPoint ||
+ continuationIn?.parties ||
+ continuationIn?.shareStructure.shareClasses ||
+ continuationIn?.foreignJurisdiction
+ )
+
+ const item: TodoItemIF = {
+ name: FilingTypes.CONTINUATION_IN,
+ filingId: header.filingId,
+ title: filing.displayName,
+ subtitle,
+ draftTitle: FilingNames.CONTINUATION_IN_APPLICATION,
+ status: header.status,
+ enabled: task.enabled,
+ order: task.order,
+ paymentMethod: header.paymentMethod || null,
+ paymentToken: header.paymentToken || null,
+ payErrorObj,
+ isEmptyFiling: !haveData,
+ nameRequest: this.getNameRequest
+ }
+ this.todoItems.push(item)
+ } else {
+ // eslint-disable-next-line no-console
+ console.log('ERROR - invalid header in filing =', filing)
+ }
+ }
+
async loadRegistration (task: ApiTaskIF): Promise {
const filing = task.task.filing
const header = filing.header
@@ -1806,6 +1877,13 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
this.$router.push({ name: Routes.CONSENT_CONTINUATION_OUT, params: { filingId: item.filingId.toString() } })
break
+ case FilingTypes.CONTINUATION_IN: {
+ // navigate to Create UI to resume this Continuation In Application
+ const continuationInUrl = `${this.getCreateUrl}/continuation-in-business-home?id=${this.tempRegNumber}`
+ navigate(continuationInUrl)
+ break
+ }
+
case FilingTypes.CONTINUATION_OUT:
// resume this Continuation Out locally
this.$router.push({ name: Routes.CONTINUATION_OUT, params: { filingId: item.filingId.toString() } })
diff --git a/src/components/EntityInfo/EntityHeader.vue b/src/components/EntityInfo/EntityHeader.vue
index b689d1ff5..3c7a95841 100644
--- a/src/components/EntityInfo/EntityHeader.vue
+++ b/src/components/EntityInfo/EntityHeader.vue
@@ -81,7 +81,7 @@
{{ appDescription }}
@@ -111,6 +111,8 @@ export default class EntityHeader extends Vue {
@Getter(useFilingHistoryListStore) isAuthorizedToContinueOut!: boolean
@Getter(useRootStore) isDraftAmalgamation!: boolean
@Getter(useRootStore) isFiledAmalgamation!: boolean
+ @Getter(useRootStore) isDraftContinuationIn!: boolean
+ @Getter(useRootStore) isFiledContinuationIn!: boolean
@Getter(useBusinessStore) isHistorical!: boolean
@Getter(useRootStore) isInLimitedRestoration!: boolean
@Getter(useBusinessStore) isSoleProp!: boolean
@@ -125,7 +127,7 @@ export default class EntityHeader extends Vue {
}
}
- /** The incorporation/registration/amalgamation application description. */
+ /** The incorporation/registration/continuationIn/amalgamation application description. */
get appDescription (): string {
if (this.isDraftAmalgamation) {
return this.getTasks[0]?.task.filing.displayName
@@ -134,6 +136,13 @@ export default class EntityHeader extends Vue {
return this.getFilings[0]?.displayName
}
+ if (this.isDraftContinuationIn) {
+ return this.getTasks[0]?.task.filing.displayName
+ }
+ if (this.isFiledContinuationIn) {
+ return this.getFilings[0]?.displayName
+ }
+
const filingName = [CorpTypeCd.SOLE_PROP, CorpTypeCd.PARTNERSHIP].includes(this.getLegalType)
? FilingNames.REGISTRATION
: FilingNames.INCORPORATION_APPLICATION
diff --git a/src/enums/entityStatus.ts b/src/enums/entityStatus.ts
index d06f0fa2c..031c367eb 100644
--- a/src/enums/entityStatus.ts
+++ b/src/enums/entityStatus.ts
@@ -1,9 +1,11 @@
/** Statuses used before business exists. */
export enum EntityStatus {
DRAFT_AMALGAMATION = 'DRAFT_AMALGAMATION',
+ DRAFT_CONTINUATION_IN = 'DRAFT_CONTINUATION_IN',
DRAFT_INCORP_APP = 'DRAFT_INCORP_APP',
DRAFT_REGISTRATION = 'DRAFT_REGISTRATION',
FILED_AMALGAMATION = 'FILED_AMALGAMATION',
+ FILED_CONTINUATION_IN = 'FILED_CONTINUATION_IN',
FILED_INCORP_APP = 'FILED_INCORP_APP',
FILED_REGISTRATION = 'FILED_REGISTRATION',
}
diff --git a/src/interfaces/api-filing-interface.ts b/src/interfaces/api-filing-interface.ts
index 2ea8b020b..ffb123ed1 100644
--- a/src/interfaces/api-filing-interface.ts
+++ b/src/interfaces/api-filing-interface.ts
@@ -91,6 +91,9 @@ export interface ApiFilingIF {
region: string // may be null
}
+ // continuation in filings only
+ continuationIn?: any // some object
+
// continuation out filings only
continuationOut?: {
continuationOutDate: IsoDatePacific
diff --git a/src/interfaces/api-task-interface.ts b/src/interfaces/api-task-interface.ts
index 16ed32dfd..f7ba70f97 100644
--- a/src/interfaces/api-task-interface.ts
+++ b/src/interfaces/api-task-interface.ts
@@ -52,6 +52,7 @@ export interface TaskTodoIF {
changeOfDirectors?: any
changeOfRegistration?: any
consentContinuationOut?: any
+ continuationIn?:any
continuationOut?: any
conversion?: any
correction?: any
diff --git a/src/services/enum-utilities.ts b/src/services/enum-utilities.ts
index f740b93e3..2be8a9ce9 100644
--- a/src/services/enum-utilities.ts
+++ b/src/services/enum-utilities.ts
@@ -111,6 +111,11 @@ export default class EnumUtilities {
return (item.name === FilingTypes.CONSENT_CONTINUATION_OUT)
}
+ /** Returns True if filing is an Continuation In Application. */
+ static isTypeContinuationInApplication (item: any): boolean {
+ return (item.name === FilingTypes.CONTINUATION_IN)
+ }
+
/** Returns True if filing is a Continuation Out. */
static isTypeContinuationOut (item: any): boolean {
return (item.name === FilingTypes.CONTINUATION_OUT)
@@ -368,6 +373,7 @@ export default class EnumUtilities {
case FilingTypes.CHANGE_OF_DIRECTORS: return FilingNames.CHANGE_OF_DIRECTORS
case FilingTypes.CHANGE_OF_NAME: return FilingNames.CHANGE_OF_NAME
case FilingTypes.CHANGE_OF_REGISTRATION: return FilingNames.CHANGE_OF_REGISTRATION
+ case FilingTypes.CONTINUATION_IN: return FilingNames.CONTINUATION_IN_APPLICATION
case FilingTypes.CONVERSION: return FilingNames.CONVERSION
case FilingTypes.CORRECTION: return FilingNames.CORRECTION
case FilingTypes.COURT_ORDER: return FilingNames.COURT_ORDER
diff --git a/src/stores/businessStore.ts b/src/stores/businessStore.ts
index 7ca8b4c17..57ff36ba3 100644
--- a/src/stores/businessStore.ts
+++ b/src/stores/businessStore.ts
@@ -197,6 +197,26 @@ export const useBusinessStore = defineStore('business', {
)
},
+ /** Is True if entity is a Continue In Benefit Company. */
+ isContinuationInBen (): boolean {
+ return (this.getLegalType === CorpTypeCd.BEN_CONTINUE_IN)
+ },
+
+ /** Is True if entity is a Continue In Ltd Company. */
+ isContinuationInC (): boolean {
+ return (this.getLegalType === CorpTypeCd.CONTINUE_IN)
+ },
+
+ /** Is True if entity is a Continue In Community Contribution Company. */
+ isContinuationInCcc (): boolean {
+ return (this.getLegalType === CorpTypeCd.CCC_CONTINUE_IN)
+ },
+
+ /** Is True if entity is a Continue In ULC Company. */
+ isContinuationInUlc (): boolean {
+ return (this.getLegalType === CorpTypeCd.ULC_CONTINUE_IN)
+ },
+
/** Is True if entity is a Cooperative. */
isCoop (): boolean {
return (this.getLegalType === CorpTypeCd.COOP)
diff --git a/src/stores/rootStore.ts b/src/stores/rootStore.ts
index 0a98e8410..6e5029775 100644
--- a/src/stores/rootStore.ts
+++ b/src/stores/rootStore.ts
@@ -120,6 +120,10 @@ export const useRootStore = defineStore('root', {
return (state.entityStatus === EntityStatus.DRAFT_AMALGAMATION)
},
+ isDraftContinuationIn (state: RootStateIF): boolean {
+ return (state.entityStatus === EntityStatus.DRAFT_CONTINUATION_IN)
+ },
+
isDraftIncorpApp (state: RootStateIF): boolean {
return (state.entityStatus === EntityStatus.DRAFT_INCORP_APP)
},
@@ -132,6 +136,10 @@ export const useRootStore = defineStore('root', {
return (state.entityStatus === EntityStatus.FILED_AMALGAMATION)
},
+ isFiledContinuationIn (state: RootStateIF): boolean {
+ return (state.entityStatus === EntityStatus.FILED_CONTINUATION_IN)
+ },
+
isFiledIncorpApp (state: RootStateIF): boolean {
return (state.entityStatus === EntityStatus.FILED_INCORP_APP)
},
@@ -143,14 +151,14 @@ export const useRootStore = defineStore('root', {
/** Is True if this is a bootstrap task (ie, Draft or Pending). */
isBootstrapTask (): boolean {
return (
- this.isDraftAmalgamation || this.isDraftIncorpApp || this.isDraftRegistration
+ this.isDraftAmalgamation || this.isDraftIncorpApp || this.isDraftRegistration || this.isDraftContinuationIn
)
},
/** Is True if this is a bootstrap filing (ie, Completed or Paid). */
isBootstrapFiling (): boolean {
return (
- this.isFiledAmalgamation || this.isFiledIncorpApp || this.isFiledRegistration
+ this.isFiledAmalgamation || this.isFiledIncorpApp || this.isFiledRegistration || this.isFiledContinuationIn
)
},
diff --git a/tests/unit/App.spec.ts b/tests/unit/App.spec.ts
index 439460c3e..8fe66f4c8 100644
--- a/tests/unit/App.spec.ts
+++ b/tests/unit/App.spec.ts
@@ -2954,3 +2954,199 @@ describe('App as a completed vertical amalgamation application', () => {
expect(filingHistoryListStore.filings[0].data.legalFilings).toEqual(['amalgamationApplication'])
})
})
+
+describe('App as a draft numbered continuation in application', () => {
+ let wrapper: Wrapper
+
+ beforeAll(() => {
+ // clear store
+ businessStore.setLegalName(null)
+ rootStore.setNameRequest(null)
+ rootStore.setTasks([])
+ filingHistoryListStore.setFilings([])
+
+ sessionStorage.clear()
+ sessionStorage.setItem('KEYCLOAK_TOKEN', KEYCLOAK_TOKEN_USER)
+ sessionStorage.setItem('TEMP_REG_NUMBER', 'T123456789')
+ })
+
+ beforeEach(async () => {
+ // mock "fetchAuthorizations" auth service
+ vi.spyOn(AuthServices, 'fetchAuthorizations').mockImplementation((): any => {
+ return Promise.resolve({
+ data: { roles: ['edit', 'view'] }
+ })
+ })
+
+ // mock "fetchUserInfo" auth service
+ vi.spyOn(AuthServices, 'fetchUserInfo').mockImplementation((): any => {
+ return Promise.resolve(USER_INFO)
+ })
+
+ // mock "fetchBootstrapFiling" legal service
+ vi.spyOn(LegalServices, 'fetchBootstrapFiling').mockImplementation((): any => {
+ return Promise.resolve({
+ filing: {
+ business: {
+ identifier: 'T123456789',
+ legalType: CorpTypeCd.CONTINUE_IN
+ },
+ header: {
+ date: '2020-05-21T00:11:55.887740+00:00',
+ filingId: 789,
+ name: FilingTypes.CONTINUATION_IN,
+ status: FilingStatus.DRAFT
+ },
+ continuationIn: {
+ nameRequest: {
+ legalType: CorpTypeCd.CONTINUE_IN
+ }
+ }
+ }
+ })
+ })
+
+ // mock "UpdateLdUser" auth service
+ vi.spyOn(utils, 'UpdateLdUser').mockImplementation((): any => {
+ return Promise.resolve()
+ })
+
+ // create a Local Vue and install router (and store) on it
+ const localVue = createLocalVue()
+ localVue.use(VueRouter)
+ const router = mockRouter.mock()
+ router.push({ name: 'dashboard' })
+
+ wrapper = shallowMount(App, { localVue, router, vuetify })
+
+ // wait for everything to settle
+ await flushPromises()
+ })
+
+ afterEach(() => {
+ wrapper.destroy()
+ })
+
+ it('fetches continuation in filing properly', () => {
+ expect(rootStore.getNameRequest).toBeNull()
+ expect(rootStore.getEntityStatus).toBe(EntityStatus.DRAFT_CONTINUATION_IN)
+ expect(businessStore.getIdentifier).toBe('T123456789')
+ expect(businessStore.isContinuationInC).toBe(true)
+ expect(businessStore.isGoodStanding).toBe(true)
+ expect(businessStore.getLegalName).toBeNull()
+ expect(rootStore.isDraftContinuationIn).toBe(true)
+ expect(rootStore.isBootstrapTask).toBe(true)
+
+ // verify loaded task
+ expect(rootStore.tasks.length).toBe(1)
+ expect(rootStore.tasks[0].enabled).toBe(true)
+ expect(rootStore.tasks[0].order).toBe(1)
+ expect(rootStore.tasks[0].task.filing.business).not.toBeNull()
+ expect(rootStore.tasks[0].task.filing.header.name).toBe('continuationIn')
+ expect(rootStore.tasks[0].task.filing.header.status).toBe('DRAFT')
+ expect(rootStore.tasks[0].task.filing.amalgamationApplication).not.toBeNull()
+ expect(rootStore.tasks[0].task.filing.displayName).toBe('BC Limited Company Continuation In Application')
+ })
+})
+
+describe('App as a completed continuation in application', () => {
+ // Intermediate scenario - still using Temp Reg Number
+ let wrapper: Wrapper
+
+ beforeAll(() => {
+ // clear store
+ businessStore.setLegalName(null)
+ rootStore.setNameRequest(null)
+ rootStore.setTasks([])
+ filingHistoryListStore.setFilings([])
+
+ sessionStorage.clear()
+ sessionStorage.setItem('KEYCLOAK_TOKEN', KEYCLOAK_TOKEN_USER)
+ sessionStorage.setItem('TEMP_REG_NUMBER', 'T123456789')
+ })
+
+ beforeEach(async () => {
+ // mock "fetchAuthorizations" auth service
+ vi.spyOn(AuthServices, 'fetchAuthorizations').mockImplementation((): any => {
+ return Promise.resolve({
+ data: { roles: ['edit', 'view'] }
+ })
+ })
+
+ // mock "fetchUserInfo" auth service
+ vi.spyOn(AuthServices, 'fetchUserInfo').mockImplementation((): any => {
+ return Promise.resolve(USER_INFO)
+ })
+
+ // mock "fetchBootstrapFiling" legal service
+ vi.spyOn(LegalServices, 'fetchBootstrapFiling').mockImplementation((): any => {
+ return Promise.resolve({
+ filing: {
+ business: {
+ identifier: 'T123456789',
+ legalType: CorpTypeCd.CONTINUE_IN
+ },
+ header: {
+ date: '2020-05-21T00:11:55.887740+00:00',
+ effectiveDate: '2020-05-21T00:11:55.887740+00:00',
+ filingId: 789,
+ name: FilingTypes.CONTINUATION_IN,
+ status: FilingStatus.COMPLETED
+ },
+ continuationIn: {
+ nameRequest: {
+ nrNumber: 'NR 1234567',
+ legalType: CorpTypeCd.CONTINUE_IN
+ },
+ offices: BCOMP_ADDRESSES,
+ parties: BCOMP_PARTIES,
+ contactPoint: {
+ email: 'tester@test.com',
+ phone: '(123) 456-7890'
+ }
+ }
+ }
+ })
+ })
+
+ // mock "UpdateLdUser" auth service
+ vi.spyOn(utils, 'UpdateLdUser').mockImplementation((): any => {
+ return Promise.resolve()
+ })
+
+ // create a Local Vue and install router on it
+ const localVue = createLocalVue()
+ localVue.use(VueRouter)
+ const router = mockRouter.mock()
+ router.push({ name: 'dashboard' })
+
+ wrapper = shallowMount(App, { localVue, router, vuetify })
+
+ // wait for everything to settle
+ await flushPromises()
+ })
+
+ afterEach(() => {
+ wrapper.destroy()
+ })
+
+ it('fetches continuation in filing properly', () => {
+ expect(rootStore.getNameRequest).toBeNull()
+ expect(rootStore.getEntityStatus).toBe(EntityStatus.FILED_CONTINUATION_IN)
+ expect(businessStore.getIdentifier).toBe('T123456789')
+ expect(businessStore.isContinuationInC).toBe(true)
+ expect(businessStore.isGoodStanding).toBe(true)
+ expect(businessStore.getLegalName).toBeNull()
+ expect(rootStore.isFiledContinuationIn).toBe(true)
+ expect(rootStore.isBootstrapFiling).toBe(true)
+
+ // verify loaded filing
+ expect(filingHistoryListStore.filings.length).toBe(1)
+ expect(filingHistoryListStore.filings[0].businessIdentifier).toBe('T123456789')
+ expect(filingHistoryListStore.filings[0].displayName).toBe('BC Limited Company Continuation In Application')
+ expect(filingHistoryListStore.filings[0].name).toBe('continuationIn')
+ expect(filingHistoryListStore.filings[0].status).toBe('COMPLETED')
+ expect(filingHistoryListStore.filings[0].data.applicationDate).toBe('2020-05-20')
+ expect(filingHistoryListStore.filings[0].data.legalFilings).toEqual(['continuationIn'])
+ })
+})
diff --git a/tests/unit/EntityHeader.spec.ts b/tests/unit/EntityHeader.spec.ts
index ea0bb5047..daa1e94f8 100644
--- a/tests/unit/EntityHeader.spec.ts
+++ b/tests/unit/EntityHeader.spec.ts
@@ -346,6 +346,112 @@ describe('Entity Header - data', () => {
expect(wrapper.find('#entity-legal-name').text()).toBe('Numbered Limited Company')
expect(wrapper.find('#business-description').text()).toBe('BC Limited Company')
})
+
+ it('displays Draft Continuation In application entity info - Named company', async () => {
+ // set store properties
+ businessStore.setLegalName('Continued In Company')
+ rootStore.entityStatus = EntityStatus.DRAFT_CONTINUATION_IN
+ businessStore.setLegalType(CorpTypeCd.CONTINUE_IN)
+ filingHistoryListStore.setFilings([])
+ rootStore.setTasks([
+ {
+ task: {
+ filing: {
+ displayName: 'BC Limited Company Continuation In Application'
+ }
+ }
+ } as any
+ ])
+
+ const wrapper = shallowMount(EntityHeader, {
+ vuetify,
+ propsData: { businessId: null, tempRegNumber: 'T1234567' }
+ })
+ await Vue.nextTick()
+
+ expect(wrapper.find('#app-name').text()).toBe('Continued In Company')
+ expect(wrapper.find('#app-description').text()).toBe('BC Limited Company Continuation In Application')
+ })
+
+ it('displays Draft Continuation In application entity info - Numbered Company', async () => {
+ // set store properties
+ businessStore.setLegalName(null)
+ rootStore.entityStatus = EntityStatus.DRAFT_CONTINUATION_IN
+ businessStore.setLegalType(CorpTypeCd.CONTINUE_IN)
+ filingHistoryListStore.setFilings([])
+ rootStore.setTasks([
+ {
+ task: {
+ filing: {
+ displayName: 'BC Limited Company Continuation In Application'
+ }
+ }
+ } as any
+ ])
+
+ const wrapper = shallowMount(EntityHeader, {
+ vuetify,
+ propsData: { businessId: null, tempRegNumber: 'T123456789' }
+ })
+ await Vue.nextTick()
+
+ expect(wrapper.find('#app-name').text()).toBe('Numbered Limited Company')
+ expect(wrapper.find('#app-description').text()).toBe('BC Limited Company Continuation In Application')
+ })
+
+ it('displays filed named continued in company', async () => {
+ // set store properties
+ businessStore.setLegalName('Continued In Company')
+ rootStore.entityStatus = EntityStatus.FILED_CONTINUATION_IN
+ businessStore.setLegalType(CorpTypeCd.CONTINUE_IN)
+ rootStore.setTasks([])
+ filingHistoryListStore.setFilings([
+ {
+ displayLedger: true,
+ displayName: 'BC Limited Company Continuation In Application',
+ effectiveDate: '2019-06-02 19:22:59 GMT',
+ name: FilingTypes.CONTINUATION_IN,
+ status: FilingStatus.COMPLETED,
+ submittedDate: 'Sun, 02 Jun 2019 19:22:59 GMT'
+ } as any
+ ])
+
+ const wrapper = shallowMount(EntityHeader, {
+ vuetify,
+ propsData: { businessId: 'BC1234567', tempRegNumber: null }
+ })
+ await Vue.nextTick()
+
+ expect(wrapper.find('#entity-legal-name').text()).toBe('Continued In Company')
+ expect(wrapper.find('#business-description').text()).toBe('BC Limited Company')
+ })
+
+ it('displays filed numbered continued in company', async () => {
+ // set store properties
+ businessStore.setLegalName(null)
+ rootStore.entityStatus = EntityStatus.FILED_CONTINUATION_IN
+ businessStore.setLegalType(CorpTypeCd.CONTINUE_IN)
+ rootStore.setTasks([])
+ filingHistoryListStore.setFilings([
+ {
+ displayLedger: true,
+ displayName: 'BC Limited Company Continuation In Application',
+ effectiveDate: '2019-06-02 19:22:59 GMT',
+ name: FilingTypes.CONTINUATION_IN,
+ status: FilingStatus.COMPLETED,
+ submittedDate: 'Sun, 02 Jun 2019 19:22:59 GMT'
+ } as any
+ ])
+
+ const wrapper = shallowMount(EntityHeader, {
+ vuetify,
+ propsData: { businessId: null, tempRegNumber: 'T1234567' }
+ })
+ await Vue.nextTick()
+
+ expect(wrapper.find('#app-name').text()).toBe('Numbered Limited Company')
+ expect(wrapper.find('#app-description').text()).toBe('BC Limited Company Continuation In Application')
+ })
})
describe('Entity Header - HISTORICAL badge', () => {
diff --git a/tests/unit/enum-utilities.spec.ts b/tests/unit/enum-utilities.spec.ts
index 913437bf5..7c30742a1 100644
--- a/tests/unit/enum-utilities.spec.ts
+++ b/tests/unit/enum-utilities.spec.ts
@@ -24,6 +24,7 @@ describe('Enum Utilities', () => {
expect(EnumUtilities.isTypeChangeOfName({ name: 'changeOfName' })).toBe(true)
expect(EnumUtilities.isTypeChangeOfRegistration({ name: 'changeOfRegistration' })).toBe(true)
expect(EnumUtilities.isTypeConsentContinuationOut({ name: 'consentContinuationOut' })).toBe(true)
+ expect(EnumUtilities.isTypeContinuationInApplication({ name: 'continuationIn' })).toBe(true)
expect(EnumUtilities.isTypeContinuationOut({ name: 'continuationOut' })).toBe(true)
expect(EnumUtilities.isTypeConversion({ name: 'conversion' })).toBe(true)
expect(EnumUtilities.isTypeCorrection({ name: 'correction' })).toBe(true)
@@ -69,6 +70,7 @@ describe('Enum Utilities', () => {
expect(EnumUtilities.filingTypeToName(('changeOfCompanyInfo' as any))).toBe('Change of Company Information')
expect(EnumUtilities.filingTypeToName(('changeOfDirectors' as any))).toBe('Director Change')
expect(EnumUtilities.filingTypeToName(('changeOfName' as any))).toBe('Legal Name Change')
+ expect(EnumUtilities.filingTypeToName(('continuationIn' as any))).toBe('Continuation In Application')
expect(EnumUtilities.filingTypeToName(('conversion' as any))).toBe('Record Conversion')
expect(EnumUtilities.filingTypeToName(('correction' as any))).toBe('Correction')
expect(EnumUtilities.filingTypeToName(('courtOrder' as any))).toBe('Court Order')