diff --git a/src/components/ContinuationIn/ContinuationAuthorization.vue b/src/components/ContinuationIn/ContinuationAuthorization.vue index ad1b042b..d12b94a9 100644 --- a/src/components/ContinuationIn/ContinuationAuthorization.vue +++ b/src/components/ContinuationIn/ContinuationAuthorization.vue @@ -194,6 +194,7 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) { return Math.min((this.authorization.files.length + 1), 5) } + /** Called when this component is mounted. */ mounted (): void { // set or initialize authorization object this.authorization = this.getContinuationAuthorization || { files: [] } as ContinuationAuthorizationIF diff --git a/src/components/ContinuationIn/ExtraproRegistration.vue b/src/components/ContinuationIn/ExtraproRegistration.vue index f1bf5ace..782bc973 100644 --- a/src/components/ContinuationIn/ExtraproRegistration.vue +++ b/src/components/ContinuationIn/ExtraproRegistration.vue @@ -201,7 +201,7 @@ @@ -474,10 +474,10 @@ export default class ExtraproRegistration extends Mixins(DateMixin, DocumentMixi } /** - * Whether to show the affidavit upload. + * Whether the director's affidavit is required. * Is true if the business is a Continued In ULC in Alberta or Nova Scotia. */ - get isShowAffidavit (): boolean { + get isAffidavitRequired (): boolean { return ( this.isTypeUlcContinueIn && this.business.homeJurisdiction?.country === JurisdictionLocation.CA && @@ -521,6 +521,7 @@ export default class ExtraproRegistration extends Mixins(DateMixin, DocumentMixi return IntlJurisdictions.find(intl => intl.value === jurisdiction?.country)?.text || null } + /** Called when this component is mounted. */ mounted (): void { // point business variable to Existing Business Info object from the store, if it exists if (this.getExistingBusinessInfo) this.business = this.getExistingBusinessInfo @@ -675,7 +676,7 @@ export default class ExtraproRegistration extends Mixins(DateMixin, DocumentMixi this.$set(this.business, 'affidavitFileUrl', psu.preSignedUrl) } } else { - // delete properties reactively if the file is cleared + // delete properties reactively when the file is cleared this.$delete(this.business, 'affidavitFile') this.$delete(this.business, 'affidavitFileKey') this.$delete(this.business, 'affidavitFileName') @@ -694,13 +695,14 @@ export default class ExtraproRegistration extends Mixins(DateMixin, DocumentMixi @Watch('business', { deep: true }) @Emit('valid') private onComponentValid (): boolean { - // this component is valid if we have looked up an active business - // and we have the affidavit if the business in the home jurisdiction is ULC + // this component is valid if we have looked up a business + // and the business is active + // and we have the affidavit if it's required // and the user has checked the confirmation return ( this.haveLookupBusiness && this.isBusinessActive && - !!this.business.affidavitFileKey && + (!this.isAffidavitRequired || !!this.business.affidavitFileKey) && this.business.isConfirmed ) } diff --git a/src/components/ContinuationIn/ManualBusinessInfo.vue b/src/components/ContinuationIn/ManualBusinessInfo.vue index 52120467..dfdc7653 100644 --- a/src/components/ContinuationIn/ManualBusinessInfo.vue +++ b/src/components/ContinuationIn/ManualBusinessInfo.vue @@ -296,6 +296,7 @@ export default class ManualBusinessInfo extends Mixins(CountriesProvincesMixin, isMrasJurisdiction = false jurisdictionErrorMessage = '' + /** Called when this component is mounted. */ mounted (): void { // point business variable to Existing Business Info object from the store, if it exists if (this.getExistingBusinessInfo) {