From 727f8926564b12d8724a9d069f65150a39b37417 Mon Sep 17 00:00:00 2001 From: Qin Date: Thu, 19 Sep 2024 16:12:56 -0700 Subject: [PATCH 1/5] updated the alter types for ContIn Signed-off-by: Qin --- package-lock.json | 4 ++-- package.json | 2 +- .../common/YourCompany/ChangeBusinessType.vue | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2240f1c2..1bca3365 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-edit-ui", - "version": "4.10.11", + "version": "4.10.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-edit-ui", - "version": "4.10.11", + "version": "4.10.12", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/action-chip": "1.1.5", diff --git a/package.json b/package.json index 90c3228f..1b4e070c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-edit-ui", - "version": "4.10.11", + "version": "4.10.12", "private": true, "appName": "Edit UI", "sbcName": "SBC Common Components", diff --git a/src/components/common/YourCompany/ChangeBusinessType.vue b/src/components/common/YourCompany/ChangeBusinessType.vue index aa844ed6..b4858ff9 100644 --- a/src/components/common/YourCompany/ChangeBusinessType.vue +++ b/src/components/common/YourCompany/ChangeBusinessType.vue @@ -458,6 +458,16 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { return } + // if the original legal type is one of the continued-in types, alter to another Cont. In type + if ( + this.getOriginalLegalType === CorpTypeCd.BEN_CONTINUE_IN || + this.getOriginalLegalType === CorpTypeCd.CCC_CONTINUE_IN || + this.getOriginalLegalType === CorpTypeCd.CONTINUE_IN || + this.getOriginalLegalType === CorpTypeCd.ULC_CONTINUE_IN + ) { + this.selectedEntityType = convertToContinuedInEntityType(this.selectedEntityType) + } + this.setEntityType(this.selectedEntityType) this.isEditingType = false From 118696f66be698613604bec1b177b8de576993b0 Mon Sep 17 00:00:00 2001 From: Qin Date: Mon, 23 Sep 2024 10:39:28 -0700 Subject: [PATCH 2/5] updated alter type solution, corrected C entity type options Signed-off-by: Qin --- .../common/YourCompany/ChangeBusinessType.vue | 64 ++++--------------- src/resources/Alteration/C.ts | 8 +-- src/resources/Alteration/CBEN.ts | 6 +- src/resources/Alteration/CUL.ts | 6 +- src/utils/resource-utils.ts | 12 +++- 5 files changed, 34 insertions(+), 62 deletions(-) diff --git a/src/components/common/YourCompany/ChangeBusinessType.vue b/src/components/common/YourCompany/ChangeBusinessType.vue index b4858ff9..ae971f24 100644 --- a/src/components/common/YourCompany/ChangeBusinessType.vue +++ b/src/components/common/YourCompany/ChangeBusinessType.vue @@ -339,19 +339,8 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { /** Define the entity type locally once the value has been populated in the store. */ @Watch('getEntityType') private initializeEntityType (): void { - /** Converts type to regular entity type. */ - function convertToRegularEntityType (type: CorpTypeCd): CorpTypeCd { - switch (type) { - case CorpTypeCd.BEN_CONTINUE_IN: return CorpTypeCd.BENEFIT_COMPANY - case CorpTypeCd.CCC_CONTINUE_IN: return CorpTypeCd.BC_CCC - case CorpTypeCd.CONTINUE_IN: return CorpTypeCd.BC_COMPANY - case CorpTypeCd.ULC_CONTINUE_IN: return CorpTypeCd.BC_ULC_COMPANY - default: return type - } - } - // convert types for the v-select, etc - this.selectedEntityType = convertToRegularEntityType(this.getEntityType) + this.selectedEntityType = this.getEntityType } /** Clear the articles confirm checkbox whenever the selected entity type changes. */ @@ -402,7 +391,7 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { if (this.isNumberedCompany) { return false } - // Named companies to CC or ULC require a name request. + // Named companies to CC/CCC or ULC require a name request. if (this.isCommunityContribution || this.isUnlimitedLiability) { return true } @@ -412,7 +401,7 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { ) { return true } - // Named CUL to BC Limited (or Benefit Company) requires a name request. + // Named CUL to C Limited (or C Benefit Company) requires a name request. if (this.getOriginalLegalType === CorpTypeCd.ULC_CONTINUE_IN && (this.isBcLimited || this.isBenefitCompany) ) { @@ -441,40 +430,11 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { /** Submit new company type. */ submitTypeChange () { - /** Converts type to continuation in entity type. */ - function convertToContinuedInEntityType (type: CorpTypeCd): CorpTypeCd { - switch (type) { - case CorpTypeCd.BENEFIT_COMPANY: return CorpTypeCd.BEN_CONTINUE_IN - case CorpTypeCd.BC_CCC: return CorpTypeCd.CCC_CONTINUE_IN - case CorpTypeCd.BC_COMPANY: return CorpTypeCd.CONTINUE_IN - case CorpTypeCd.BC_ULC_COMPANY: return CorpTypeCd.ULC_CONTINUE_IN - default: return type - } - } - - // prevent continuation in entity types from changing to equivalent regular entity types - if (this.getOriginalLegalType === convertToContinuedInEntityType(this.selectedEntityType)) { - this.isEditingType = false - return - } - - // if the original legal type is one of the continued-in types, alter to another Cont. In type - if ( - this.getOriginalLegalType === CorpTypeCd.BEN_CONTINUE_IN || - this.getOriginalLegalType === CorpTypeCd.CCC_CONTINUE_IN || - this.getOriginalLegalType === CorpTypeCd.CONTINUE_IN || - this.getOriginalLegalType === CorpTypeCd.ULC_CONTINUE_IN - ) { - this.selectedEntityType = convertToContinuedInEntityType(this.selectedEntityType) - } - this.setEntityType(this.selectedEntityType) this.isEditingType = false - if (this.shouldUpdateName()) { const originalName = this.getOriginalLegalName const updatedName = this.getUpdatedName(originalName) - if (originalName !== updatedName) { this.setNameRequest({ legalType: this.selectedEntityType, @@ -513,22 +473,26 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { /** Whether current entity selection is a Benefit Company. */ get isBenefitCompany (): boolean { - return (this.selectedEntityType === CorpTypeCd.BENEFIT_COMPANY) + return (this.selectedEntityType === CorpTypeCd.BENEFIT_COMPANY || + this.selectedEntityType === CorpTypeCd.BEN_CONTINUE_IN) } - /** Whether current entity selection is a BC ULC Company. */ + /** Whether current entity selection is a ULC/CUL Company. */ get isUnlimitedLiability (): boolean { - return (this.selectedEntityType === CorpTypeCd.BC_ULC_COMPANY) + return (this.selectedEntityType === CorpTypeCd.BC_ULC_COMPANY || + this.selectedEntityType === CorpTypeCd.ULC_CONTINUE_IN) } - /** Whether current entity selection is a BC CCC. */ + /** Whether current entity selection is a CCC. */ get isCommunityContribution (): boolean { - return (this.selectedEntityType === CorpTypeCd.BC_CCC) + return (this.selectedEntityType === CorpTypeCd.BC_CCC || + this.selectedEntityType === CorpTypeCd.CCC_CONTINUE_IN) } - /** Whether current entity selection is a BC Company. */ + /** Whether current entity selection is a BC Company / Contin Limited. */ get isBcLimited (): boolean { - return (this.selectedEntityType === CorpTypeCd.BC_COMPANY) + return (this.selectedEntityType === CorpTypeCd.BC_COMPANY || + this.selectedEntityType === CorpTypeCd.CONTINUE_IN) } get updatedArticleInfo (): string { diff --git a/src/resources/Alteration/C.ts b/src/resources/Alteration/C.ts index cab9b591..fb9d1d2f 100644 --- a/src/resources/Alteration/C.ts +++ b/src/resources/Alteration/C.ts @@ -25,22 +25,22 @@ export const AlterationResourceC: ResourceIF = { ], entityTypeOptions: [ { - value: CorpTypeCd.BC_COMPANY, + value: CorpTypeCd.CONTINUE_IN, shortDesc: 'BC Limited Company', text: 'BC Limited Company' }, { - value: CorpTypeCd.BENEFIT_COMPANY, + value: CorpTypeCd.BEN_CONTINUE_IN, shortDesc: 'BC Benefit Company', text: 'BC Benefit Company' }, { - value: CorpTypeCd.BC_ULC_COMPANY, + value: CorpTypeCd.ULC_CONTINUE_IN, shortDesc: 'BC Unlimited Liability Company', text: 'BC Unlimited Liability Company' }, { - value: CorpTypeCd.BC_CCC, + value: CorpTypeCd.CCC_CONTINUE_IN, shortDesc: 'BC Community Contribution Company', text: 'BC Community Contribution Company' } diff --git a/src/resources/Alteration/CBEN.ts b/src/resources/Alteration/CBEN.ts index 2ad80910..d06286a9 100644 --- a/src/resources/Alteration/CBEN.ts +++ b/src/resources/Alteration/CBEN.ts @@ -19,17 +19,17 @@ export const AlterationResourceCben: ResourceIF = { ], entityTypeOptions: [ { - value: CorpTypeCd.BENEFIT_COMPANY, + value: CorpTypeCd.BEN_CONTINUE_IN, shortDesc: 'BC Benefit Company', text: 'BC Benefit Company' }, { - value: CorpTypeCd.BC_COMPANY, + value: CorpTypeCd.CONTINUE_IN, shortDesc: 'BC Limited Company', text: 'BC Limited Company' }, { - value: CorpTypeCd.BC_CCC, + value: CorpTypeCd.CCC_CONTINUE_IN, shortDesc: 'BC Community Contribution Company', text: 'BC Community Contribution Company' } diff --git a/src/resources/Alteration/CUL.ts b/src/resources/Alteration/CUL.ts index 14419b18..34d2c103 100644 --- a/src/resources/Alteration/CUL.ts +++ b/src/resources/Alteration/CUL.ts @@ -19,17 +19,17 @@ export const AlterationResourceCul: ResourceIF = { ], entityTypeOptions: [ { - value: CorpTypeCd.BC_ULC_COMPANY, + value: CorpTypeCd.ULC_CONTINUE_IN, shortDesc: 'BC Unlimited Liability Company', text: 'BC Unlimited Liability Company' }, { - value: CorpTypeCd.BENEFIT_COMPANY, + value: CorpTypeCd.BEN_CONTINUE_IN, shortDesc: 'BC Benefit Company', text: 'BC Benefit Company' }, { - value: CorpTypeCd.BC_COMPANY, + value: CorpTypeCd.CONTINUE_IN, shortDesc: 'BC Limited Company', text: 'BC Limited Company' } diff --git a/src/utils/resource-utils.ts b/src/utils/resource-utils.ts index e1dc6edb..fe7b6bcf 100644 --- a/src/utils/resource-utils.ts +++ b/src/utils/resource-utils.ts @@ -2,7 +2,11 @@ import { AlterationResourceBc, AlterationResourceBen, AlterationResourceCc, - AlterationResourceUlc + AlterationResourceUlc, + AlterationResourceCul, + AlterationResourceC, + AlterationResourceCben, + AlterationResourceCcc } from '@/resources/Alteration' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' @@ -11,7 +15,11 @@ export class ResourceUtilities { [CorpTypeCd.BC_COMPANY]: AlterationResourceBc, [CorpTypeCd.BENEFIT_COMPANY]: AlterationResourceBen, [CorpTypeCd.BC_CCC]: AlterationResourceCc, - [CorpTypeCd.BC_ULC_COMPANY]: AlterationResourceUlc + [CorpTypeCd.BC_ULC_COMPANY]: AlterationResourceUlc, + [CorpTypeCd.CONTINUE_IN]: AlterationResourceC, + [CorpTypeCd.BEN_CONTINUE_IN]: AlterationResourceCben, + [CorpTypeCd.CCC_CONTINUE_IN]: AlterationResourceCcc, + [CorpTypeCd.ULC_CONTINUE_IN]: AlterationResourceCul } /** From e14b81e2ca5cad6d3102cc8124386293f8169bda Mon Sep 17 00:00:00 2001 From: Qin Date: Mon, 23 Sep 2024 11:16:18 -0700 Subject: [PATCH 3/5] updated comments, order Signed-off-by: Qin --- .../common/YourCompany/ChangeBusinessType.vue | 6 +++--- src/utils/resource-utils.ts | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/common/YourCompany/ChangeBusinessType.vue b/src/components/common/YourCompany/ChangeBusinessType.vue index ae971f24..eb67e485 100644 --- a/src/components/common/YourCompany/ChangeBusinessType.vue +++ b/src/components/common/YourCompany/ChangeBusinessType.vue @@ -391,7 +391,7 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { if (this.isNumberedCompany) { return false } - // Named companies to CC/CCC or ULC require a name request. + // Named companies to CC/CCC or ULC/CUL require a name request. if (this.isCommunityContribution || this.isUnlimitedLiability) { return true } @@ -477,13 +477,13 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { this.selectedEntityType === CorpTypeCd.BEN_CONTINUE_IN) } - /** Whether current entity selection is a ULC/CUL Company. */ + /** Whether current entity selection is a Unlimited (ULC/CUL) Company. */ get isUnlimitedLiability (): boolean { return (this.selectedEntityType === CorpTypeCd.BC_ULC_COMPANY || this.selectedEntityType === CorpTypeCd.ULC_CONTINUE_IN) } - /** Whether current entity selection is a CCC. */ + /** Whether current entity selection is a Community Contribution Company (CC/CCC). */ get isCommunityContribution (): boolean { return (this.selectedEntityType === CorpTypeCd.BC_CCC || this.selectedEntityType === CorpTypeCd.CCC_CONTINUE_IN) diff --git a/src/utils/resource-utils.ts b/src/utils/resource-utils.ts index fe7b6bcf..dcd1d57a 100644 --- a/src/utils/resource-utils.ts +++ b/src/utils/resource-utils.ts @@ -1,12 +1,12 @@ import { AlterationResourceBc, AlterationResourceBen, - AlterationResourceCc, - AlterationResourceUlc, - AlterationResourceCul, AlterationResourceC, AlterationResourceCben, - AlterationResourceCcc + AlterationResourceCc, + AlterationResourceCcc, + AlterationResourceCul, + AlterationResourceUlc } from '@/resources/Alteration' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' @@ -14,12 +14,12 @@ export class ResourceUtilities { private static entityTypeToResourceMap = { [CorpTypeCd.BC_COMPANY]: AlterationResourceBc, [CorpTypeCd.BENEFIT_COMPANY]: AlterationResourceBen, - [CorpTypeCd.BC_CCC]: AlterationResourceCc, - [CorpTypeCd.BC_ULC_COMPANY]: AlterationResourceUlc, [CorpTypeCd.CONTINUE_IN]: AlterationResourceC, [CorpTypeCd.BEN_CONTINUE_IN]: AlterationResourceCben, + [CorpTypeCd.BC_CCC]: AlterationResourceCc, [CorpTypeCd.CCC_CONTINUE_IN]: AlterationResourceCcc, - [CorpTypeCd.ULC_CONTINUE_IN]: AlterationResourceCul + [CorpTypeCd.ULC_CONTINUE_IN]: AlterationResourceCul, + [CorpTypeCd.BC_ULC_COMPANY]: AlterationResourceUlc } /** From 5764ab02d9503ab2a16a12cb6cc507966c31f99c Mon Sep 17 00:00:00 2001 From: Qin Date: Mon, 23 Sep 2024 12:46:30 -0700 Subject: [PATCH 4/5] fix section 3 court order bug Signed-off-by: Qin --- src/mixins/filing-template-mixin.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index fa083d9b..82dc4d94 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -209,7 +209,7 @@ export default class FilingTemplateMixin extends DateMixin { if (this.getHasPlanOfArrangement || this.getFileNumber) { filing.correction.courtOrder = { fileNumber: this.getFileNumber, - effectOfOrder: this.getHasPlanOfArrangement ? EffectOfOrders.PLAN_OF_ARRANGEMENT : null, + effectOfOrder: this.getHasPlanOfArrangement ? EffectOfOrders.PLAN_OF_ARRANGEMENT : undefined, hasPlanOfArrangement: this.getHasPlanOfArrangement } } @@ -331,7 +331,7 @@ export default class FilingTemplateMixin extends DateMixin { if (this.getHasPlanOfArrangement || this.getFileNumber) { filing.alteration.courtOrder = { fileNumber: this.getFileNumber, - effectOfOrder: this.getHasPlanOfArrangement ? EffectOfOrders.PLAN_OF_ARRANGEMENT : null, + effectOfOrder: this.getHasPlanOfArrangement ? EffectOfOrders.PLAN_OF_ARRANGEMENT : undefined, hasPlanOfArrangement: this.getHasPlanOfArrangement } } @@ -647,7 +647,7 @@ export default class FilingTemplateMixin extends DateMixin { if (this.getHasPlanOfArrangement || this.getFileNumber) { filing.changeOfRegistration.courtOrder = { fileNumber: this.getFileNumber, - effectOfOrder: this.getHasPlanOfArrangement ? EffectOfOrders.PLAN_OF_ARRANGEMENT : null, + effectOfOrder: this.getHasPlanOfArrangement ? EffectOfOrders.PLAN_OF_ARRANGEMENT : undefined, hasPlanOfArrangement: this.getHasPlanOfArrangement } } From 3c48d445685cdf11883bc572cc9432654901963e Mon Sep 17 00:00:00 2001 From: Qin Date: Mon, 23 Sep 2024 12:52:33 -0700 Subject: [PATCH 5/5] namerequest.legalType updated to current type Signed-off-by: Qin --- src/mixins/filing-template-mixin.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index 82dc4d94..07a19290 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -304,6 +304,7 @@ export default class FilingTemplateMixin extends DateMixin { // add in the fields needed by Legal API ...this.getNameRequest, legalName: this.getNameRequestLegalName || undefined, // don't include if empty + legalType: this.getEntityType, nrNumber: this.getNameRequestNumber } }