diff --git a/package-lock.json b/package-lock.json index c0f2b150f..52f7e0fea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.9.8", + "version": "5.9.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.9.8", + "version": "5.9.9", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index c57b1b0ce..b76ca61b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.9.8", + "version": "5.9.9", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", diff --git a/src/mixins/amalgamation-mixin.ts b/src/mixins/amalgamation-mixin.ts index 63b50ecd1..0c0a36485 100644 --- a/src/mixins/amalgamation-mixin.ts +++ b/src/mixins/amalgamation-mixin.ts @@ -415,12 +415,13 @@ export default class AmalgamationMixin extends Vue { // overwrite business contact -- only when user has marked new holding/primary business, // otherwise leave existing data from restored draft if (isNew) { - if (business.authInfo?.contacts[0]) { + const businessContact = business.authInfo?.contacts[0] + if (businessContact) { this.setBusinessContact({ - email: business.authInfo.contacts[0].email, - confirmEmail: business.authInfo.contacts[0].email, - phone: business.authInfo.contacts[0].phone, - extension: business.authInfo.contacts[0].extension + email: businessContact.email, + confirmEmail: businessContact.email, + phone: businessContact.phone, + extension: businessContact.extension }) } else { // safety check - clear old business contact diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index 8abc566ac..473bbf33d 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -149,8 +149,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM nameTranslations: this.getNameTranslations, offices: this.getDefineCompanyStep.officeAddresses, contactPoint: { - email: this.getBusinessContact.email, - phone: this.getBusinessContact.phone, + email: this.getBusinessContact.email || '', + phone: this.getBusinessContact.phone || '', // don't save extension if it's empty ...this.getBusinessContact.extension ? { extension: +this.getBusinessContact.extension } @@ -366,8 +366,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM nameTranslations: this.getNameTranslations, offices: this.getDefineCompanyStep.officeAddresses, contactPoint: { - email: this.getBusinessContact.email, - phone: this.getBusinessContact.phone, + email: this.getBusinessContact.email || '', + phone: this.getBusinessContact.phone || '', // don't save extension if it's empty ...this.getBusinessContact.extension ? { extension: +this.getBusinessContact.extension } @@ -532,8 +532,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM nameTranslations: this.getNameTranslations, offices: this.getDefineCompanyStep.officeAddresses, contactPoint: { - email: this.getBusinessContact.email, - phone: this.getBusinessContact.phone, + email: this.getBusinessContact.email || '', + phone: this.getBusinessContact.phone || '', // don't save extension if it's empty ...this.getBusinessContact.extension ? { extension: +this.getBusinessContact.extension } @@ -764,8 +764,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM }, businessType: this.getRegistration.businessType, contactPoint: { - email: this.getBusinessContact.email, - phone: this.getBusinessContact.phone, + email: this.getBusinessContact.email || '', + phone: this.getBusinessContact.phone || '', // don't save extension if it's empty ...this.getBusinessContact.extension ? { extension: +this.getBusinessContact.extension } @@ -821,8 +821,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM applicationDate: this.getRestoration.applicationDate || undefined, // can't be null approvalType: this.getRestoration.approvalType, contactPoint: { - email: this.getBusinessContact.email, - phone: this.getBusinessContact.phone, + email: this.getBusinessContact.email || '', + phone: this.getBusinessContact.phone || '', // don't save extension if it's empty ...this.getBusinessContact.extension ? { extension: +this.getBusinessContact.extension } diff --git a/src/services/legal-services.ts b/src/services/legal-services.ts index c2e7c4056..2650677be 100644 --- a/src/services/legal-services.ts +++ b/src/services/legal-services.ts @@ -224,8 +224,7 @@ export default class LegalServices { cessationDate: director.cessationDate, roleType: RoleTypes.DIRECTOR } - ], - isLookupBusiness: null + ] } return orgPerson