From 34e3e85bee7c22500b89755a5dfb7a2780262c2c Mon Sep 17 00:00:00 2001 From: Qin Date: Wed, 30 Oct 2024 14:20:41 -0700 Subject: [PATCH] added founding date not changed from colin Signed-off-by: Qin --- .../ContinuationIn/ExtraproRegistration.vue | 13 +++++++------ .../existing-business-info-interface.ts | 3 ++- src/mixins/filing-template-mixin.ts | 9 +++++---- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/components/ContinuationIn/ExtraproRegistration.vue b/src/components/ContinuationIn/ExtraproRegistration.vue index 1f2c718c..e9eb9f23 100644 --- a/src/components/ContinuationIn/ExtraproRegistration.vue +++ b/src/components/ContinuationIn/ExtraproRegistration.vue @@ -168,7 +168,7 @@ :persistentHint="true" :initialValue="business.prevIncorporationDate" :inputRules="getShowErrors ? incorporationDateRules: []" - :maxDate="business.bcRegistrationDate || getCurrentDate" + :maxDate="business.bcRegistrationDateFormatted || getCurrentDate" @emitDateSync="$set(business, 'prevIncorporationDate', $event)" /> @@ -203,7 +203,7 @@
- {{ yyyyMmDdToPacificDate(business.bcRegistrationDate, true, false) || '[Unknown]' }} + {{ yyyyMmDdToPacificDate(business.bcRegistrationDateFormatted, true, false) || '[Unknown]' }}
@@ -352,10 +352,10 @@ export default class ExtraproRegistration extends Mixins(DateMixin) { get incorporationDateRules (): Array { return [ (v) => !!v || 'Date of Incorporation is required', - () => (this.business.bcRegistrationDate && this.business.prevIncorporationDate <= this.getCurrentDate) || + () => (this.business.bcRegistrationDateFormatted && this.business.prevIncorporationDate <= this.getCurrentDate) || 'Date of Incorporation cannot be in the future', - () => !this.business.bcRegistrationDate || - (this.business.prevIncorporationDate <= this.business.bcRegistrationDate) || + () => !this.business.bcRegistrationDateFormatted || + (this.business.prevIncorporationDate <= this.business.bcRegistrationDateFormatted) || 'Date of Incorporation in previous jurisdiction must be before Date of Registration in B.C.' ] } @@ -409,7 +409,8 @@ export default class ExtraproRegistration extends Mixins(DateMixin) { } this.business = { - bcRegistrationDate: this.dateToYyyyMmDd(this.apiToDate(businessInfo.foundingDate)), + bcRegistrationDate: businessInfo.foundingDate, + bcRegistrationDateFormatted: this.dateToYyyyMmDd(this.apiToDate(businessInfo.foundingDate)), bcRegistrationNumber: businessInfo.identifier, bcRegisteredName: businessInfo.legalName, previousJurisdiction: this.getHomeJurisdiction(businessInfo.jurisdiction || ''), diff --git a/src/interfaces/store-interfaces/state-interfaces/existing-business-info-interface.ts b/src/interfaces/store-interfaces/state-interfaces/existing-business-info-interface.ts index 25d7fcbe..34452b1e 100644 --- a/src/interfaces/store-interfaces/state-interfaces/existing-business-info-interface.ts +++ b/src/interfaces/store-interfaces/state-interfaces/existing-business-info-interface.ts @@ -4,7 +4,8 @@ export interface ExistingBusinessInfoIF { affidavitFile?: File // only used by UI affidavitFileKey?: string affidavitFileName?: string - bcRegistrationDate?: string // expro only (YYYY-MM-DD) + bcRegistrationDate?: string + bcRegistrationDateFormatted?: string // expro only (YYYY-MM-DD) bcRegistrationNumber?: string // expro only (aka Identifier) bcRegisteredName?: string // expro only previousJurisdiction: { diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index 99a5440d..f79e5a59 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -419,9 +419,9 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM // Add expro business information. if (this.getExistingBusinessInfo?.mode === 'EXPRO') { - const foundingDate = this.yyyyMmDdToDate(this.getExistingBusinessInfo?.bcRegistrationDate) + const foundingDate = this.getExistingBusinessInfo?.bcRegistrationDate filing.continuationIn.business = { - foundingDate: this.dateToApi(foundingDate), + foundingDate: foundingDate, identifier: this.getExistingBusinessInfo?.bcRegistrationNumber, legalName: this.getExistingBusinessInfo?.bcRegisteredName } @@ -464,14 +464,15 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM // restore existing business information if (continuationIn.foreignJurisdiction) { - const foundingDate = this.apiToDate(continuationIn.business?.foundingDate) + const foundingDate = continuationIn.business?.foundingDate const exproConfirmation = (continuationIn.exproConfirmation === true) ? true : (continuationIn.exproConfirmation === false) ? false : undefined this.setExistingBusinessInfo({ affidavitFile: continuationIn.foreignJurisdiction.affidavitFile, affidavitFileKey: continuationIn.foreignJurisdiction.affidavitFileKey, affidavitFileName: continuationIn.foreignJurisdiction.affidavitFileName, - bcRegistrationDate: this.dateToYyyyMmDd(foundingDate), + bcRegistrationDate: foundingDate, + bcRegistrationDateFormatted: this.dateToYyyyMmDd(this.apiToDate(foundingDate)), bcRegistrationNumber: continuationIn.business?.identifier, bcRegisteredName: continuationIn.business?.legalName, // store previousJurisdiction as null if not saved