From b3e6512f8b9670365bb9fe57341fca9af005254b Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Thu, 16 Nov 2023 11:32:55 -0800 Subject: [PATCH] - app version = 5.6.1 - added route names to enum - added views to enum - added filing interface - added resource interface - updated state interface - added amalgamation state interface - updated filing template mixin - added initial amalgamation resources - added amalgamation steps - added amalgamation routes - added/updated getters/actions to store - updated state model - added initial amalgamation views --- package-lock.json | 4 +- package.json | 2 +- src/App.vue | 6 +- src/enums/index.ts | 1 + src/enums/routeNames.ts | 7 + src/enums/views.ts | 7 + .../filing-interfaces/filing-interfaces.ts | 46 +- src/interfaces/index.ts | 1 + .../resource-interfaces/resource-interface.ts | 31 +- .../store-interfaces/state-interface.ts | 2 + .../amalgamation-state-interface.ts | 15 + src/mixins/filing-template-mixin.ts | 189 +++++++- src/resources/AmalgamationRegular/BC.ts | 91 ++++ src/resources/AmalgamationRegular/BEN.ts | 131 ++++++ src/resources/AmalgamationRegular/CC.ts | 102 +++++ src/resources/AmalgamationRegular/ULC.ts | 101 +++++ src/resources/AmalgamationRegular/index.ts | 4 + src/resources/AmalgamationRegular/steps.ts | 49 ++ src/resources/index.ts | 23 +- src/router/routes.ts | 57 ++- src/store/state/state-model.ts | 14 + src/store/store.ts | 49 +- .../AmalgRegBusinessInfo.vue | 426 ++++++++++++++++++ .../AmalgRegInformation.vue | 426 ++++++++++++++++++ .../AmalgRegPeopleRoles.vue | 76 ++++ .../AmalgRegReviewConfirm.vue | 334 ++++++++++++++ .../AmalgRegShareStructure.vue | 393 ++++++++++++++++ .../Restoration/RestorationBusinessName.vue | 4 +- src/views/index.ts | 6 + 29 files changed, 2567 insertions(+), 30 deletions(-) create mode 100644 src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts create mode 100644 src/resources/AmalgamationRegular/BC.ts create mode 100644 src/resources/AmalgamationRegular/BEN.ts create mode 100644 src/resources/AmalgamationRegular/CC.ts create mode 100644 src/resources/AmalgamationRegular/ULC.ts create mode 100644 src/resources/AmalgamationRegular/index.ts create mode 100644 src/resources/AmalgamationRegular/steps.ts create mode 100644 src/views/AmalgamationRegular/AmalgRegBusinessInfo.vue create mode 100644 src/views/AmalgamationRegular/AmalgRegInformation.vue create mode 100644 src/views/AmalgamationRegular/AmalgRegPeopleRoles.vue create mode 100644 src/views/AmalgamationRegular/AmalgRegReviewConfirm.vue create mode 100644 src/views/AmalgamationRegular/AmalgRegShareStructure.vue diff --git a/package-lock.json b/package-lock.json index e667cf63e..2afe243c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.6.0", + "version": "5.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.6.0", + "version": "5.6.1", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index cb62c9b71..8de5eba61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.6.0", + "version": "5.6.1", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", diff --git a/src/App.vue b/src/App.vue index 585bf1694..1b45ebc26 100644 --- a/src/App.vue +++ b/src/App.vue @@ -295,6 +295,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi @Getter(useStore) getUserLastName!: string @Getter(useStore) getUserEmail!: string @Getter(useStore) getUserPhone!: string + @Getter(useStore) isAmalgamationFiling!: boolean @Getter(useStore) isDissolutionFiling!: boolean @Getter(useStore) isIncorporationFiling!: boolean @Getter(useStore) isMobile!: boolean @@ -361,7 +362,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi readonly window = window /** The Update Current JS Date timer id. */ - private updateCurrentJsDateId = 0 + private updateCurrentJsDateId = null // may be number or NodeJS.Timeout /** The route breadcrumbs list. */ get breadcrumbs (): Array { @@ -733,6 +734,9 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi // then try to re-route them if (this.$route.meta.filingType !== this.getFilingType) { switch (this.getFilingType) { + case FilingTypes.AMALGAMATION: + this.$router.push(RouteNames.AMALGAMATION_REG_INFORMATION).catch(() => {}) + return case FilingTypes.DISSOLUTION: if (this.isTypeFirm) { this.$router.push(RouteNames.DISSOLUTION_FIRM).catch(() => {}) diff --git a/src/enums/index.ts b/src/enums/index.ts index 60629de01..2deb1021f 100644 --- a/src/enums/index.ts +++ b/src/enums/index.ts @@ -20,6 +20,7 @@ export { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' export { AccountTypes, ApprovalTypes, + AmalgamationTypes, CorrectNameOptions, EffectiveDateTypes, EntityStates, diff --git a/src/enums/routeNames.ts b/src/enums/routeNames.ts index fe1e34ef5..e1b0c26bf 100644 --- a/src/enums/routeNames.ts +++ b/src/enums/routeNames.ts @@ -34,4 +34,11 @@ export enum RouteNames { RESTORATION_BUSINESS_INFORMATION = 'restoration-business-information', RESTORATION_BUSINESS_NAME = 'restoration-business-name', RESTORATION_REVIEW_CONFIRM = 'restoration-review-confirm', + + // Amalgamation (regular) route names + AMALGAMATION_REG_BUSINESS_INFO = 'amalgamation-reg-business-info', + AMALGAMATION_REG_INFORMATION = 'amalgamation-reg-information', + AMALGAMATION_REG_PEOPLE_ROLES = 'amalgamation-reg-people-roles', + AMALGAMATION_REG_REVIEW_CONFIRM = 'amalgamation-reg-review-confirm', + AMALGAMATION_REG_SHARE_STRUCTURE = 'amalgamation-reg-share-structure', } diff --git a/src/enums/views.ts b/src/enums/views.ts index 4049ed370..ecc73959a 100644 --- a/src/enums/views.ts +++ b/src/enums/views.ts @@ -6,6 +6,13 @@ export enum Views { SIGN_IN = 'signin', SIGN_OUT = 'signout', + // Amalgamation views + AMALGAMATION_REG_BUSINESS_INFO = 'amalgamation-reg-business-info', + AMALGAMATION_REG_INFORMATION = 'amalgamation-reg-information', + AMALGAMATION_REG_PEOPLE_ROLES = 'amalgamation-reg-people-roles', + AMALGAMATION_REG_REVIEW_CONFIRM = 'amalgamation-reg-review-confirm', + AMALGAMATION_REG_SHARE_STRUCTURE = 'amalgamation-reg-share-structure', + // Dissolution views DISSOLUTION_AFFIDAVIT = 'dissolution-affidavit', DISSOLUTION_DEFINE_DISSOLUTION = 'dissolution-define-dissolution', diff --git a/src/interfaces/filing-interfaces/filing-interfaces.ts b/src/interfaces/filing-interfaces/filing-interfaces.ts index b8528661c..930c226f9 100644 --- a/src/interfaces/filing-interfaces/filing-interfaces.ts +++ b/src/interfaces/filing-interfaces/filing-interfaces.ts @@ -1,7 +1,7 @@ import { BusinessAddressIF, CourtOrderIF, RegisteredRecordsAddressesIF, NaicsIF, NameTranslationIF, OfficeAddressIF, PartyIF, ShareClassIF, SpecialResolutionIF } from '@/interfaces' -import { ApprovalTypes, BusinessTypes, DissolutionStatementTypes, DissolutionTypes, FilingTypes, - RestorationTypes, RelationshipTypes } from '@/enums' +import { AmalgamationTypes, ApprovalTypes, BusinessTypes, DissolutionStatementTypes, DissolutionTypes, + FilingTypes, RestorationTypes, RelationshipTypes } from '@/enums' import { CorrectNameOptions } from '@bcrs-shared-components/enums/' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/' import { ContactPointIF } from '@bcrs-shared-components/interfaces' @@ -18,6 +18,48 @@ export interface NameRequestFilingIF { correctNameOption?: CorrectNameOptions // only used by UI for save and resume } +/** Interface for amalgamation filing data saved to the Legal API. */ +export interface AmalgamationFilingIF { + header: { + name: FilingTypes + certifiedBy: string + date: string + effectiveDate?: string // should be set only for future effective filings + filingId?: number // for existing filings (not used when building a new filing) + folioNumber?: string // only displayed for certain account types + isFutureEffective: boolean + + // staff payment properties: + routingSlipNumber?: string + bcolAccountNumber?: string + datNumber?: string + waiveFees?: boolean + priority?: boolean + } + business: { + legalType: CorpTypeCd + identifier: string + } + amalgamation: { + amalgamationType: AmalgamationTypes + nameRequest: NameRequestFilingIF + nameTranslations: NameTranslationIF[] + offices: RegisteredRecordsAddressesIF | object + contactPoint: ContactPointIF + parties: PartyIF[] + + // BEN / CC / BC / ULC only: + shareStructure?: { + shareClasses: ShareClassIF[] + } + incorporationAgreement?: { + agreementType: string + } + // ULC only: + courtOrder?: CourtOrderIF + } +} + /** Interface for incorporation filing data saved to the Legal API. */ export interface IncorporationFilingIF { header: { diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index efe4a82e3..f4109fd0c 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -45,6 +45,7 @@ export * from './stepper-interfaces/ReviewConfirm/certify-interface' // Store interfaces export * from './store-interfaces/state-interfaces/account-information-interface' +export * from './store-interfaces/state-interfaces/amalgamation-state-interface' export * from './store-interfaces/state-interfaces/auth-information-interface' export * from './store-interfaces/state-interfaces/business-interface' export * from './store-interfaces/state-interfaces/dissolution-state-interface' diff --git a/src/interfaces/resource-interfaces/resource-interface.ts b/src/interfaces/resource-interfaces/resource-interface.ts index fbd6267a4..6c3d7fa3d 100644 --- a/src/interfaces/resource-interfaces/resource-interface.ts +++ b/src/interfaces/resource-interfaces/resource-interface.ts @@ -5,6 +5,33 @@ import { } from '@/interfaces' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' +/** Amalgamation (regular) resource interface. */ +export interface AmalgamationRegResourceIF { + entityType: CorpTypeCd + displayName: string + steps: Array + filingData: Array + peopleAndRoles: PeopleAndRolesResourceIF + reviewAndConfirm: { + completingPartyStatement: CompletingPartyStatementIF + } + + shareClasses?: { + countMinimum: number + } + incorporationArticles?: { + articles: string, + articlesTooltip: string, + provisions?: string, + provisionTooltip?: string + } + incorporationAgreement?: { + helpSection: Array + article: string + documents: Array + } +} + /** Dissolution resource interface. */ export interface DissolutionResourceIF { entityType: CorpTypeCd @@ -79,5 +106,5 @@ export interface RestorationResourceIF { } } -export interface ResourceIF extends DissolutionResourceIF, IncorporationResourceIF, RegistrationResourceIF, - RestorationResourceIF {} +export interface ResourceIF extends AmalgamationRegResourceIF, DissolutionResourceIF, + IncorporationResourceIF, RegistrationResourceIF, RestorationResourceIF {} diff --git a/src/interfaces/store-interfaces/state-interface.ts b/src/interfaces/store-interfaces/state-interface.ts index 08e1b902d..e806d224f 100644 --- a/src/interfaces/store-interfaces/state-interface.ts +++ b/src/interfaces/store-interfaces/state-interface.ts @@ -2,6 +2,7 @@ import { CorrectNameOptions } from '@bcrs-shared-components/enums/' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' import { AccountInformationIF, + AmalgamationStateIF, ContactPointIF, BusinessIF, CertifyIF, @@ -71,6 +72,7 @@ export interface StateModelIF { registration: RegistrationStateIF completingParty?: CompletingPartyIF parties?: Array + amalgamation: AmalgamationStateIF restoration: RestorationStateIF // staffPaymentStep and courtOrder are common and for now are only used in dissolution diff --git a/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts b/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts new file mode 100644 index 000000000..9baffe388 --- /dev/null +++ b/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts @@ -0,0 +1,15 @@ +import { AmalgamationTypes, ApprovalTypes, RelationshipTypes } from '@/enums' +import { CourtOrderIF } from '@/interfaces' + +export interface AmalgamationStateIF { + applicationDate?: string // YYYY-MM-DD + approvalType: ApprovalTypes + approvalTypeValid: boolean + businessNameValid: boolean + courtOrder?: CourtOrderIF + expiry?: string // YYYY-MM-DD + noticeDate?: string // YYYY-MM-DD + relationships?: RelationshipTypes[] + restorationTypeValid: boolean + type: AmalgamationTypes +} diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index a10fd59f5..9938889d9 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -3,18 +3,17 @@ import { Getter, Action } from 'pinia-class' import { useStore } from '@/store/store' import { DateMixin } from '@/mixins' import { - BusinessAddressIF, ContactPointIF, CertifyIF, CompletingPartyIF, CourtOrderIF, CourtOrderStepIF, - CreateMemorandumIF, CreateResolutionIF, CreateRulesIF, DefineCompanyIF, DissolutionFilingIF, - DissolutionStatementIF, DocumentDeliveryIF, EffectiveDateTimeIF, EmptyNaics, IncorporationAgreementIF, - IncorporationFilingIF, NaicsIF, NameRequestFilingIF, NameTranslationIF, OfficeAddressIF, OrgPersonIF, PartyIF, - PeopleAndRoleIF, RegisteredRecordsAddressesIF, RegistrationFilingIF, RegistrationStateIF, RestorationFilingIF, - RestorationStateIF, ShareClassIF, ShareStructureIF, SpecialResolutionIF, StaffPaymentIF, StaffPaymentStepIF, - UploadAffidavitIF + AmalgamationFilingIF, BusinessAddressIF, ContactPointIF, CertifyIF, CompletingPartyIF, CourtOrderIF, + CourtOrderStepIF, CreateMemorandumIF, CreateResolutionIF, CreateRulesIF, DefineCompanyIF, + DissolutionFilingIF, DissolutionStatementIF, DocumentDeliveryIF, EffectiveDateTimeIF, EmptyNaics, + IncorporationAgreementIF, IncorporationFilingIF, NaicsIF, NameRequestFilingIF, NameTranslationIF, + OfficeAddressIF, OrgPersonIF, PartyIF, PeopleAndRoleIF, RegisteredRecordsAddressesIF, + RegistrationFilingIF, RegistrationStateIF, RestorationFilingIF, RestorationStateIF, ShareClassIF, + ShareStructureIF, SpecialResolutionIF, StaffPaymentIF, StaffPaymentStepIF, UploadAffidavitIF } from '@/interfaces' -import { ApprovalTypes, BusinessTypes, CoopTypes, DissolutionTypes, EffectOfOrders, FilingTypes, - PartyTypes, RelationshipTypes, RestorationTypes, RoleTypes, StaffPaymentOptions +import { AmalgamationTypes, ApprovalTypes, BusinessTypes, CoopTypes, CorrectNameOptions, DissolutionTypes, + EffectOfOrders, FilingTypes, PartyTypes, RelationshipTypes, RestorationTypes, RoleTypes, StaffPaymentOptions } from '@/enums' -import { CorrectNameOptions } from '@bcrs-shared-components/enums/' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/' /** @@ -24,6 +23,7 @@ import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/' export default class FilingTemplateMixin extends Mixins(DateMixin) { @Getter(useStore) getAddPeopleAndRoleStep!: PeopleAndRoleIF @Getter(useStore) getAffidavitStep!: UploadAffidavitIF + @Getter(useStore) getAmalgamationType!: AmalgamationTypes @Getter(useStore) getBusinessContact!: ContactPointIF @Getter(useStore) getBusinessFoundingDate!: string @Getter(useStore) getBusinessId!: string @@ -116,6 +116,167 @@ export default class FilingTemplateMixin extends Mixins(DateMixin) { @Action(useStore) setBusinessStartDate!: (x: string) => void @Action(useStore) setTransactionalFolioNumber!: (x: string) => void + /** + * Builds an amalgamation filing from store data. Used when saving a filing. + * @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: { + name: FilingTypes.AMALGAMATION, + certifiedBy: this.getCertifyState.certifiedBy, + date: this.getCurrentDate, + filingId: this.getFilingId, + folioNumber: this.getFolioNumber, + isFutureEffective: this.getEffectiveDateTime.isFutureEffective + }, + business: { + legalType: this.getEntityType, + identifier: this.getTempId + }, + amalgamation: { + amalgamationType: this.getAmalgamationType, + 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: fixNullAddressType(this.getAddPeopleAndRoleStep.orgPeople) + } + } + + filing.amalgamation.shareStructure = { + shareClasses: this.getCreateShareStructureStep.shareClasses + } + filing.amalgamation.incorporationAgreement = { + agreementType: this.getIncorporationAgreementStep.agreementType + } + + const courtOrder = this.getCourtOrderStep.courtOrder + if (courtOrder && (courtOrder.hasPlanOfArrangement || courtOrder.fileNumber)) { + filing.amalgamation.courtOrder = { + fileNumber: courtOrder.fileNumber, + effectOfOrder: courtOrder.hasPlanOfArrangement ? EffectOfOrders.PLAN_OF_ARRANGEMENT : '', + hasPlanOfArrangement: courtOrder.hasPlanOfArrangement + } + } + + // If this is a named IA then add Name Request Number and Approved Name. + if (this.getNameRequestNumber) { + filing.amalgamation.nameRequest.nrNumber = this.getNameRequestNumber + filing.amalgamation.nameRequest.legalName = this.getNameRequestApprovedName + } + + // 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 amalgamation filing into the store. Used when loading a filing. + * @param draftFiling the filing body to parse + */ + parseAmalgamationDraft (draftFiling: any): void { + // FUTURE: set types so each of these validate their parameters + // ref: https://www.typescriptlang.org/docs/handbook/generics.html + + // NB: don't parse Name Request object -- NR is fetched from namex/NRO instead + + // save filing id + this.setFilingId(+draftFiling.header.filingId) + + // restore Entity Type + this.setEntityType(draftFiling.amalgamation.nameRequest.legalType) + + // restore Office Addresses + this.setOfficeAddresses(draftFiling.amalgamation.offices) + + // restore Name Translations + if (draftFiling.amalgamation.nameTranslations) { + this.setNameTranslations(draftFiling.amalgamation.nameTranslations) + } + + // restore Contact Info + this.setBusinessContact({ + ...draftFiling.amalgamation.contactPoint, + confirmEmail: draftFiling.amalgamation.contactPoint.email + }) + + // restore Persons and Organizations + if (draftFiling.amalgamation.parties) { + this.setOrgPersonList(draftFiling.amalgamation.parties) + } + + // restore Share Structure + this.setShareClasses(draftFiling.amalgamation.shareStructure + ? draftFiling.amalgamation.shareStructure.shareClasses + : []) + + // restore Incorporation Agreement + this.setIncorporationAgreementStepData({ + agreementType: draftFiling.amalgamation.incorporationAgreement?.agreementType, + valid: false + }) + // set court order fields + if (draftFiling.amalgamation.courtOrder?.fileNumber) { + this.setCourtOrderFileNumber(draftFiling.amalgamation.courtOrder.fileNumber) + } + if (draftFiling.amalgamation.courtOrder?.hasPlanOfArrangement) { + this.setHasPlanOfArrangement(draftFiling.amalgamation.courtOrder.hasPlanOfArrangement) + } + + // 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 filing from store data. Used when saving a filing. * @returns the filing body to save @@ -933,8 +1094,8 @@ export default class FilingTemplateMixin extends Mixins(DateMixin) { * Builds dissolution staff payment data from store data. * @param filing the filing body to update */ - private buildStaffPayment ( - filing: DissolutionFilingIF | RegistrationFilingIF | RestorationFilingIF | IncorporationFilingIF + private buildStaffPayment (filing: AmalgamationFilingIF | DissolutionFilingIF | RegistrationFilingIF | + RestorationFilingIF | IncorporationFilingIF ): void { // Populate Staff Payment according to payment option const staffPayment = this.getStaffPaymentStep.staffPayment @@ -981,8 +1142,8 @@ export default class FilingTemplateMixin extends Mixins(DateMixin) { * Parses dissolution staff payment data into the store. * @param filing the filing body to parse */ - private parseStaffPayment ( - filing: DissolutionFilingIF | RegistrationFilingIF | RestorationFilingIF | IncorporationFilingIF + private parseStaffPayment (filing: AmalgamationFilingIF | DissolutionFilingIF | RegistrationFilingIF | + RestorationFilingIF | IncorporationFilingIF ): void { // Parse staff payment if (filing.header.routingSlipNumber) { diff --git a/src/resources/AmalgamationRegular/BC.ts b/src/resources/AmalgamationRegular/BC.ts new file mode 100644 index 000000000..75b425602 --- /dev/null +++ b/src/resources/AmalgamationRegular/BC.ts @@ -0,0 +1,91 @@ +import { AmalgamationRegResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { AmalgamationRegularSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const AmalgamationRegResourceBc: AmalgamationRegResourceIF = { + entityType: CorpTypeCd.BC_COMPANY, + displayName: GetCorpFullDescription(CorpTypeCd.BC_COMPANY), + steps: AmalgamationRegularSteps, + filingData: [{ + entityType: CorpTypeCd.BC_COMPANY, + filingTypeCode: FilingCodes.INCORPORATION_BC + }], + peopleAndRoles: { + header: '1. Add People or Corporations/Firms to your Application', + blurb: `Add the people and Corporations/firms who will have a role in your company. People + can have multiple roles; Corporations/firms can only be Incorporators.`, + helpSection: null, + addIncorporator: true, + addOrganization: true, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_INCORPORATORS, + text: 'At least one Incorporator', + test: (num) => { return (num >= 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least one Director', + test: (num) => { return (num >= 1) } + } + ] + }, + shareClasses: { + countMinimum: 1 + }, + incorporationArticles: { + articles: '
BC LTD Articles.', // Line break is required to prevent tooltip from splitting the screen. + articlesTooltip: 'Articles should outline the rules and procedures for corporate matters such as holding ' + + 'meetings, issuing and transferring shares, and duties of directors and officers.' + }, + incorporationAgreement: { + helpSection: [ + { + header: 'What is the sample Incorporation Agreement and Company Articles?', + helpText: [ + `The sample Incorporation Agreement and Company Articles is a template that you can use to create an + incorporation agreement and articles for your company. It uses all the standard provisions by legislation. + There are three types of samples depending on if you're incorporating a Limited Company, a Benefit Company, + or a Community Contribution Company.`, + `If you would like to customize any other provisions in the Articles, you cannot use these samples. + We recommend seeking professional assistance from a lawyer or accountant to help you prepare your articles.` + ] + } + ], + article: 'bc_limited_company_incorporation_agreement.pdf', + documents: [ + { + code: 'sample', + description: 'The sample Incorporation Agreement and Articles ' + + 'has been completed and a copy has been added to the company\'s record book.' + }, + { + code: 'custom', + description: 'The custom Incorporation Agreement and custom Articles ' + + 'has been completed and a copy has been added to the company\'s record book.' + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [ + 'An original signature has been placed on each of those signature lines,', + + `I have no reason to believe that the signature placed on a signature line is not the + signature of the person whose name is set out under that signature line, and`, + + 'I have relevant knowledge of the company and that I am authorized to make this filing.' + ], + 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/AmalgamationRegular/BEN.ts b/src/resources/AmalgamationRegular/BEN.ts new file mode 100644 index 000000000..7b570826a --- /dev/null +++ b/src/resources/AmalgamationRegular/BEN.ts @@ -0,0 +1,131 @@ +import { AmalgamationRegResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { AmalgamationRegularSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const AmalgamationRegResourceBen: AmalgamationRegResourceIF = { + entityType: CorpTypeCd.BENEFIT_COMPANY, + displayName: GetCorpFullDescription(CorpTypeCd.BENEFIT_COMPANY), + steps: AmalgamationRegularSteps, + filingData: [{ + entityType: CorpTypeCd.BENEFIT_COMPANY, + filingTypeCode: FilingCodes.INCORPORATION_BEN + }], + peopleAndRoles: { + header: '1. Add People or Corporations/Firms to your Application', + blurb: `Add the people and Corporations/firms who will have a role in your company. People + can have multiple roles; Corporations/firms can only be Incorporators.`, + helpSection: null, + addIncorporator: true, + addOrganization: true, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_INCORPORATORS, + text: 'At least one Incorporator', + test: (num) => { return (num >= 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least one Director', + test: (num) => { return (num >= 1) } + } + ] + }, + shareClasses: { + countMinimum: 1 + }, + incorporationArticles: { + articles: 'Benefit Company Articles', + articlesTooltip: 'The Articles for a Benefit Company must state the benefits the company intends to provide to ' + + 'society, as well as outlining the rules and procedures for corporate matters such as holding meetings, ' + + 'issuing and transferring shares, and duties of directors and officers.', + provisions: ' benefit provision', + provisionTooltip: 'Clauses in the Articles which specify the public benefits to be promoted by the Benefit ' + + 'Company and the company\'s commitment to promote those benefits and to conduct business in a responsible and ' + + 'sustainable manner.' + }, + incorporationAgreement: { + helpSection: [ + { + header: 'What is the sample Incorporation Agreement and Benefit Company Articles?', + helpText: [ + `The sample Incorporation Agreement and Benefit Company Articles is a template that you can use + to create an incorporation agreement and articles for your company. It uses all the standard + provisions suggested by legislation and also includes a place to specify the company's benefit + provision.`, + `If you would like to customize any other provisions in the Articles, you cannot use this sample. We + recommend seeking professional assistance from a lawyer or accountant to help you prepare your Articles.` + ] + }, + { + header: 'What is a Benefit Provision?', + helpText: [ + `A Benefit Provision is a statement by the company of its public benefits and its commitments to promote + those public benefits and to conduct business in a responsible and sustainable manner.`, + 'A Benefit Company must include a benefit provision in its Articles.' + ] + }, + { + header: 'Can I use the sample Incorporation Agreement and Benefit Company Articles?' + }, + { + header: 'You can use the sample Articles if:', + icon: 'mdi-check', + iconColor: 'green darken-2', + statements: [ + `There are no special rights or restrictions attached to any class or series of shares in + the corporation’s authorized share structure.`, + 'You do not wish to change any of the standard provisions in the sample Articles.' + ] + }, + { + header: 'You cannot use the sample Articles if:', + icon: 'mdi-close', + iconColor: 'red', + statements: [ + `There are special rights or restrictions attached to any class or series of shares in the corporation's + authorized share structure.`, + 'You wish to change any of the standard provisions in the sample Articles.' + ] + } + ], + article: 'benefit_company_incorporation_agreement.pdf', + documents: [ + { + code: 'sample', + description: 'The sample Incorporation Agreement and Articles containing a benefit provision ' + + 'has been completed and a copy has been added to the company\'s record book.' + }, + { + code: 'custom', + description: 'The custom Incorporation Agreement and custom Articles containing a benefit provision ' + + 'has been completed and a copy has been added to the company\'s record book.' + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [ + `The Company Articles and the Incorporation Agreement both contain a signature + line for each person identified as an incorporator in the Incorporation Application + with the name of that person set out legibly under the signature line,`, + + 'An original signature has been placed on each of those signature lines,', + + `I have no reason to believe that the signature placed on a signature line is not the + signature of the person whose name is set out under that signature line, and`, + + 'I have relevant knowledge of the company and that I am authorized to make this filing.' + ], + 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/AmalgamationRegular/CC.ts b/src/resources/AmalgamationRegular/CC.ts new file mode 100644 index 000000000..e4cc0434c --- /dev/null +++ b/src/resources/AmalgamationRegular/CC.ts @@ -0,0 +1,102 @@ +import { AmalgamationRegResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { AmalgamationRegularSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const AmalgamationRegResourceCc: AmalgamationRegResourceIF = { + entityType: CorpTypeCd.BC_CCC, + displayName: GetCorpFullDescription(CorpTypeCd.BC_CCC), + steps: AmalgamationRegularSteps, + filingData: [{ + entityType: CorpTypeCd.BC_CCC, + filingTypeCode: FilingCodes.INCORPORATION_CC + }], + peopleAndRoles: { + header: '1. Add People or Corporations/Firms to your Application', + blurb: `Add the people and Corporations/firms who will have a role in your company. People + can have multiple roles; Corporations/firms can only be Incorporators.`, + helpSection: null, + addIncorporator: true, + addOrganization: true, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_INCORPORATORS, + text: 'At least one Incorporator', + test: (num) => { return (num >= 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least three Directors', + test: (num) => { return (num >= 3) } + } + ] + }, + shareClasses: { + countMinimum: 1 + }, + incorporationArticles: { + articles: 'Community Contribution Company Articles', + articlesTooltip: 'The Articles for a Community Contribution Company must include the following statements “This ' + + 'company is a community contribution company, and, as such, has purposes beneficial to society. This company is ' + + 'restricted, in accordance with Part 2.2 of the Business Corporations Act, in its ability to pay dividends and ' + + 'to distribute its assets on dissolution or otherwise.” Articles should also outline the rules and procedures ' + + 'for corporate matters such as holding meetings, issuing and transferring shares, and duties of directors ' + + 'and officers.', + provisions: 'community provision', + provisionTooltip: 'A clause in the Articles which communicates the liability statement required by the Business ' + + 'Corporations Act 51.11.' + }, + incorporationAgreement: { + helpSection: [ + { + header: 'What is the sample Incorporation Agreement and Company Articles?', + helpText: [ + `The sample Incorporation Agreement and Company Articles is a template that you can use to create an + Incorporation Agreement and articles for your company. It uses all the standard provisions by legislation. + There are three types of samples depending on if you're incorporating a Limited Company, a Benefit Company, + Unlimited Liability Company, or a Community Contribution Company.`, + `If you would like to customize any other provisions in the Articles, you cannot use these samples. + We recommend seeking professional assistance from a lawyer or accountant to help you prepare your articles.` + ] + }, + { + header: 'What is a Community Provision?', + helpText: [ + `A Community Provision is a statement by the company of its benefits to society and its restrictions in its + ability to pay dividends and distribute assets.`, + `A Community Contribution Company must include a community provision in its Articles.` + ] + } + ], + article: 'community_contribution_company_incorporation_agreement.pdf', + documents: [ + { + code: 'custom', + description: 'The custom Incorporation Agreement and custom Articles containing the community' + + ' provision required by the Business Corporations Act 51.911 has been completed and a copy has been added' + + ' to the company\'s record book.' + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [ + 'An original signature has been placed on each of those signature lines,', + + `I have no reason to believe that the signature placed on a signature line is not the + signature of the person whose name is set out under that signature line, and`, + + 'I have relevant knowledge of the company and that I am authorized to make this filing.' + ], + 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/AmalgamationRegular/ULC.ts b/src/resources/AmalgamationRegular/ULC.ts new file mode 100644 index 000000000..4e38c8f90 --- /dev/null +++ b/src/resources/AmalgamationRegular/ULC.ts @@ -0,0 +1,101 @@ +import { AmalgamationRegResourceIF } from '@/interfaces' +import { FilingCodes, RuleIds } from '@/enums' +import { AmalgamationRegularSteps } from './steps' +import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' + +export const AmalgamationRegResourceUlc: AmalgamationRegResourceIF = { + entityType: CorpTypeCd.BC_ULC_COMPANY, + displayName: GetCorpFullDescription(CorpTypeCd.BC_ULC_COMPANY), + steps: AmalgamationRegularSteps, + filingData: [{ + entityType: CorpTypeCd.BC_ULC_COMPANY, + filingTypeCode: FilingCodes.INCORPORATION_ULC + }], + peopleAndRoles: { + header: '1. Add People or Corporations/Firms to your Application', + blurb: `Add the people and Corporations/firms who will have a role in your company. People + can have multiple roles; Corporations/firms can only be Incorporators.`, + helpSection: null, + addIncorporator: true, + addOrganization: true, + rules: [ + { + id: RuleIds.NUM_COMPLETING_PARTY, + text: 'The Completing Party', + test: (num) => { return (num === 1) } + }, + { + id: RuleIds.NUM_INCORPORATORS, + text: 'At least one Incorporator', + test: (num) => { return (num >= 1) } + }, + { + id: RuleIds.NUM_DIRECTORS, + text: 'At least one Director', + test: (num) => { return (num >= 1) } + } + ] + }, + shareClasses: { + countMinimum: 1 + }, + incorporationArticles: { + articles: 'Unlimited Liability Company Articles', + articlesTooltip: 'The Articles for an Unlimited Liability Company must include the following statement: “The ' + + 'shareholders of this company are jointly and severally liable to satisfy the debts and liabilities of this ' + + 'company to the extent provided in section 51.3 of the Business Corporations Act.” Articles should also outline ' + + 'the rules and procedures for corporate matters such as holding meetings, issuing and transferring shares, and ' + + 'duties of directors and officers.', + provisions: 'liability provision', + provisionTooltip: 'A clause in the Articles which communicates the liability statement required by the Business ' + + 'Corporations Act 51.11.' + }, + incorporationAgreement: { + helpSection: [ + { + header: 'What is the sample Incorporation Agreement and Company Articles?', + helpText: [ + `The sample Incorporation Agreement and Company Articles is a template that you can use to create an + incorporation agreement and articles for your company. It uses all the standard provisions by legislation. + There are three types of samples depending on if you're incorporating a Limited Company, a Benefit Company, + or a Community Contribution Company.`, + `If you would like to customize any other provisions in the Articles, you cannot use these samples. + We recommend seeking professional assistance from a lawyer or accountant to help you prepare your articles.` + ] + }, + { + header: 'What is a Liability Provision?', + helpText: [ + `A Liability Provision is a statement by the company of the shareholders joint liability to satisfy all debts + and liabilities of the company.`, + 'An Unlimited Liability Company must include a Liability Provision in its Articles.' + ] + } + ], + article: 'unlimited_liability_company_incorporation_agreement.pdf', + documents: [ + { + code: 'custom', + description: 'The custom Incorporation Agreement and custom Articles containing the liability' + + ' provision required by the Business Corporations Act 51.11 has been completed and a copy has been added' + + ' to the company\'s record book.' + } + ] + }, + reviewAndConfirm: { + completingPartyStatement: { + certifyStatements: [ + 'An original signature has been placed on each of those signature lines,', + + `I have no reason to believe that the signature placed on a signature line is not the + signature of the person whose name is set out under that signature line, and`, + + 'I have relevant knowledge of the company and that I am authorized to make this filing.' + ], + 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/AmalgamationRegular/index.ts b/src/resources/AmalgamationRegular/index.ts new file mode 100644 index 000000000..9c794c663 --- /dev/null +++ b/src/resources/AmalgamationRegular/index.ts @@ -0,0 +1,4 @@ +export * from './BC' +export * from './BEN' +export * from './CC' +export * from './ULC' diff --git a/src/resources/AmalgamationRegular/steps.ts b/src/resources/AmalgamationRegular/steps.ts new file mode 100644 index 000000000..51124b8c9 --- /dev/null +++ b/src/resources/AmalgamationRegular/steps.ts @@ -0,0 +1,49 @@ +import { RouteNames, Views } from '@/enums' + +/** + * The amalgamation (regular) steps object. + * Currently used for BC, BEN, CC and ULC. + */ +export const AmalgamationRegularSteps = [ + { + id: 'step-1-btn', + step: 1, + icon: 'mdi-domain', + text: 'Amalgamation\nInformation', + to: RouteNames.AMALGAMATION_REG_INFORMATION, + component: Views.AMALGAMATION_REG_INFORMATION + }, + { + id: 'step-2-btn', + step: 2, + icon: 'mdi-handshake', + text: 'Amalgamated Business\nInformation', + to: RouteNames.AMALGAMATION_REG_BUSINESS_INFO, + component: Views.AMALGAMATION_REG_BUSINESS_INFO + }, + { + id: 'step-3-btn', + step: 3, + icon: 'mdi-account-multiple-plus', + text: 'Add People\nand Roles', + to: RouteNames.AMALGAMATION_REG_PEOPLE_ROLES, + component: Views.AMALGAMATION_REG_PEOPLE_ROLES + + }, + { + id: 'step-4-btn', + step: 4, + icon: 'mdi-sitemap', + text: 'Create Share\nStructure', + to: RouteNames.AMALGAMATION_REG_SHARE_STRUCTURE, + component: Views.AMALGAMATION_REG_SHARE_STRUCTURE + }, + { + id: 'step-5-btn', + step: 5, + icon: 'mdi-text-box-check-outline', + text: 'Review\nand Confirm', + to: RouteNames.AMALGAMATION_REG_REVIEW_CONFIRM, + component: Views.AMALGAMATION_REG_REVIEW_CONFIRM + } +] diff --git a/src/resources/index.ts b/src/resources/index.ts index 8eb21894d..7b540887a 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,5 +1,17 @@ -import { DissolutionResourceIF, IncorporationResourceIF, RegistrationResourceIF, RestorationResourceIF } - from '@/interfaces' +import { + AmalgamationRegResourceIF, + DissolutionResourceIF, + IncorporationResourceIF, + RegistrationResourceIF, + RestorationResourceIF +} from '@/interfaces' + +import { + AmalgamationRegResourceBc, + AmalgamationRegResourceBen, + AmalgamationRegResourceCc, + AmalgamationRegResourceUlc +} from './AmalgamationRegular/' import { DissolutionResourceBc, @@ -31,6 +43,13 @@ import { RestorationResourceUlc } from './Restoration/' +export const AmalgamationRegResources: Array = [ + AmalgamationRegResourceBc, + AmalgamationRegResourceBen, + AmalgamationRegResourceCc, + AmalgamationRegResourceUlc +] + export const DissolutionResources: Array = [ DissolutionResourceBc, DissolutionResourceBen, diff --git a/src/router/routes.ts b/src/router/routes.ts index 164b21b30..b0ab62911 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -1,4 +1,4 @@ -import { FilingTypes, RouteNames } from '@/enums' +import { AmalgamationTypes, FilingTypes, RouteNames } from '@/enums' import * as Views from '@/views' export const routes = [ @@ -211,6 +211,61 @@ export const routes = [ filingType: FilingTypes.RESTORATION } }, + { + path: '/amalg-reg-information', + name: RouteNames.AMALGAMATION_REG_INFORMATION, + component: Views.AmalgRegInformation, + meta: { + step: 1, + requiresAuth: true, + filingType: FilingTypes.AMALGAMATION, + filingSubType: AmalgamationTypes.REGULAR + } + }, + { + path: '/amalg-reg-business-info', + name: RouteNames.AMALGAMATION_REG_BUSINESS_INFO, + component: Views.AmalgRegBusinessInfo, + meta: { + step: 2, + requiresAuth: true, + filingType: FilingTypes.AMALGAMATION, + filingSubType: AmalgamationTypes.REGULAR + } + }, + { + path: '/amalg-reg-people-roles', + name: RouteNames.AMALGAMATION_REG_PEOPLE_ROLES, + component: Views.AmalgRegPeopleRoles, + meta: { + step: 3, + requiresAuth: true, + filingType: FilingTypes.AMALGAMATION, + filingSubType: AmalgamationTypes.REGULAR + } + }, + { + path: '/amalg-reg-share-structure', + name: RouteNames.AMALGAMATION_REG_SHARE_STRUCTURE, + component: Views.AmalgRegShareStructure, + meta: { + step: 4, + requiresAuth: true, + filingType: FilingTypes.AMALGAMATION, + filingSubType: AmalgamationTypes.REGULAR + } + }, + { + path: '/amalg-reg-review-confirm', + name: RouteNames.AMALGAMATION_REG_REVIEW_CONFIRM, + component: Views.AmalgRegReviewConfirm, + meta: { + step: 5, + requiresAuth: true, + filingType: FilingTypes.AMALGAMATION, + filingSubType: AmalgamationTypes.REGULAR + } + }, { // default/fallback route // must be last diff --git a/src/store/state/state-model.ts b/src/store/state/state-model.ts index e32600f46..991d8d5b3 100644 --- a/src/store/state/state-model.ts +++ b/src/store/state/state-model.ts @@ -205,6 +205,20 @@ export const stateModel: StateModelIF = { businessTypeConfirm: false, isAutoPopulatedBusinessNumber: false }, + amalgamation: { + applicationDate: null, + approvalType: null, + approvalTypeValid: true, + businessNameValid: false, + courtOrder: { + fileNumber: null + }, + expiry: null, + noticeDate: null, + relationships: [], + restorationTypeValid: false, + type: null + }, restoration: { applicationDate: null, approvalType: null, diff --git a/src/store/store.ts b/src/store/store.ts index 540acea8a..df08edd79 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -4,6 +4,7 @@ import Vuetify from 'vuetify' import { resourceModel, stateModel } from './state' import { AccountTypes, + AmalgamationTypes, ApprovalTypes, BusinessTypes, CoopTypes, @@ -80,6 +81,26 @@ export const useStore = defineStore('store', { return (width < new Vuetify().framework.breakpoint.thresholds.sm) }, + /** Whether the current filing is an Amalgamation. */ + isAmalgamationFiling (): boolean { + return (this.stateModel.tombstone.filingType === FilingTypes.AMALGAMATION) + }, + + /** Whether the current filing is a Regular Amalgamation. */ + isRegularAmalgamationFiling (): boolean { + return (this.getAmalgamationType === AmalgamationTypes.REGULAR) + }, + + /** Whether the current filing is a Horizontal Amalgamation. */ + isHorizontalAmalgamationFiling (): boolean { + return (this.getAmalgamationType === AmalgamationTypes.HORIZONTAL) + }, + + /** Whether the current filing is a Vertical Amalgamation. */ + isVerticalAmalgamationFiling (): boolean { + return (this.getAmalgamationType === AmalgamationTypes.VERTICAL) + }, + /** Whether the current filing is an Incorporation. */ isIncorporationFiling (): boolean { return (this.stateModel.tombstone.filingType === FilingTypes.INCORPORATION_APPLICATION) @@ -118,6 +139,7 @@ export const useStore = defineStore('store', { /** The current filing name. */ getFilingName (): FilingNames { switch (this.getFilingType) { + case FilingTypes.AMALGAMATION: return FilingNames.AMALGAMATION case FilingTypes.INCORPORATION_APPLICATION: return FilingNames.INCORPORATION_APPLICATION case FilingTypes.REGISTRATION: return FilingNames.REGISTRATION case FilingTypes.RESTORATION: return FilingNames.RESTORATION_APPLICATION @@ -264,6 +286,7 @@ export const useStore = defineStore('store', { getEntityIdentifier (): string { switch (this.getFilingType) { + case FilingTypes.AMALGAMATION: return this.getTempId case FilingTypes.INCORPORATION_APPLICATION: return this.getTempId case FilingTypes.REGISTRATION: return this.getTempId case FilingTypes.RESTORATION: return this.getBusinessId @@ -468,7 +491,7 @@ export const useStore = defineStore('store', { /** Is true when the step is valid. */ isRestoreBusinessNameValid (): boolean { return ( - this.getBusinessNameValid && + this.getRestorationBusinessNameValid && this.getNameTranslationsValid && this.getRestorationTypeValid && this.getApprovalTypeValid @@ -492,6 +515,12 @@ export const useStore = defineStore('store', { /** Whether the subject filing is valid. */ isFilingValid (): boolean { + if (this.isAmalgamationFiling) { + if (this.isRegularAmalgamationFiling) return this.isAmalgamationRegularValid + if (this.isHorizontalAmalgamationFiling) return false // FUTURE + if (this.isVerticalAmalgamationFiling) return false // FUTURE + return false // should never happen + } if (this.isIncorporationFiling) return this.isIncorporationApplicationValid if (this.isDissolutionFiling) return this.isDissolutionValid if (this.isRegistrationFiling) return this.isRegistrationValid @@ -542,6 +571,12 @@ export const useStore = defineStore('store', { ) }, + /** Whether all the amalgamation (regular) steps are valid. */ + isAmalgamationRegularValid (): boolean { + // *** TODO: implement this + return false + }, + /** Whether all the incorporation steps are valid. */ isIncorporationApplicationValid (): boolean { // Base company steps @@ -680,13 +715,18 @@ export const useStore = defineStore('store', { return this.stateModel.documentDelivery }, + /** The amalgamation type. */ + getAmalgamationType (): AmalgamationTypes { + return this.stateModel.amalgamation.type + }, + /** The restoration object. */ getRestoration (): RestorationStateIF { return this.stateModel.restoration }, - /** The business name validity. */ - getBusinessNameValid (): boolean { + /** The restoration business name validity. */ + getRestorationBusinessNameValid (): boolean { return this.stateModel.restoration.businessNameValid }, @@ -1175,6 +1215,9 @@ export const useStore = defineStore('store', { setWindowWidth (width: number) { this.stateModel.windowWidth = width }, + setAmalgamationType (type: AmalgamationTypes) { + this.stateModel.amalgamation.type = type + }, setRestorationType (type: RestorationTypes) { this.stateModel.restoration.type = type }, diff --git a/src/views/AmalgamationRegular/AmalgRegBusinessInfo.vue b/src/views/AmalgamationRegular/AmalgRegBusinessInfo.vue new file mode 100644 index 000000000..140e9b268 --- /dev/null +++ b/src/views/AmalgamationRegular/AmalgRegBusinessInfo.vue @@ -0,0 +1,426 @@ + + + + + diff --git a/src/views/AmalgamationRegular/AmalgRegInformation.vue b/src/views/AmalgamationRegular/AmalgRegInformation.vue new file mode 100644 index 000000000..516274616 --- /dev/null +++ b/src/views/AmalgamationRegular/AmalgRegInformation.vue @@ -0,0 +1,426 @@ + + + + + diff --git a/src/views/AmalgamationRegular/AmalgRegPeopleRoles.vue b/src/views/AmalgamationRegular/AmalgRegPeopleRoles.vue new file mode 100644 index 000000000..0cc2fd3a0 --- /dev/null +++ b/src/views/AmalgamationRegular/AmalgRegPeopleRoles.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/views/AmalgamationRegular/AmalgRegReviewConfirm.vue b/src/views/AmalgamationRegular/AmalgRegReviewConfirm.vue new file mode 100644 index 000000000..c5184090d --- /dev/null +++ b/src/views/AmalgamationRegular/AmalgRegReviewConfirm.vue @@ -0,0 +1,334 @@ + + + + + diff --git a/src/views/AmalgamationRegular/AmalgRegShareStructure.vue b/src/views/AmalgamationRegular/AmalgRegShareStructure.vue new file mode 100644 index 000000000..9351e138f --- /dev/null +++ b/src/views/AmalgamationRegular/AmalgRegShareStructure.vue @@ -0,0 +1,393 @@ + + + + + diff --git a/src/views/Restoration/RestorationBusinessName.vue b/src/views/Restoration/RestorationBusinessName.vue index 883056fc4..9293c3ac4 100644 --- a/src/views/Restoration/RestorationBusinessName.vue +++ b/src/views/Restoration/RestorationBusinessName.vue @@ -87,7 +87,7 @@ import RestorationType from '@/components/Restoration/RestorationType.vue' }) export default class RestorationBusinessName extends Mixins(CommonMixin) { @Getter(useStore) getApprovalTypeValid!: boolean - @Getter(useStore) getBusinessNameValid!: boolean + @Getter(useStore) getRestorationBusinessNameValid!: boolean @Getter(useStore) getNameTranslationsValid!: boolean @Getter(useStore) getRestorationTypeValid!: boolean @Getter(useStore) getShowErrors!: boolean @@ -108,7 +108,7 @@ export default class RestorationBusinessName extends Mixins(CommonMixin) { /** Object of valid flags. Must match validComponents. */ get validFlags (): object { return { - businessName: this.getBusinessNameValid, + businessName: this.getRestorationBusinessNameValid, bameTranslation: this.getNameTranslationsValid, restorationType: this.getRestorationTypeValid, approavalType: this.getApprovalTypeValid diff --git a/src/views/index.ts b/src/views/index.ts index ce7aeb030..7046a9a2a 100644 --- a/src/views/index.ts +++ b/src/views/index.ts @@ -6,6 +6,12 @@ export { default as Signin } from './auth/Signin.vue' export { default as Signout } from './auth/Signout.vue' +export { default as AmalgRegBusinessInfo } from './AmalgamationRegular/AmalgRegBusinessInfo.vue' +export { default as AmalgRegInformation } from './AmalgamationRegular/AmalgRegInformation.vue' +export { default as AmalgRegPeopleRoles } from './AmalgamationRegular/AmalgRegPeopleRoles.vue' +export { default as AmalgRegReviewConfirm } from './AmalgamationRegular/AmalgRegReviewConfirm.vue' +export { default as AmalgRegShareStructure } from './AmalgamationRegular/AmalgRegShareStructure.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'