diff --git a/package-lock.json b/package-lock.json
index 0ce4bbe0..c025d3b9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "business-create-ui",
- "version": "5.13.0",
+ "version": "5.14.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "business-create-ui",
- "version": "5.13.0",
+ "version": "5.14.0",
"dependencies": {
"@babel/compat-data": "^7.21.5",
"@bcrs-shared-components/approval-type": "1.1.3",
diff --git a/package.json b/package.json
index 33a8c934..7dbaa870 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "business-create-ui",
- "version": "5.13.0",
+ "version": "5.14.0",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
diff --git a/src/components/ContinuationIn/ExtraproRegistration.vue b/src/components/ContinuationIn/ExtraproRegistration.vue
index 1f2c718c..2596eb69 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="bcRegistrationDateFormatted || getCurrentDate"
@emitDateSync="$set(business, 'prevIncorporationDate', $event)"
/>
@@ -203,7 +203,7 @@
- {{ yyyyMmDdToPacificDate(business.bcRegistrationDate, true, false) || '[Unknown]' }}
+ {{ yyyyMmDdToPacificDate(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.bcRegistrationDateFormatted && this.business.prevIncorporationDate <= this.getCurrentDate) ||
'Date of Incorporation cannot be in the future',
- () => !this.business.bcRegistrationDate ||
- (this.business.prevIncorporationDate <= this.business.bcRegistrationDate) ||
+ () => !this.bcRegistrationDateFormatted ||
+ (this.business.prevIncorporationDate <= this.bcRegistrationDateFormatted) ||
'Date of Incorporation in previous jurisdiction must be before Date of Registration in B.C.'
]
}
@@ -381,6 +381,12 @@ export default class ExtraproRegistration extends Mixins(DateMixin) {
return IntlJurisdictions.find(intl => intl.value === jurisdiction?.country)?.text || null
}
+ get bcRegistrationDateFormatted (): string | null {
+ return this.business.bcRegistrationDate
+ ? this.dateToYyyyMmDd(this.apiToDate(this.business.bcRegistrationDate))
+ : null
+ }
+
/** Called when this component is mounted. */
mounted (): void {
// point business variable to Existing Business Info object from the store, if it exists
@@ -409,7 +415,7 @@ export default class ExtraproRegistration extends Mixins(DateMixin) {
}
this.business = {
- bcRegistrationDate: this.dateToYyyyMmDd(this.apiToDate(businessInfo.foundingDate)),
+ bcRegistrationDate: 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..33daa7bd 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,7 @@ export interface ExistingBusinessInfoIF {
affidavitFile?: File // only used by UI
affidavitFileKey?: string
affidavitFileName?: string
- bcRegistrationDate?: string // expro only (YYYY-MM-DD)
+ bcRegistrationDate?: string // expro only (ISO date-time: '2007-04-25T22:42:42-00:00')
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..c9ab0776 100644
--- a/src/mixins/filing-template-mixin.ts
+++ b/src/mixins/filing-template-mixin.ts
@@ -419,9 +419,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
// Add expro business information.
if (this.getExistingBusinessInfo?.mode === 'EXPRO') {
- const foundingDate = this.yyyyMmDdToDate(this.getExistingBusinessInfo?.bcRegistrationDate)
filing.continuationIn.business = {
- foundingDate: this.dateToApi(foundingDate),
+ foundingDate: this.getExistingBusinessInfo?.bcRegistrationDate,
identifier: this.getExistingBusinessInfo?.bcRegistrationNumber,
legalName: this.getExistingBusinessInfo?.bcRegisteredName
}
@@ -464,14 +463,13 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
// restore existing business information
if (continuationIn.foreignJurisdiction) {
- const foundingDate = this.apiToDate(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: continuationIn.business?.foundingDate,
bcRegistrationNumber: continuationIn.business?.identifier,
bcRegisteredName: continuationIn.business?.legalName,
// store previousJurisdiction as null if not saved