From 1b295fca00acb941822c569de526f17392e6d73e Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 19 Jul 2023 10:40:42 -0700 Subject: [PATCH 1/5] If changing to CC, make sure 3 directors are required. --- package-lock.json | 4 +-- package.json | 2 +- .../common/YourCompany/ChangeBusinessType.vue | 35 ++++++++++++++++++- src/store/store.ts | 4 +++ 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 99a113b11..170bc1788 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-edit-ui", - "version": "4.4.9", + "version": "4.4.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "business-edit-ui", - "version": "4.4.9", + "version": "4.4.10", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/action-chip": "1.1.5", diff --git a/package.json b/package.json index 8e475d0ac..163feaa91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-edit-ui", - "version": "4.4.9", + "version": "4.4.10", "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 46bb1ff89..f576de9ca 100644 --- a/src/components/common/YourCompany/ChangeBusinessType.vue +++ b/src/components/common/YourCompany/ChangeBusinessType.vue @@ -107,6 +107,14 @@ {{ data.item.text }} + + + The business type cannot be changed. A Community Contribution Company requires a minimum of three directors. + +

Businesses can only be altered to specific types. If the business type you want is @@ -203,7 +211,7 @@ id="done-btn" large color="primary" - :disabled="!confirmArticles" + :disabled="!confirmArticles && !minimumThreeDirectorError" @click="submitTypeChange()" > Done @@ -323,6 +331,7 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { @Getter(useStore) getEditedLabel!: string @Getter(useStore) getEntitySnapshot!: EntitySnapshotIF @Getter(useStore) getEntityType!: CorpTypeCd + @Getter(useStore) getNumberOfDirectors!: number @Getter(useStore) getResource!: ResourceIF @Getter(useStore) hasBusinessTypeChanged!: boolean @Getter(useStore) isBcCompany!: boolean @@ -367,6 +376,16 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { value: 'BEN', SHORT_DESC: 'BC Benefit Company', text: 'BC Benefit Company' + }, + { + value: 'ULC', + SHORT_DESC: 'BC Unlimited Liability Company', + text: 'BC Unlimited Liability Company' + }, + { + value: 'CC', + SHORT_DESC: 'BC Community Contribution Company', + text: 'BC Community Contribution Company' } ] @@ -381,11 +400,25 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { return (this.selectedEntityType === CorpTypeCd.BENEFIT_COMPANY) } + /** Check if current entity selection is a Unlimited Liability Company */ + get isUnlimitedLiability (): boolean { + return (this.selectedEntityType === CorpTypeCd.BC_ULC_COMPANY) + } + + /** Check if current entity selection is a Community Contribution Company */ + get isCommunityContribution (): boolean { + return (this.selectedEntityType === CorpTypeCd.BC_CCC) + } + /** Type change helper information */ get typeChangeInfo (): string { return this.getResource.changeData?.typeChangeInfo } + get minimumThreeDirectorError (): boolean { + return this.isUnlimitedLiability && this.getNumberOfDirectors < 3 + } + /** Reset company type values to original. */ protected resetType () { this.setEntityType(this.getEntitySnapshot?.businessInfo?.legalType) diff --git a/src/store/store.ts b/src/store/store.ts index 92528a166..6473fd2e8 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -1282,6 +1282,10 @@ export const useStore = defineStore('store', { this.hasSpecialResolutionRulesChanged || this.hasSpecialResolutionMemorandumChanged) || this.isCoopCorrectionFiling + }, + + getNumberOfDirectors (): number { + return this.getOrgPeople.map(person => person.roles.filter(role => role.roleType === RoleTypes.DIRECTOR)).length } }, From 1b42b00399f58a03aa48c84931ba570666a3c37b Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 19 Jul 2023 10:49:06 -0700 Subject: [PATCH 2/5] Use div and p instead. --- .../common/YourCompany/ChangeBusinessType.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/common/YourCompany/ChangeBusinessType.vue b/src/components/common/YourCompany/ChangeBusinessType.vue index f576de9ca..5b7910890 100644 --- a/src/components/common/YourCompany/ChangeBusinessType.vue +++ b/src/components/common/YourCompany/ChangeBusinessType.vue @@ -108,12 +108,14 @@ - - The business type cannot be changed. A Community Contribution Company requires a minimum of three directors. - +

+ The business type cannot be changed. A Community Contribution Company requires a minimum of three directors. +

+

@@ -416,7 +418,7 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { } get minimumThreeDirectorError (): boolean { - return this.isUnlimitedLiability && this.getNumberOfDirectors < 3 + return this.isCommunityContribution && this.getNumberOfDirectors < 3 } /** Reset company type values to original. */ From d19998e6e6d748ca414ddcad41e65b48a14ff30d Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 19 Jul 2023 11:54:18 -0700 Subject: [PATCH 3/5] Minor tweak --- src/components/common/YourCompany/ChangeBusinessType.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/YourCompany/ChangeBusinessType.vue b/src/components/common/YourCompany/ChangeBusinessType.vue index 5b7910890..1a72a8433 100644 --- a/src/components/common/YourCompany/ChangeBusinessType.vue +++ b/src/components/common/YourCompany/ChangeBusinessType.vue @@ -213,7 +213,7 @@ id="done-btn" large color="primary" - :disabled="!confirmArticles && !minimumThreeDirectorError" + :disabled="!confirmArticles || minimumThreeDirectorError" @click="submitTypeChange()" > Done From 8e7b9a8d50d62be6d5cb26948f5c206d17277a7b Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Mon, 24 Jul 2023 09:32:43 -0700 Subject: [PATCH 4/5] Update package + package-lock.json --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b18796284..ecf0a52a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-edit-ui", - "version": "4.5.0", + "version": "4.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "business-edit-ui", - "version": "4.5.0", + "version": "4.5.1", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/action-chip": "1.1.5", diff --git a/package.json b/package.json index 699ca682d..06691d419 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-edit-ui", - "version": "4.5.0", + "version": "4.5.1", "private": true, "appName": "Edit UI", "sbcName": "SBC Common Components", From bec1164f489906943ba8260237bdb4a78f6912be Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Mon, 24 Jul 2023 10:02:36 -0700 Subject: [PATCH 5/5] Remove duplicates. --- .../common/YourCompany/ChangeBusinessType.vue | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/common/YourCompany/ChangeBusinessType.vue b/src/components/common/YourCompany/ChangeBusinessType.vue index f178a99ca..fb1cd779f 100644 --- a/src/components/common/YourCompany/ChangeBusinessType.vue +++ b/src/components/common/YourCompany/ChangeBusinessType.vue @@ -310,16 +310,6 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) { (this.getNameRequestLegalName !== this.getEntitySnapshot?.businessInfo?.legalName) } - /** Check if current entity selection is a Unlimited Liability Company */ - get isUnlimitedLiability (): boolean { - return (this.selectedEntityType === CorpTypeCd.BC_ULC_COMPANY) - } - - /** Check if current entity selection is a Community Contribution Company */ - get isCommunityContribution (): boolean { - return (this.selectedEntityType === CorpTypeCd.BC_CCC) - } - /** Type change helper information */ get typeChangeInfo (): string { return this.getResource.changeData?.typeChangeInfo