diff --git a/package-lock.json b/package-lock.json index 68d8b9093..50ee1286b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.7.1", + "version": "5.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.7.1", + "version": "5.8.0", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", @@ -17,13 +17,13 @@ "@bcrs-shared-components/completing-party": "2.1.30", "@bcrs-shared-components/confirm-dialog": "1.2.1", "@bcrs-shared-components/contact-info": "1.2.15", - "@bcrs-shared-components/corp-type-module": "1.0.11", + "@bcrs-shared-components/corp-type-module": "1.0.15", "@bcrs-shared-components/correct-name": "1.0.36", "@bcrs-shared-components/court-order-poa": "3.0.11", "@bcrs-shared-components/date-picker": "1.2.15", "@bcrs-shared-components/document-delivery": "1.2.0", "@bcrs-shared-components/effective-date-time": "1.1.15", - "@bcrs-shared-components/enums": "1.1.5", + "@bcrs-shared-components/enums": "1.1.7", "@bcrs-shared-components/expandable-help": "1.0.1", "@bcrs-shared-components/genesys-web-message": "1.0.0", "@bcrs-shared-components/help-business-number": "1.1.1", @@ -321,9 +321,9 @@ } }, "node_modules/@bcrs-shared-components/corp-type-module": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/corp-type-module/-/corp-type-module-1.0.11.tgz", - "integrity": "sha512-+iE3qiySSafiA311m14DuoG9Rq/ranBJNT7Kf7KQ9dJFDNNuTA326pCGwKBeuT1L6pFpGeibXGE+vQ0AYnSPUA==" + "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/correct-name": { "version": "1.0.36", @@ -347,11 +347,6 @@ "vue": "^2.7.14" } }, - "node_modules/@bcrs-shared-components/correct-name/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==" - }, "node_modules/@bcrs-shared-components/court-order-poa": { "version": "3.0.11", "resolved": "https://registry.npmjs.org/@bcrs-shared-components/court-order-poa/-/court-order-poa-3.0.11.tgz", @@ -390,18 +385,13 @@ } }, "node_modules/@bcrs-shared-components/enums": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/enums/-/enums-1.1.5.tgz", - "integrity": "sha512-ZrqtDaOvKl9ZpAhGbH71z09jQJivPwwQ8h68PDSrpTjg0pMCItUmlgcwnSUs9y8gS+ezM/woipTVr2B4nMoA2Q==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/enums/-/enums-1.1.7.tgz", + "integrity": "sha512-WORgcK1YS/AssOI6sbuSQv4f13wZTQR6td7+gcghgAl34WNyO5HT0Mu2VfVGbD2zXfIYDm5jXTj2Dg6dkxpouA==", "dependencies": { - "@bcrs-shared-components/corp-type-module": "^1.0.14" + "@bcrs-shared-components/corp-type-module": "^1.0.15" } }, - "node_modules/@bcrs-shared-components/enums/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==" - }, "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", @@ -445,11 +435,6 @@ "vue": "^2.7.14" } }, - "node_modules/@bcrs-shared-components/interfaces/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==" - }, "node_modules/@bcrs-shared-components/jurisdiction": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@bcrs-shared-components/jurisdiction/-/jurisdiction-1.0.1.tgz", diff --git a/package.json b/package.json index 4cbd53846..c1d2f86b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.7.1", + "version": "5.8.0", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", @@ -22,13 +22,13 @@ "@bcrs-shared-components/completing-party": "2.1.30", "@bcrs-shared-components/confirm-dialog": "1.2.1", "@bcrs-shared-components/contact-info": "1.2.15", - "@bcrs-shared-components/corp-type-module": "1.0.11", + "@bcrs-shared-components/corp-type-module": "1.0.15", "@bcrs-shared-components/correct-name": "1.0.36", "@bcrs-shared-components/court-order-poa": "3.0.11", "@bcrs-shared-components/date-picker": "1.2.15", "@bcrs-shared-components/document-delivery": "1.2.0", "@bcrs-shared-components/effective-date-time": "1.1.15", - "@bcrs-shared-components/enums": "1.1.5", + "@bcrs-shared-components/enums": "1.1.7", "@bcrs-shared-components/expandable-help": "1.0.1", "@bcrs-shared-components/genesys-web-message": "1.0.0", "@bcrs-shared-components/help-business-number": "1.1.1", diff --git a/src/App.vue b/src/App.vue index 4b2f3955f..588d565e7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -253,9 +253,10 @@ import { CommonMixin, DateMixin, FilingTemplateMixin, NameRequestMixin } from '@ import { AccountInformationIF, AddressIF, BreadcrumbIF, BusinessWarningIF, CompletingPartyIF, ConfirmDialogType, EmptyFees, FeesIF, FilingDataIF, OrgInformationIF, PartyIF, ResourceIF, StepIF } from '@/interfaces' -import { AmalgamationRegResources, AmalgamationShortResources, DissolutionResources, IncorporationResources, - RegistrationResources, RestorationResources, getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, - getRegistryDashboardBreadcrumb, getSbcStaffDashboardBreadcrumb, getStaffDashboardBreadcrumb } from '@/resources' +import { AmalgamationRegResources, AmalgamationShortResources, ContinuationInResources, + DissolutionResources, IncorporationResources, RegistrationResources, RestorationResources, + getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, getRegistryDashboardBreadcrumb, + getSbcStaffDashboardBreadcrumb, getStaffDashboardBreadcrumb } from '@/resources' import { AuthServices, LegalServices, PayServices } from '@/services/' // Enums and Constants @@ -300,6 +301,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi // @Getter(useStore) isAmalgamationFilingHorizontal!: boolean // @Getter(useStore) isAmalgamationFilingRegular!: boolean // @Getter(useStore) isAmalgamationFilingVertical!: boolean + @Getter(useStore) isContinuationInFiling!: boolean @Getter(useStore) isDissolutionFiling!: boolean @Getter(useStore) isIncorporationFiling!: boolean @Getter(useStore) isMobile!: boolean @@ -758,6 +760,9 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi throw new Error('invalid amalgamation filing type') } return + case FilingTypes.CONTINUATION_IN: + this.$router.push(RouteNames.CONTINUATION_IN_BUSINESS_HOME).catch(() => {}) + return case FilingTypes.DISSOLUTION: if (this.isTypeFirm) { this.$router.push(RouteNames.DISSOLUTION_FIRM).catch(() => {}) @@ -920,6 +925,14 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi throw new Error('invalid amalgamation filing type') } break + case FilingTypes.CONTINUATION_IN: + draftFiling = { + ...this.buildContinuationInFiling(), + ...draftFiling + } + this.parseContinuationInDraft(draftFiling) + resources = ContinuationInResources.find(x => x.entityType === this.getEntityType) as ResourceIF + break case FilingTypes.INCORPORATION_APPLICATION: draftFiling = { ...this.buildIncorporationFiling(), @@ -1282,6 +1295,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi if ( this.isRouteName(RouteNames.AMALG_REG_REVIEW_CONFIRM) || this.isRouteName(RouteNames.AMALG_SHORT_REVIEW_CONFIRM) || + this.isRouteName(RouteNames.CONTINUATION_IN_REVIEW_CONFIRM) || this.isRouteName(RouteNames.DISSOLUTION_REVIEW_CONFIRM) || this.isRouteName(RouteNames.INCORPORATION_REVIEW_CONFIRM) || this.isRouteName(RouteNames.REGISTRATION_REVIEW_CONFIRM) || diff --git a/src/components/common/Actions.vue b/src/components/common/Actions.vue index 230032621..360052dfc 100644 --- a/src/components/common/Actions.vue +++ b/src/components/common/Actions.vue @@ -310,6 +310,8 @@ export default class Actions extends Mixins(AmalgamationMixin, CommonMixin, switch (this.getFilingType) { case FilingTypes.AMALGAMATION_APPLICATION: return this.buildAmalgamationFiling() + case FilingTypes.CONTINUATION_IN: + return this.buildContinuationInFiling() case FilingTypes.INCORPORATION_APPLICATION: return this.buildIncorporationFiling() case FilingTypes.REGISTRATION: diff --git a/src/components/common/EntityInfo.vue b/src/components/common/EntityInfo.vue index d873bc9e1..c1d3c655b 100644 --- a/src/components/common/EntityInfo.vue +++ b/src/components/common/EntityInfo.vue @@ -132,6 +132,8 @@ export default class EntityInfo extends Mixins(DateMixin) { switch (this.getFilingType) { case FilingTypes.AMALGAMATION_APPLICATION: return (this.getNameRequestApprovedName || numberedDescription) + case FilingTypes.CONTINUATION_IN: + return (this.getNameRequestApprovedName || numberedDescription) case FilingTypes.DISSOLUTION: return (this.getBusinessLegalName || numberedDescription) case FilingTypes.INCORPORATION_APPLICATION: diff --git a/src/components/common/ListPeopleAndRoles.vue b/src/components/common/ListPeopleAndRoles.vue index 970502ac3..9c064c259 100644 --- a/src/components/common/ListPeopleAndRoles.vue +++ b/src/components/common/ListPeopleAndRoles.vue @@ -22,6 +22,12 @@ :to="{ path: `/${RouteNames.AMALG_SHORT_PEOPLE_ROLES}` }" >Return to this step to finish it + Return to this step to finish it + Return to this step to finish it + Return to this step to finish it [] }) readonly shareClasses!: any @Prop({ default: false }) readonly componentDisabled!: boolean @Prop({ default: false }) readonly isAmalgamationFiling!: boolean + @Prop({ default: false }) readonly isContinuationInFiling!: boolean @Prop({ default: false }) readonly isIncorporationFiling!: boolean @Prop({ default: false }) readonly isSummary!: boolean @Prop({ default: false }) readonly showErrorSummary!: boolean diff --git a/src/components/common/Stepper.vue b/src/components/common/Stepper.vue index 04f0591b1..faff9baf7 100644 --- a/src/components/common/Stepper.vue +++ b/src/components/common/Stepper.vue @@ -102,6 +102,12 @@ export default class Stepper extends Vue { case RouteNames.AMALG_SHORT_PEOPLE_ROLES: return this.isAddPeopleAndRolesValid case RouteNames.AMALG_SHORT_REVIEW_CONFIRM: return this.isFilingValid + case RouteNames.CONTINUATION_IN_BUSINESS_HOME: return false // *** TODO + case RouteNames.CONTINUATION_IN_BUSINESS_BC: return false // *** TODO + 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 + case RouteNames.DISSOLUTION_AFFIDAVIT: return this.isAffidavitValid case RouteNames.DISSOLUTION_DEFINE_DISSOLUTION: return this.isDissolutionDefineDissolutionValid case RouteNames.DISSOLUTION_RESOLUTION: return this.isResolutionValid diff --git a/src/components/common/SummaryDefineCompany.vue b/src/components/common/SummaryDefineCompany.vue index 68861378d..13d674df0 100644 --- a/src/components/common/SummaryDefineCompany.vue +++ b/src/components/common/SummaryDefineCompany.vue @@ -31,6 +31,11 @@ >Return to this step to finish it + Return to this step to finish it + + filingData: Array + peopleAndRoles: PeopleAndRolesResourceIF + reviewAndConfirm: { + completingPartyStatement: CompletingPartyStatementIF + } +} + /** Dissolution resource interface. */ export interface DissolutionResourceIF { entityType: CorpTypeCd @@ -91,5 +103,5 @@ export interface RestorationResourceIF { } } -export interface ResourceIF extends AmalgamationResourceIF, DissolutionResourceIF, - IncorporationResourceIF, RegistrationResourceIF, RestorationResourceIF {} +export interface ResourceIF extends AmalgamationResourceIF, ContinuationInResourceIF, + DissolutionResourceIF, IncorporationResourceIF, RegistrationResourceIF, RestorationResourceIF {} diff --git a/src/interfaces/store-interfaces/state-interface.ts b/src/interfaces/store-interfaces/state-interface.ts index 77b452eec..cc6c75a33 100644 --- a/src/interfaces/store-interfaces/state-interface.ts +++ b/src/interfaces/store-interfaces/state-interface.ts @@ -7,6 +7,7 @@ import { ContactPointIF, BusinessIF, CertifyIF, + ContinuationInStateIF, CompletingPartyIF, CourtOrderStepIF, CreateMemorandumIF, @@ -73,6 +74,7 @@ export interface StateModelIF { completingParty?: CompletingPartyIF parties?: Array amalgamation: AmalgamationStateIF + continuationIn: ContinuationInStateIF restoration: RestorationStateIF // staffPaymentStep and courtOrder are common and for now are only used in dissolution 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 new file mode 100644 index 000000000..ea96274a0 --- /dev/null +++ b/src/interfaces/store-interfaces/state-interfaces/continuation-in-state-interface.ts @@ -0,0 +1,4 @@ +// TODO: Add properties as needed +export interface ContinuationInStateIF { + existingBusinessValid: boolean +} diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index 3190f7533..011b9e1e5 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -3,7 +3,7 @@ import { Getter, Action } from 'pinia-class' import { useStore } from '@/store/store' import { AmalgamationMixin, DateMixin } from '@/mixins' import { - AmalgamationFilingIF, BusinessAddressIF, ContactPointIF, CertifyIF, CompletingPartyIF, + AmalgamationFilingIF, BusinessAddressIF, ContactPointIF, CertifyIF, CompletingPartyIF, ContinuationInFilingIF, CourtOrderIF, CourtOrderStepIF, CreateMemorandumIF, CreateResolutionIF, CreateRulesIF, DefineCompanyIF, DissolutionFilingIF, DissolutionStatementIF, DocumentDeliveryIF, EffectiveDateTimeIF, EmptyContactPoint, EmptyNaics, IncorporationAgreementIF, IncorporationFilingIF, NaicsIF, NameRequestFilingIF, @@ -124,14 +124,6 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM * @returns the filing body to save */ buildAmalgamationFiling (): AmalgamationFilingIF { - function fixNullAddressType (orgPeople: OrgPersonIF[]): OrgPersonIF[] { - return orgPeople.map(p => { - if (p.deliveryAddress?.addressType === null) delete p.deliveryAddress.addressType - if (p.mailingAddress?.addressType === null) delete p.mailingAddress.addressType - return p - }) - } - // Build the main filing. const filing: AmalgamationFilingIF = { header: { @@ -163,7 +155,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM : {} }, courtApproval: this.getAmalgamationCourtApproval, - parties: fixNullAddressType(this.getAddPeopleAndRoleStep.orgPeople), + parties: this.fixNullAddressType(this.getAddPeopleAndRoleStep.orgPeople), shareStructure: { shareClasses: this.getCreateShareStructureStep.shareClasses } @@ -334,18 +326,175 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM } /** - * Builds an incorporation application filing from store data. Used when saving a filing. + * Builds an continuation in filing from store data. Used when saving a filing. * @returns the filing body to save */ - buildIncorporationFiling (): IncorporationFilingIF { - function fixNullAddressType (orgPeople: OrgPersonIF[]): OrgPersonIF[] { - return orgPeople.map(p => { - if (p.deliveryAddress?.addressType === null) delete p.deliveryAddress.addressType - if (p.mailingAddress?.addressType === null) delete p.mailingAddress.addressType - return p + buildContinuationInFiling (): ContinuationInFilingIF { + // Build the main filing. + const filing: ContinuationInFilingIF = { + header: { + name: FilingTypes.CONTINUATION_IN, + certifiedBy: this.getCertifyState.certifiedBy, + date: this.getCurrentDate, + filingId: this.getFilingId, + folioNumber: this.getFolioNumber, + isFutureEffective: this.getEffectiveDateTime.isFutureEffective + }, + business: { + legalType: this.getEntityType, + identifier: this.getTempId + }, + continuationIn: { + foreignJurisdiction: '', + nameRequest: { + legalType: this.getEntityType + }, + nameTranslations: this.getNameTranslations, + offices: this.getDefineCompanyStep.officeAddresses, + contactPoint: { + email: this.getBusinessContact.email, + phone: this.getBusinessContact.phone, + // don't save extension if it's empty + ...this.getBusinessContact.extension + ? { extension: +this.getBusinessContact.extension } + : {} + }, + parties: this.fixNullAddressType(this.getAddPeopleAndRoleStep.orgPeople), + shareStructure: { + shareClasses: this.getCreateShareStructureStep.shareClasses + } + } + } + + // Add business name data. + switch (this.getCorrectNameOption) { + case CorrectNameOptions.CORRECT_AML_ADOPT: + // save adopted name + filing.continuationIn.nameRequest.correctNameOption = CorrectNameOptions.CORRECT_AML_ADOPT + filing.continuationIn.nameRequest.legalName = this.getNameRequestApprovedName + break + case CorrectNameOptions.CORRECT_NEW_NR: + // save NR data + filing.continuationIn.nameRequest.correctNameOption = CorrectNameOptions.CORRECT_NEW_NR + filing.continuationIn.nameRequest.legalName = this.getNameRequestApprovedName + filing.continuationIn.nameRequest.nrNumber = this.getNameRequestNumber + break + case CorrectNameOptions.CORRECT_AML_NUMBERED: + filing.continuationIn.nameRequest.correctNameOption = CorrectNameOptions.CORRECT_AML_NUMBERED + break + } + + // If this is a future effective filing then save the effective date. + if (this.getEffectiveDateTime.isFutureEffective) { + filing.header.effectiveDate = this.dateToApi(this.getEffectiveDateTime.effectiveDate) + } + + if (this.isRoleStaff) { + // Add staff payment data. + this.buildStaffPayment(filing) + } + return filing + } + + /** + * Parses a draft continuation in filing into the store. Used when loading a filing. + * @param draftFiling the filing body to parse + */ + parseContinuationInDraft (draftFiling: any): void { + // save filing id + this.setFilingId(+draftFiling.header.filingId) + + // restore Entity Type + this.setEntityType(draftFiling.continuationIn.nameRequest.legalType) + + // restore Office Addresses + if (draftFiling.continuationIn.offices) { + this.setOfficeAddresses(draftFiling.continuationIn.offices) + } + + // restore business name data + const nameRequest = draftFiling.continuationIn.nameRequest as NameRequestFilingIF + switch (nameRequest?.correctNameOption) { + case CorrectNameOptions.CORRECT_AML_ADOPT: + this.setCorrectNameOption(CorrectNameOptions.CORRECT_AML_ADOPT) + // restore adopted name + this.setNameRequestApprovedName(nameRequest.legalName) + break + case CorrectNameOptions.CORRECT_NEW_NR: + this.setCorrectNameOption(CorrectNameOptions.CORRECT_NEW_NR) + // NB: do not restore Name Request data + // it will be reloaded from NR endpoint in App.vue + break + case CorrectNameOptions.CORRECT_AML_NUMBERED: + this.setCorrectNameOption(CorrectNameOptions.CORRECT_AML_NUMBERED) + break + default: + // fallback for draft created without Correct Name Option + // NB: do not restore Name Request data + // it will be reloaded from NR endpoint in App.vue + if (nameRequest.nrNumber) { + this.setCorrectNameOption(CorrectNameOptions.CORRECT_NEW_NR) + } + } + + // restore Name Translations + if (draftFiling.continuationIn.nameTranslations) { + this.setNameTranslations(draftFiling.continuationIn.nameTranslations) + } + + // restore Business Contact + if (draftFiling.continuationIn.contactPoint) { + this.setBusinessContact({ + ...draftFiling.continuationIn.contactPoint, + confirmEmail: draftFiling.continuationIn.contactPoint.email }) + } else { + this.setBusinessContact({ ...EmptyContactPoint }) } + // restore Persons and Organizations + if (draftFiling.continuationIn.parties) { + this.setOrgPersonList(draftFiling.continuationIn.parties || []) + } + + // restore Share Structure + this.setShareClasses(draftFiling.continuationIn.shareStructure + ? draftFiling.continuationIn.shareStructure.shareClasses + : []) + + // restore Certify state + this.setCertifyState({ + valid: false, + certifiedBy: draftFiling.header.certifiedBy + }) + + // restore Future Effective data + if (draftFiling.header.isFutureEffective) { + this.setIsFutureEffective(true) + const effectiveDate = this.apiToDate(draftFiling.header.effectiveDate) + // Check that Effective Date is in the future, to improve UX and + // to work around the default effective date set by the back end. + if (effectiveDate >= this.getCurrentJsDate) this.setEffectiveDate(effectiveDate) + } + + if (this.isRoleStaff) { + // restore Staff Payment data + this.parseStaffPayment(draftFiling) + } + + // if this is a premium account and Folio Number exists then restore it + if (this.isPremiumAccount) { + if (draftFiling.header.folioNumber) { + this.setFolioNumber(draftFiling.header.folioNumber) + } + } + } + + /** + * Builds an incorporation application filing from store data. Used when saving a filing. + * @returns the filing body to save + */ + buildIncorporationFiling (): IncorporationFilingIF { // Build the main filing. const filing: IncorporationFilingIF = { header: { @@ -374,7 +523,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM ? { extension: +this.getBusinessContact.extension } : {} }, - parties: fixNullAddressType(this.getAddPeopleAndRoleStep.orgPeople) + parties: this.fixNullAddressType(this.getAddPeopleAndRoleStep.orgPeople) } } @@ -1151,7 +1300,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM * @param filing the filing body to update */ // eslint-disable-next-line max-len - private buildStaffPayment (filing: AmalgamationFilingIF | DissolutionFilingIF | RegistrationFilingIF | RestorationFilingIF | IncorporationFilingIF): void { + private buildStaffPayment (filing: AmalgamationFilingIF | ContinuationInFilingIF | DissolutionFilingIF | RegistrationFilingIF | RestorationFilingIF | IncorporationFilingIF): void { // Populate Staff Payment according to payment option const staffPayment = this.getStaffPaymentStep.staffPayment switch (staffPayment.option) { @@ -1198,7 +1347,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM * @param filing the filing body to parse */ // eslint-disable-next-line max-len - private parseStaffPayment (filing: AmalgamationFilingIF | DissolutionFilingIF | RegistrationFilingIF | RestorationFilingIF | IncorporationFilingIF): void { + private parseStaffPayment (filing: AmalgamationFilingIF | ContinuationInFilingIF | DissolutionFilingIF | RegistrationFilingIF | RestorationFilingIF | IncorporationFilingIF): void { // Parse staff payment if (filing.header.routingSlipNumber) { this.setStaffPayment({ @@ -1300,4 +1449,17 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM } return toReturn } + + /** + * Fixes addresses by deleting the type in case it was null. + * @param orgPeople The array of orgs/people + * @returns the array of orgs/people after addresses been fixed + */ + fixNullAddressType (orgPeople: OrgPersonIF[]): OrgPersonIF[] { + return orgPeople.map(p => { + if (p.deliveryAddress?.addressType === null) delete p.deliveryAddress.addressType + if (p.mailingAddress?.addressType === null) delete p.mailingAddress.addressType + return p + }) + } } diff --git a/src/resources/BreadcrumbResource.ts b/src/resources/BreadcrumbResource.ts index 47ad9d11e..d1cecf430 100644 --- a/src/resources/BreadcrumbResource.ts +++ b/src/resources/BreadcrumbResource.ts @@ -15,6 +15,7 @@ function getLegalName (): string { 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 diff --git a/src/resources/ContinuationIn/BC.ts b/src/resources/ContinuationIn/BC.ts new file mode 100644 index 000000000..e19fd0065 --- /dev/null +++ b/src/resources/ContinuationIn/BC.ts @@ -0,0 +1,41 @@ +import { ContinuationInResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { ContinuationInSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const ContinuationInResourceBc: ContinuationInResourceIF = { + entityType: CorpTypeCd.BC_COMPANY, + displayName: GetCorpFullDescription(CorpTypeCd.BC_COMPANY), + steps: ContinuationInSteps, + filingData: [{ + entityType: CorpTypeCd.BC_COMPANY, + filingTypeCode: FilingCodes.CONTINUATION_IN + }], + peopleAndRoles: { + header: '1. Add People to your Application', + blurb: `Add the people who will have a role in your company. People can + have multiple roles.`, + helpSection: null, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least one Director', + test: (num) => { return (num >= 1) } + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [], + certifyClause: `Note: It is an offence to make a false or misleading statement in respect + of a material fact in a record submitted to the Corporate Registry for filing. + See section 427 of the Business Corporations Act.`, + entityDisplay: null + } + } +} diff --git a/src/resources/ContinuationIn/BEN.ts b/src/resources/ContinuationIn/BEN.ts new file mode 100644 index 000000000..813559465 --- /dev/null +++ b/src/resources/ContinuationIn/BEN.ts @@ -0,0 +1,41 @@ +import { ContinuationInResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { ContinuationInSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const ContinuationInResourceBen: ContinuationInResourceIF = { + entityType: CorpTypeCd.BENEFIT_COMPANY, + displayName: GetCorpFullDescription(CorpTypeCd.BENEFIT_COMPANY), + steps: ContinuationInSteps, + filingData: [{ + entityType: CorpTypeCd.BENEFIT_COMPANY, + filingTypeCode: FilingCodes.CONTINUATION_IN + }], + peopleAndRoles: { + header: '1. Add People to your Application', + blurb: `Add the people who will have a role in your company. People can + have multiple roles.`, + helpSection: null, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least one Director', + test: (num) => { return (num >= 1) } + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [], + certifyClause: `Note: It is an offence to make a false or misleading statement in respect + of a material fact in a record submitted to the Corporate Registry for filing. + See section 427 of the Business Corporations Act.`, + entityDisplay: null + } + } +} diff --git a/src/resources/ContinuationIn/CC.ts b/src/resources/ContinuationIn/CC.ts new file mode 100644 index 000000000..33a80bc4d --- /dev/null +++ b/src/resources/ContinuationIn/CC.ts @@ -0,0 +1,41 @@ +import { ContinuationInResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { ContinuationInSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const ContinuationInResourceCc: ContinuationInResourceIF = { + entityType: CorpTypeCd.BC_CCC, + displayName: GetCorpFullDescription(CorpTypeCd.BC_CCC), + steps: ContinuationInSteps, + filingData: [{ + entityType: CorpTypeCd.BC_CCC, + filingTypeCode: FilingCodes.CONTINUATION_IN + }], + peopleAndRoles: { + header: '1. Add People to your Application', + blurb: `Add the people who will have a role in your company. People can + have multiple roles.`, + helpSection: null, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least three Directors', + test: (num) => { return (num >= 3) } + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [], + certifyClause: `Note: It is an offence to make a false or misleading statement in respect + of a material fact in a record submitted to the Corporate Registry for filing. + See section 427 of the Business Corporations Act.`, + entityDisplay: null + } + } +} diff --git a/src/resources/ContinuationIn/ULC.ts b/src/resources/ContinuationIn/ULC.ts new file mode 100644 index 000000000..26071e045 --- /dev/null +++ b/src/resources/ContinuationIn/ULC.ts @@ -0,0 +1,41 @@ +import { ContinuationInResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { ContinuationInSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const ContinuationInResourceUlc: ContinuationInResourceIF = { + entityType: CorpTypeCd.BC_ULC_COMPANY, + displayName: GetCorpFullDescription(CorpTypeCd.BC_ULC_COMPANY), + steps: ContinuationInSteps, + filingData: [{ + entityType: CorpTypeCd.BC_ULC_COMPANY, + filingTypeCode: FilingCodes.CONTINUATION_IN + }], + peopleAndRoles: { + header: '1. Add People to your Application', + blurb: `Add the people who will have a role in your company. People can + have multiple roles.`, + helpSection: null, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least one Director', + test: (num) => { return (num >= 1) } + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [], + certifyClause: `Note: It is an offence to make a false or misleading statement in respect + of a material fact in a record submitted to the Corporate Registry for filing. + See section 427 of the Business Corporations Act.`, + entityDisplay: null + } + } +} diff --git a/src/resources/ContinuationIn/index.ts b/src/resources/ContinuationIn/index.ts new file mode 100644 index 000000000..9c794c663 --- /dev/null +++ b/src/resources/ContinuationIn/index.ts @@ -0,0 +1,4 @@ +export * from './BC' +export * from './BEN' +export * from './CC' +export * from './ULC' diff --git a/src/resources/ContinuationIn/steps.ts b/src/resources/ContinuationIn/steps.ts new file mode 100644 index 000000000..d30caf0f4 --- /dev/null +++ b/src/resources/ContinuationIn/steps.ts @@ -0,0 +1,49 @@ +import { RouteNames, Views } from '@/enums' + +/** + * The continuation in steps object. + * Currently used for BC, BEN, CC and ULC. + */ +export const ContinuationInSteps = [ + { + id: 'step-1-btn', + step: 1, + icon: 'mdi-domain-plus', + text: 'Your Business in\nHome Jurisdiction', + to: RouteNames.CONTINUATION_IN_BUSINESS_HOME, + component: Views.CONTINUATION_IN_BUSINESS_HOME + }, + { + id: 'step-2-btn', + step: 2, + icon: 'mdi-domain', + text: 'Your Business\nin B.C.', + to: RouteNames.CONTINUATION_IN_BUSINESS_BC, + component: Views.CONTINUATION_IN_BUSINESS_BC + }, + { + id: 'step-3-btn', + step: 3, + icon: 'mdi-account-multiple-plus', + text: 'Add People\nand Roles', + to: RouteNames.CONTINUATION_IN_PEOPLE_ROLES, + component: Views.CONTINUATION_IN_PEOPLE_ROLES + + }, + { + id: 'step-4-btn', + step: 4, + icon: 'mdi-sitemap', + text: 'Create Share\nStructure', + to: RouteNames.CONTINUATION_IN_SHARE_STRUCTURE, + component: Views.CONTINUATION_IN_SHARE_STRUCTURE + }, + { + id: 'step-5-btn', + step: 5, + icon: 'mdi-text-box-check-outline', + text: 'Review\nand Confirm', + to: RouteNames.CONTINUATION_IN_REVIEW_CONFIRM, + component: Views.CONTINUATION_IN_REVIEW_CONFIRM + } +] diff --git a/src/resources/index.ts b/src/resources/index.ts index 93f259320..3256d2c97 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,5 +1,6 @@ import { AmalgamationResourceIF, + ContinuationInResourceIF, DissolutionResourceIF, IncorporationResourceIF, RegistrationResourceIF, @@ -20,6 +21,13 @@ import { AmalgamationShortResourceUlc } from './AmalgamationShort/' +import { + ContinuationInResourceBc, + ContinuationInResourceBen, + ContinuationInResourceCc, + ContinuationInResourceUlc +} from './ContinuationIn/' + import { DissolutionResourceBc, DissolutionResourceBen, @@ -64,6 +72,13 @@ export const AmalgamationShortResources: Array = [ AmalgamationShortResourceUlc ] +export const ContinuationInResources: Array = [ + ContinuationInResourceBc, + ContinuationInResourceBen, + ContinuationInResourceCc, + ContinuationInResourceUlc +] + export const DissolutionResources: Array = [ DissolutionResourceBc, DissolutionResourceBen, diff --git a/src/router/routes.ts b/src/router/routes.ts index 8f9b998d5..10b0d1d5e 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -3,6 +3,7 @@ import * as Views from '@/views' import { AmalgamationRegularRoutes, AmalgamationShortRoutes, + ContinuationInRoutes, DissolutionFirmRoutes, DissolutionRoutes, IncorporationRoutes, @@ -31,6 +32,7 @@ export const routes = [ }, ...AmalgamationRegularRoutes, ...AmalgamationShortRoutes, + ...ContinuationInRoutes, ...DissolutionFirmRoutes, ...DissolutionRoutes, ...IncorporationRoutes, diff --git a/src/router/routes/continuation-in-routes.ts b/src/router/routes/continuation-in-routes.ts new file mode 100644 index 000000000..9f063e7f1 --- /dev/null +++ b/src/router/routes/continuation-in-routes.ts @@ -0,0 +1,55 @@ +import { FilingTypes, RouteNames } from '@/enums' +import * as Views from '@/views' + +export const ContinuationInRoutes = [ + { + path: '/continuation-in-business-home', + name: RouteNames.CONTINUATION_IN_BUSINESS_HOME, + component: Views.ContinuationInBusinessHome, + meta: { + step: 1, + requiresAuth: true, + filingType: FilingTypes.CONTINUATION_IN + } + }, + { + path: '/continuation-in-business-bc', + name: RouteNames.CONTINUATION_IN_BUSINESS_BC, + component: Views.ContinuationInBusinessBc, + meta: { + step: 2, + requiresAuth: true, + filingType: FilingTypes.CONTINUATION_IN + } + }, + { + path: '/continuation-in-people-roles', + name: RouteNames.CONTINUATION_IN_PEOPLE_ROLES, + component: Views.ContinuationInPeopleRoles, + meta: { + step: 3, + requiresAuth: true, + filingType: FilingTypes.CONTINUATION_IN + } + }, + { + path: '/continuation-in-share-structure', + name: RouteNames.CONTINUATION_IN_SHARE_STRUCTURE, + component: Views.ContinuationInShareStructure, + meta: { + step: 4, + requiresAuth: true, + filingType: FilingTypes.CONTINUATION_IN + } + }, + { + path: '/continuation-in-review-confirm', + name: RouteNames.CONTINUATION_IN_REVIEW_CONFIRM, + component: Views.ContinuationInReviewConfirm, + meta: { + step: 5, + requiresAuth: true, + filingType: FilingTypes.CONTINUATION_IN + } + } +] diff --git a/src/router/routes/index.ts b/src/router/routes/index.ts index fc1f88ebd..b51f9f995 100644 --- a/src/router/routes/index.ts +++ b/src/router/routes/index.ts @@ -1,5 +1,6 @@ export * from './amalgamation-regular-routes' export * from './amalgamation-short-routes' +export * from './continuation-in-routes' export * from './dissolution-routes' export * from './incorporation-routes' export * from './registration-route' diff --git a/src/store/state/state-model.ts b/src/store/state/state-model.ts index cf2aebf90..7cff6de73 100644 --- a/src/store/state/state-model.ts +++ b/src/store/state/state-model.ts @@ -213,6 +213,9 @@ export const stateModel: StateModelIF = { courtApprovalValid: false, type: null }, + continuationIn: { + existingBusinessValid: false + }, restoration: { applicationDate: null, approvalType: null, diff --git a/src/store/store.ts b/src/store/store.ts index 841163a75..1880ed793 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -113,6 +113,11 @@ export const useStore = defineStore('store', { ) }, + /** Whether the current filing is a Continuation In. */ + isContinuationInFiling (): boolean { + return (this.stateModel.tombstone.filingType === FilingTypes.CONTINUATION_IN) + }, + /** Whether the current filing is an Incorporation Application. */ isIncorporationFiling (): boolean { return (this.stateModel.tombstone.filingType === FilingTypes.INCORPORATION_APPLICATION) @@ -152,6 +157,7 @@ export const useStore = defineStore('store', { getFilingName (): FilingNames { switch (this.getFilingType) { case FilingTypes.AMALGAMATION_APPLICATION: return FilingNames.AMALGAMATION_APPLICATION + case FilingTypes.CONTINUATION_IN: return FilingNames.CONTINUATION_IN_APPLICATION case FilingTypes.INCORPORATION_APPLICATION: return FilingNames.INCORPORATION_APPLICATION case FilingTypes.REGISTRATION: return FilingNames.REGISTRATION case FilingTypes.RESTORATION: return FilingNames.RESTORATION_APPLICATION @@ -304,6 +310,7 @@ export const useStore = defineStore('store', { getEntityIdentifier (): string { switch (this.getFilingType) { case FilingTypes.AMALGAMATION_APPLICATION: return this.getTempId + case FilingTypes.CONTINUATION_IN: return this.getTempId case FilingTypes.INCORPORATION_APPLICATION: return this.getTempId case FilingTypes.REGISTRATION: return this.getTempId case FilingTypes.RESTORATION: return this.getBusinessId @@ -533,6 +540,7 @@ export const useStore = defineStore('store', { /** Whether the subject filing is valid. */ isFilingValid (): boolean { if (this.isAmalgamationFiling) return this.isAmalgamationValid + if (this.isContinuationInFiling) return this.isContinuationInValid if (this.isIncorporationFiling) return this.isIncorporationApplicationValid if (this.isDissolutionFiling) return this.isDissolutionValid if (this.isRegistrationFiling) return this.isRegistrationValid @@ -622,6 +630,27 @@ export const useStore = defineStore('store', { ) }, + /** + * Whether all the continuation in steps are valid. + * TODO: Add all the remaining checks when all components are in place. + */ + isContinuationInValid (): boolean { + const isCertifyValid = this.getCertifyState.valid && !!this.getCertifyState.certifiedBy + const isEffectiveDateTimeValid = this.getEffectiveDateTime.valid + const isFolioNumberValid = !this.isPremiumAccount || this.getFolioNumberValid + const isStaffPaymentValid = this.isRoleStaff ? this.getStaffPaymentStep.valid : true + + return ( + this.isDefineCompanyValid && + this.isAddPeopleAndRolesValid && + this.isCreateShareStructureValid && + isCertifyValid && + isEffectiveDateTimeValid && + isFolioNumberValid && + isStaffPaymentValid + ) + }, + /** Whether all the incorporation steps are valid. */ isIncorporationApplicationValid (): boolean { // Base company steps diff --git a/src/views/Amalgamation/ReviewConfirm.vue b/src/views/Amalgamation/ReviewConfirm.vue index af6f6e2e0..5315bed58 100644 --- a/src/views/Amalgamation/ReviewConfirm.vue +++ b/src/views/Amalgamation/ReviewConfirm.vue @@ -142,7 +142,7 @@

Folio or Reference Number for this Filing

- Enter the folio or reference number you want to use for this filing for you own tracking purposes. The + Enter the folio or reference number you want to use for this filing for your own tracking purposes. The Business Folio or Reference Number is displayed below (if available). Entering a different value below will not change the Business Folio or Reference Number. Only the number below will appear on the transaction report and receipt for this filing. diff --git a/src/views/ContinuationIn/ContinuationInBusinessBc.vue b/src/views/ContinuationIn/ContinuationInBusinessBc.vue new file mode 100644 index 000000000..53b534685 --- /dev/null +++ b/src/views/ContinuationIn/ContinuationInBusinessBc.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/views/ContinuationIn/ContinuationInBusinessHome.vue b/src/views/ContinuationIn/ContinuationInBusinessHome.vue new file mode 100644 index 000000000..87e20e25f --- /dev/null +++ b/src/views/ContinuationIn/ContinuationInBusinessHome.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/src/views/ContinuationIn/ContinuationInPeopleRoles.vue b/src/views/ContinuationIn/ContinuationInPeopleRoles.vue new file mode 100644 index 000000000..48397a030 --- /dev/null +++ b/src/views/ContinuationIn/ContinuationInPeopleRoles.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/views/ContinuationIn/ContinuationInReviewConfirm.vue b/src/views/ContinuationIn/ContinuationInReviewConfirm.vue new file mode 100644 index 000000000..980b4a1a9 --- /dev/null +++ b/src/views/ContinuationIn/ContinuationInReviewConfirm.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/ContinuationIn/ContinuationInShareStructure.vue b/src/views/ContinuationIn/ContinuationInShareStructure.vue new file mode 100644 index 000000000..2a6e0ee7b --- /dev/null +++ b/src/views/ContinuationIn/ContinuationInShareStructure.vue @@ -0,0 +1,393 @@ + + + + + diff --git a/src/views/index.ts b/src/views/index.ts index c56dbc693..ef9b4db83 100644 --- a/src/views/index.ts +++ b/src/views/index.ts @@ -12,6 +12,12 @@ export { default as AmalgamationPeopleRoles } from './Amalgamation/PeopleRoles.v export { default as AmalgamationReviewConfirm } from './Amalgamation/ReviewConfirm.vue' export { default as AmalgamationShareStructure } from './Amalgamation/ShareStructure.vue' +export { default as ContinuationInBusinessHome } from './ContinuationIn/ContinuationInBusinessHome.vue' +export { default as ContinuationInBusinessBc } from './ContinuationIn/ContinuationInBusinessBc.vue' +export { default as ContinuationInPeopleRoles } from './ContinuationIn/ContinuationInPeopleRoles.vue' +export { default as ContinuationInReviewConfirm } from './ContinuationIn/ContinuationInReviewConfirm.vue' +export { default as ContinuationInShareStructure } from './ContinuationIn/ContinuationInShareStructure.vue' + export { default as DissolutionAffidavit } from './Dissolution/DissolutionAffidavit.vue' export { default as DissolutionDefineDissolution } from './Dissolution/DissolutionDefineDissolution.vue' export { default as DissolutionResolution } from './Dissolution/DissolutionResolution.vue'