Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16800 - Alteration - If a Corporation is changing to CCC -> 3 Director Requirement #515

Merged
merged 6 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
17 changes: 16 additions & 1 deletion src/components/common/YourCompany/ChangeBusinessType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@
<span class="list-item">{{ data.item.text }}</span>
</template>
</v-select>

<div
v-if="minimumThreeDirectorError"
class="my-6"
>
<p class="error-text">
The business type cannot be changed. A Community Contribution Company requires a minimum of three directors.
</p>
</div>

<div class="my-6">
<p class="info-text">
Businesses can only be altered to specific types. If the business type you want is
Expand All @@ -135,7 +145,7 @@
id="done-btn"
large
color="primary"
:disabled="!confirmArticles"
:disabled="!confirmArticles || minimumThreeDirectorError"
@click="submitTypeChange()"
>
<span>Done</span>
Expand Down Expand Up @@ -258,6 +268,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) hasBusinessNameChanged!: boolean
@Getter(useStore) hasBusinessTypeChanged!: boolean
Expand Down Expand Up @@ -309,6 +320,10 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) {
return this.getResource.changeData?.entityTypeOptions || []
}

get minimumThreeDirectorError (): boolean {
return this.isCommunityContribution && this.getNumberOfDirectors < 3
}

/** Reset company type values to original. */
protected resetType () {
this.setEntityType(this.getEntitySnapshot?.businessInfo?.legalType)
Expand Down
4 changes: 4 additions & 0 deletions src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,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
}

},
Expand Down