From fa1312f3d0a129655eb9af4d8c22a7893dac648a Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Tue, 2 Jan 2024 15:53:37 -0800 Subject: [PATCH 01/12] ui parts --- .../Amalgamation/AmalgamationStatement.vue | 89 +++++++++++++++++++ .../AmalgamationRegular/ReviewConfirm.vue | 8 +- 2 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 src/components/Amalgamation/AmalgamationStatement.vue diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue new file mode 100644 index 000000000..eb3b520d7 --- /dev/null +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -0,0 +1,89 @@ + + + + + + diff --git a/src/views/AmalgamationRegular/ReviewConfirm.vue b/src/views/AmalgamationRegular/ReviewConfirm.vue index 0d0d561d1..7c63c6603 100644 --- a/src/views/AmalgamationRegular/ReviewConfirm.vue +++ b/src/views/AmalgamationRegular/ReviewConfirm.vue @@ -174,7 +174,7 @@

Amalgamation Statement

- [*** TODO: blurb ***] + Please indicate the statement applicable to this amalgamation.

@@ -182,8 +182,8 @@ flat class="mt-6" > -
- [*** TODO: Amalgamation Statement component ***] +
+
@@ -280,6 +280,7 @@ import { CourtOrderPoa } from '@bcrs-shared-components/court-order-poa' import { DocumentDelivery } from '@bcrs-shared-components/document-delivery' import FolioNumber from '@/components/common/FolioNumber.vue' import BusinessTableSummary from '@/components/Amalgamation/BusinessTableSummary.vue' +import AmalgamationStatement from '@/components/Amalgamation/AmalgamationStatement.vue' import IncorporationDateTime from '@/components/Incorporation/IncorporationDateTime.vue' import ListPeopleAndRoles from '@/components/common/ListPeopleAndRoles.vue' import ListShareClass from '@/components/common/ListShareClass.vue' @@ -290,6 +291,7 @@ import { FilingNames } from '@bcrs-shared-components/enums' @Component({ components: { + AmalgamationStatement, BusinessTableSummary, CardHeader, Certify, From bbd0f1e842ae89952541ab30bf7d066d0116bd3e Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Tue, 2 Jan 2024 23:03:14 -0800 Subject: [PATCH 02/12] able to store, valid, and update --- .../Amalgamation/AmalgamationStatement.vue | 48 ++++++++++++++----- .../amalgamation-state-interface.ts | 1 + src/store/state/state-model.ts | 1 + src/store/store.ts | 12 ++++- .../AmalgamationRegular/ReviewConfirm.vue | 15 +++++- 5 files changed, 62 insertions(+), 15 deletions(-) diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue index eb3b520d7..62a2922b0 100644 --- a/src/components/Amalgamation/AmalgamationStatement.vue +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -21,6 +21,7 @@ - This amalgamation has been approved by the court and a copy of the - entered court order approving the amalgamation has been obtained - and has been deposited in the records office of each of the + This amalgamation has been approved by the court and a copy of the + entered court order approving the amalgamation has been obtained + and has been deposited in the records office of each of the amalgamating companies.
@@ -44,10 +45,10 @@
- This amalgamation has been effected without court approval. - A copy of all of the required affidavits under section 277(1) - have been obtained and the affidavit obtained from each - amalgamating company has been deposited in that company’s + This amalgamation has been effected without court approval. + A copy of all of the required affidavits under section 277(1) + have been obtained and the affidavit obtained from each + amalgamating company has been deposited in that company’s records office.
@@ -56,16 +57,37 @@ - diff --git a/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts b/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts index e6673a82d..bcedc3519 100644 --- a/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts +++ b/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts @@ -47,5 +47,6 @@ export interface AmalgamationStateIF { amalgamatingBusinesses: Array amalgamatingBusinessesValid: boolean courtApproval: boolean + courtApprovalValid: boolean type: AmalgamationTypes } diff --git a/src/store/state/state-model.ts b/src/store/state/state-model.ts index 2b5b68326..cf2aebf90 100644 --- a/src/store/state/state-model.ts +++ b/src/store/state/state-model.ts @@ -210,6 +210,7 @@ export const stateModel: StateModelIF = { amalgamatingBusinesses: [], amalgamatingBusinessesValid: false, courtApproval: null, + courtApprovalValid: false, type: null }, restoration: { diff --git a/src/store/store.ts b/src/store/store.ts index beb0b34bb..18d182944 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -591,6 +591,7 @@ export const useStore = defineStore('store', { // *** TODO: add checks for review page components const isFolioNumberValid = !this.isPremiumAccount || this.getFolioNumberValid const isCourtOrderValid = this.isRoleStaff ? this.getCourtOrderStep.valid : true + const isCourtApprovalValid = this.getAmalgamationCourtApprovalValid return ( this.isAmalgamationInformationRegValid && @@ -598,7 +599,8 @@ export const useStore = defineStore('store', { this.isAddPeopleAndRolesValid && this.isCreateShareStructureValid && isFolioNumberValid && - isCourtOrderValid + isCourtOrderValid && + isCourtApprovalValid ) }, @@ -780,6 +782,11 @@ export const useStore = defineStore('store', { return this.stateModel.amalgamation.courtApproval }, + /** The amalgamation court approval validity. */ + getAmalgamationCourtApprovalValid (): boolean { + return this.stateModel.amalgamation.courtApprovalValid + }, + // // Dissolution getters // @@ -1275,6 +1282,9 @@ export const useStore = defineStore('store', { setAmalgamationCourtApproval (courtApproval: boolean) { this.stateModel.amalgamation.courtApproval = courtApproval }, + setAmalgamationCourtApprovalValid (valid: boolean) { + this.stateModel.amalgamation.courtApprovalValid = valid + }, setAmalgamationType (type: AmalgamationTypes) { this.stateModel.amalgamation.type = type }, diff --git a/src/views/AmalgamationRegular/ReviewConfirm.vue b/src/views/AmalgamationRegular/ReviewConfirm.vue index 7c63c6603..b93676948 100644 --- a/src/views/AmalgamationRegular/ReviewConfirm.vue +++ b/src/views/AmalgamationRegular/ReviewConfirm.vue @@ -183,7 +183,12 @@ class="mt-6" >
- +
@@ -307,6 +312,7 @@ import { FilingNames } from '@bcrs-shared-components/enums' }) export default class AmalgamationRegularReviewConfirm extends Vue { @Getter(useStore) getAmalgamatingBusinessesValid!: boolean + @Getter(useStore) getAmalgamationCourtApprovalValid!: boolean @Getter(useStore) getBusinessContact!: ContactPointIF @Getter(useStore) getCertifyState!: CertifyIF @Getter(useStore) getCourtOrderStep!: CourtOrderStepIF @@ -322,6 +328,8 @@ export default class AmalgamationRegularReviewConfirm extends Vue { @Getter(useStore) isPremiumAccount!: boolean @Getter(useStore) isRoleStaff!: boolean + @Action(useStore) setAmalgamationCourtApproval!: (x: boolean) => void + @Action(useStore) setAmalgamationCourtApprovalValid!: (x: boolean) => void @Action(useStore) setCertifyState!: (x: CertifyIF) => void @Action(useStore) setCourtOrderFileNumber!: (x: string) => void @Action(useStore) setCourtOrderValidity!: (x: boolean) => void @@ -356,6 +364,11 @@ export default class AmalgamationRegularReviewConfirm extends Vue { get isFolioInvalid (): boolean { return this.getValidateSteps && !(this.getFolioNumberValid) } + + /** Is true when the amalgamation statement is not valid */ + get isAmalgamationStatementInvalid (): boolean { + return this.getValidateSteps && !(this.getAmalgamationCourtApprovalValid) + } } From 36041a5e64eaccf1030cf03328c2f6a08f59f865 Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Wed, 3 Jan 2024 08:33:41 -0800 Subject: [PATCH 03/12] update version --- 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 47d07502b..c79c9ef55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.6.22", + "version": "5.6.23", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.6.22", + "version": "5.6.23", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index d0f05e984..a2b849d6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.6.22", + "version": "5.6.23", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", From b53350143c59fe6c20d754bb749ec4c824586368 Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Tue, 2 Jan 2024 15:53:37 -0800 Subject: [PATCH 04/12] ui parts --- .../Amalgamation/AmalgamationStatement.vue | 89 +++++++++++++++++++ .../AmalgamationRegular/ReviewConfirm.vue | 8 +- 2 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 src/components/Amalgamation/AmalgamationStatement.vue diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue new file mode 100644 index 000000000..eb3b520d7 --- /dev/null +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -0,0 +1,89 @@ + + + + + + diff --git a/src/views/AmalgamationRegular/ReviewConfirm.vue b/src/views/AmalgamationRegular/ReviewConfirm.vue index c3ad902ff..e66cc06d2 100644 --- a/src/views/AmalgamationRegular/ReviewConfirm.vue +++ b/src/views/AmalgamationRegular/ReviewConfirm.vue @@ -174,7 +174,7 @@

Amalgamation Statement

- [*** TODO: blurb ***] + Please indicate the statement applicable to this amalgamation.

@@ -182,8 +182,8 @@ flat class="mt-6" > -
- [*** TODO: Amalgamation Statement component ***] +
+
@@ -280,6 +280,7 @@ import { CourtOrderPoa } from '@bcrs-shared-components/court-order-poa' import { DocumentDelivery } from '@bcrs-shared-components/document-delivery' import FolioNumber from '@/components/common/FolioNumber.vue' import BusinessTableSummary from '@/components/Amalgamation/BusinessTableSummary.vue' +import AmalgamationStatement from '@/components/Amalgamation/AmalgamationStatement.vue' import IncorporationDateTime from '@/components/Incorporation/IncorporationDateTime.vue' import ListPeopleAndRoles from '@/components/common/ListPeopleAndRoles.vue' import ListShareClass from '@/components/common/ListShareClass.vue' @@ -289,6 +290,7 @@ import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp @Component({ components: { + AmalgamationStatement, BusinessTableSummary, CardHeader, Certify, From 08aed908ba5c192e446d8dfad440f2c4816858d2 Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Tue, 2 Jan 2024 23:03:14 -0800 Subject: [PATCH 05/12] able to store, valid, and update --- .../Amalgamation/AmalgamationStatement.vue | 48 ++++++++++++++----- .../amalgamation-state-interface.ts | 1 + src/store/state/state-model.ts | 1 + src/store/store.ts | 12 ++++- .../AmalgamationRegular/ReviewConfirm.vue | 15 +++++- 5 files changed, 62 insertions(+), 15 deletions(-) diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue index eb3b520d7..62a2922b0 100644 --- a/src/components/Amalgamation/AmalgamationStatement.vue +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -21,6 +21,7 @@ - This amalgamation has been approved by the court and a copy of the - entered court order approving the amalgamation has been obtained - and has been deposited in the records office of each of the + This amalgamation has been approved by the court and a copy of the + entered court order approving the amalgamation has been obtained + and has been deposited in the records office of each of the amalgamating companies.
@@ -44,10 +45,10 @@
- This amalgamation has been effected without court approval. - A copy of all of the required affidavits under section 277(1) - have been obtained and the affidavit obtained from each - amalgamating company has been deposited in that company’s + This amalgamation has been effected without court approval. + A copy of all of the required affidavits under section 277(1) + have been obtained and the affidavit obtained from each + amalgamating company has been deposited in that company’s records office.
@@ -56,16 +57,37 @@ - diff --git a/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts b/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts index e6673a82d..bcedc3519 100644 --- a/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts +++ b/src/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface.ts @@ -47,5 +47,6 @@ export interface AmalgamationStateIF { amalgamatingBusinesses: Array amalgamatingBusinessesValid: boolean courtApproval: boolean + courtApprovalValid: boolean type: AmalgamationTypes } diff --git a/src/store/state/state-model.ts b/src/store/state/state-model.ts index 2b5b68326..cf2aebf90 100644 --- a/src/store/state/state-model.ts +++ b/src/store/state/state-model.ts @@ -210,6 +210,7 @@ export const stateModel: StateModelIF = { amalgamatingBusinesses: [], amalgamatingBusinessesValid: false, courtApproval: null, + courtApprovalValid: false, type: null }, restoration: { diff --git a/src/store/store.ts b/src/store/store.ts index beb0b34bb..18d182944 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -591,6 +591,7 @@ export const useStore = defineStore('store', { // *** TODO: add checks for review page components const isFolioNumberValid = !this.isPremiumAccount || this.getFolioNumberValid const isCourtOrderValid = this.isRoleStaff ? this.getCourtOrderStep.valid : true + const isCourtApprovalValid = this.getAmalgamationCourtApprovalValid return ( this.isAmalgamationInformationRegValid && @@ -598,7 +599,8 @@ export const useStore = defineStore('store', { this.isAddPeopleAndRolesValid && this.isCreateShareStructureValid && isFolioNumberValid && - isCourtOrderValid + isCourtOrderValid && + isCourtApprovalValid ) }, @@ -780,6 +782,11 @@ export const useStore = defineStore('store', { return this.stateModel.amalgamation.courtApproval }, + /** The amalgamation court approval validity. */ + getAmalgamationCourtApprovalValid (): boolean { + return this.stateModel.amalgamation.courtApprovalValid + }, + // // Dissolution getters // @@ -1275,6 +1282,9 @@ export const useStore = defineStore('store', { setAmalgamationCourtApproval (courtApproval: boolean) { this.stateModel.amalgamation.courtApproval = courtApproval }, + setAmalgamationCourtApprovalValid (valid: boolean) { + this.stateModel.amalgamation.courtApprovalValid = valid + }, setAmalgamationType (type: AmalgamationTypes) { this.stateModel.amalgamation.type = type }, diff --git a/src/views/AmalgamationRegular/ReviewConfirm.vue b/src/views/AmalgamationRegular/ReviewConfirm.vue index e66cc06d2..c5e019ae5 100644 --- a/src/views/AmalgamationRegular/ReviewConfirm.vue +++ b/src/views/AmalgamationRegular/ReviewConfirm.vue @@ -183,7 +183,12 @@ class="mt-6" >
- +
@@ -306,6 +311,7 @@ import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp }) export default class AmalgamationRegularReviewConfirm extends Vue { @Getter(useStore) getAmalgamatingBusinessesValid!: boolean + @Getter(useStore) getAmalgamationCourtApprovalValid!: boolean @Getter(useStore) getBusinessContact!: ContactPointIF @Getter(useStore) getCertifyState!: CertifyIF @Getter(useStore) getCourtOrderStep!: CourtOrderStepIF @@ -320,6 +326,8 @@ export default class AmalgamationRegularReviewConfirm extends Vue { @Getter(useStore) isPremiumAccount!: boolean @Getter(useStore) isRoleStaff!: boolean + @Action(useStore) setAmalgamationCourtApproval!: (x: boolean) => void + @Action(useStore) setAmalgamationCourtApprovalValid!: (x: boolean) => void @Action(useStore) setCertifyState!: (x: CertifyIF) => void @Action(useStore) setCourtOrderFileNumber!: (x: string) => void @Action(useStore) setCourtOrderValidity!: (x: boolean) => void @@ -354,6 +362,11 @@ export default class AmalgamationRegularReviewConfirm extends Vue { get isFolioInvalid (): boolean { return this.getValidateSteps && !(this.getFolioNumberValid) } + + /** Is true when the amalgamation statement is not valid */ + get isAmalgamationStatementInvalid (): boolean { + return this.getValidateSteps && !(this.getAmalgamationCourtApprovalValid) + } } From 7df8f43fc356a0c66ff4de20523376e6481e472f Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Wed, 3 Jan 2024 11:13:30 -0800 Subject: [PATCH 06/12] able to save --- .../Amalgamation/AmalgamationStatement.vue | 22 +++++++++++++------ src/mixins/filing-template-mixin.ts | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue index 62a2922b0..7b1f0172f 100644 --- a/src/components/Amalgamation/AmalgamationStatement.vue +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -21,7 +21,7 @@ import Vue from 'vue' -import { Emit, Watch } from 'vue-property-decorator' +import { Component, Emit } from 'vue-property-decorator' import { AmalgamationStateIF } from '@/interfaces/store-interfaces/state-interfaces/amalgamation-state-interface' -import { useStore } from '@/store/store' import { Getter } from 'pinia-class' +import { useStore } from '@/store/store' +@Component({}) export default class AmalgamationStatement extends Vue { @Getter(useStore) getAmalgamationCourtApproval!: boolean + // Local properties courtApproval: AmalgamationStateIF['courtApproval'] = null - changeCourtApproval (): void { - this.setCourtApproval(this.courtApproval) + /** Called when component is mounted. */ + mounted (): void { + if (this.getAmalgamationCourtApproval != null) { + this.courtApproval = this.getAmalgamationCourtApproval + } } + // Emit a boolean which is whether the court approval have been selected @Emit('update') private courtApprovalUpdate (): boolean { + console.log(this.courtApproval) return this.courtApproval } + // Emit a boolean (validation) which is either option being selected @Emit('valid') private amalgamationStatementValid (event: boolean): boolean { return event } - @Watch('courtApproval') - private setCourtApproval (val) { + // Once either option being selected, update court approval and validation + setCourtApproval (): void { this.courtApprovalUpdate() this.amalgamationStatementValid(true) } diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index ea8b939b0..7b6bc50d0 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -262,7 +262,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM } // restore the amalgamation court approval - if (draftFiling.amalgamationApplication.courtApproval) { + if (draftFiling.amalgamationApplication.courtApproval != null) { this.setAmalgamationCourtApproval(draftFiling.amalgamationApplication.courtApproval) } From 3e3a1978933d99ee248c9df474f3eb6e3ed154a1 Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Fri, 5 Jan 2024 09:13:38 -0800 Subject: [PATCH 07/12] still working on adding test file, fix other comments --- package-lock.json | 4 +- package.json | 2 +- .../Amalgamation/AmalgamationStatement.vue | 51 +++++++++++-------- src/mixins/filing-template-mixin.ts | 2 +- src/store/store.ts | 3 +- .../AmalgamationRegular/ReviewConfirm.vue | 19 +++---- 6 files changed, 40 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 75d7424a6..186ca30a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.6.24", + "version": "5.6.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.6.24", + "version": "5.6.25", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index 53ea13317..87f4f94e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.6.24", + "version": "5.6.25", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue index 7b1f0172f..8fff47eb1 100644 --- a/src/components/Amalgamation/AmalgamationStatement.vue +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -2,6 +2,7 @@ -
This amalgamation has been approved by the court and a copy of the entered court order approving the amalgamation has been obtained and has been deposited in the records office of each of the amalgamating companies. -
+

-
This amalgamation has been effected without court approval. A copy of all of the required affidavits under section 277(1) have been obtained and the affidavit obtained from each amalgamating company has been deposited in that company’s records office. -
+

@@ -73,27 +76,22 @@ export default class AmalgamationStatement extends Vue { /** Called when component is mounted. */ mounted (): void { - if (this.getAmalgamationCourtApproval != null) { - this.courtApproval = this.getAmalgamationCourtApproval - } + this.courtApproval = this.getAmalgamationCourtApproval } - // Emit a boolean which is whether the court approval have been selected + // Emit a boolean which is whether come with the court approval @Emit('update') - private courtApprovalUpdate (): boolean { - console.log(this.courtApproval) - return this.courtApproval - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + private courtApprovalUpdate (courtApproval: boolean): void {} // Emit a boolean (validation) which is either option being selected @Emit('valid') - private amalgamationStatementValid (event: boolean): boolean { - return event - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + private amalgamationStatementValid (valid: boolean): void {} // Once either option being selected, update court approval and validation setCourtApproval (): void { - this.courtApprovalUpdate() + this.courtApprovalUpdate(this.courtApproval) this.amalgamationStatementValid(true) } } @@ -103,17 +101,26 @@ export default class AmalgamationStatement extends Vue { @import '@/assets/styles/theme.scss'; #amalgamation-statement { - padding: 1.25rem; - line-height: 1.2rem; - font-size: 1rem; + font-size: 16px; } .statement-text { color: $gray7; + font-size: 16px; +} + +:deep() { + // Fix text color for all the radio buttons + .radio-button { + label { + color: $gray7; + } + } } label { font-weight: bold; + color: $gray9; } diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index 7b6bc50d0..d3999bb4d 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -262,7 +262,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM } // restore the amalgamation court approval - if (draftFiling.amalgamationApplication.courtApproval != null) { + if (draftFiling.amalgamationApplication.courtApproval !== null) { this.setAmalgamationCourtApproval(draftFiling.amalgamationApplication.courtApproval) } diff --git a/src/store/store.ts b/src/store/store.ts index 18d182944..3acf7ad06 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -591,7 +591,6 @@ export const useStore = defineStore('store', { // *** TODO: add checks for review page components const isFolioNumberValid = !this.isPremiumAccount || this.getFolioNumberValid const isCourtOrderValid = this.isRoleStaff ? this.getCourtOrderStep.valid : true - const isCourtApprovalValid = this.getAmalgamationCourtApprovalValid return ( this.isAmalgamationInformationRegValid && @@ -600,7 +599,7 @@ export const useStore = defineStore('store', { this.isCreateShareStructureValid && isFolioNumberValid && isCourtOrderValid && - isCourtApprovalValid + this.getAmalgamationCourtApprovalValid ) }, diff --git a/src/views/AmalgamationRegular/ReviewConfirm.vue b/src/views/AmalgamationRegular/ReviewConfirm.vue index c5e019ae5..f271e30c9 100644 --- a/src/views/AmalgamationRegular/ReviewConfirm.vue +++ b/src/views/AmalgamationRegular/ReviewConfirm.vue @@ -178,19 +178,12 @@

- -
- -
-
+ From dd4e99d93161c1c11f4e8019bc044e411fc5f39d Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Fri, 5 Jan 2024 09:16:03 -0800 Subject: [PATCH 08/12] package conflict --- 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 186ca30a7..75d7424a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.6.25", + "version": "5.6.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.6.25", + "version": "5.6.24", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index 87f4f94e5..53ea13317 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.6.25", + "version": "5.6.24", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", From c0a970fe7bcb4b136728a899a9b260fd747039c3 Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Fri, 5 Jan 2024 10:28:26 -0800 Subject: [PATCH 09/12] add unit text file --- tests/unit/AmalgamationStatement.spec.ts | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/unit/AmalgamationStatement.spec.ts diff --git a/tests/unit/AmalgamationStatement.spec.ts b/tests/unit/AmalgamationStatement.spec.ts new file mode 100644 index 000000000..8a7de1968 --- /dev/null +++ b/tests/unit/AmalgamationStatement.spec.ts @@ -0,0 +1,30 @@ +import Vuetify from 'vuetify' +import { mount } from '@vue/test-utils' +import { createPinia, setActivePinia } from 'pinia' +import AmalgamationStatement from '@/components/Amalgamation/AmalgamationStatement.vue' + +const vuetify = new Vuetify({}) +setActivePinia(createPinia()) + +describe('AmalgamationStatement', () => { + it('displays expected content', async () => { + const wrapper = mount(AmalgamationStatement, { vuetify }) + + // sanity check + expect(wrapper.find('#amalgamation-statement')).toBeDefined() + + // verify radio button component + let radioBtns = wrapper.findAll('.radio-button') + expect(radioBtns.length).toBe(2) + expect(radioBtns.at(0).text()).toBe('With Court Approval') + expect(radioBtns.at(1).text()).toBe('Without Court Approval') + + // verify statement text + let btnsText = wrapper.findAll('.statement-text') + expect(btnsText.length).toBe(2) + expect(btnsText.at(0).text()).toContain('This amalgamation has been approved by the court') + expect(btnsText.at(1).text()).toContain('This amalgamation has been effected without court approval.') + + wrapper.destroy() + }) +}) \ No newline at end of file From e749afb3b6320424df9f587eb07d8c34320145bb Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Fri, 5 Jan 2024 10:34:38 -0800 Subject: [PATCH 10/12] lint and version --- package-lock.json | 4 +-- package.json | 2 +- tests/unit/AmalgamationStatement.spec.ts | 36 ++++++++++++------------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 75d7424a6..186ca30a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-create-ui", - "version": "5.6.24", + "version": "5.6.25", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.6.24", + "version": "5.6.25", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", diff --git a/package.json b/package.json index 53ea13317..87f4f94e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.6.24", + "version": "5.6.25", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", diff --git a/tests/unit/AmalgamationStatement.spec.ts b/tests/unit/AmalgamationStatement.spec.ts index 8a7de1968..a9e381b5d 100644 --- a/tests/unit/AmalgamationStatement.spec.ts +++ b/tests/unit/AmalgamationStatement.spec.ts @@ -7,24 +7,24 @@ const vuetify = new Vuetify({}) setActivePinia(createPinia()) describe('AmalgamationStatement', () => { - it('displays expected content', async () => { - const wrapper = mount(AmalgamationStatement, { vuetify }) + it('displays expected content', async () => { + const wrapper = mount(AmalgamationStatement, { vuetify }) - // sanity check - expect(wrapper.find('#amalgamation-statement')).toBeDefined() + // sanity check + expect(wrapper.find('#amalgamation-statement')).toBeDefined() - // verify radio button component - let radioBtns = wrapper.findAll('.radio-button') - expect(radioBtns.length).toBe(2) - expect(radioBtns.at(0).text()).toBe('With Court Approval') - expect(radioBtns.at(1).text()).toBe('Without Court Approval') + // verify radio button component + const radioBtns = wrapper.findAll('.radio-button') + expect(radioBtns.length).toBe(2) + expect(radioBtns.at(0).text()).toBe('With Court Approval') + expect(radioBtns.at(1).text()).toBe('Without Court Approval') - // verify statement text - let btnsText = wrapper.findAll('.statement-text') - expect(btnsText.length).toBe(2) - expect(btnsText.at(0).text()).toContain('This amalgamation has been approved by the court') - expect(btnsText.at(1).text()).toContain('This amalgamation has been effected without court approval.') - - wrapper.destroy() - }) -}) \ No newline at end of file + // verify statement text + const btnsText = wrapper.findAll('.statement-text') + expect(btnsText.length).toBe(2) + expect(btnsText.at(0).text()).toContain('This amalgamation has been approved by the court') + expect(btnsText.at(1).text()).toContain('This amalgamation has been effected without court approval.') + + wrapper.destroy() + }) +}) From 9f2703ab95e8f3186c911e5b740b24ecf86f08de Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Fri, 5 Jan 2024 12:06:41 -0800 Subject: [PATCH 11/12] add comments --- .../Amalgamation/AmalgamationStatement.vue | 13 ++++++++++--- src/mixins/filing-template-mixin.ts | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue index 8fff47eb1..5f75f742c 100644 --- a/src/components/Amalgamation/AmalgamationStatement.vue +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -79,11 +79,18 @@ export default class AmalgamationStatement extends Vue { this.courtApproval = this.getAmalgamationCourtApproval } - // Emit a boolean which is whether come with the court approval + /** + * Emit a value and event to the parent to handle updating. + * @param courtApproval The value to emit. + */ @Emit('update') // eslint-disable-next-line @typescript-eslint/no-unused-vars private courtApprovalUpdate (courtApproval: boolean): void {} + /** + * Emit a value and event to the parent to handle validation. + * @param valid The value to emit. + */ // Emit a boolean (validation) which is either option being selected @Emit('valid') // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -101,12 +108,12 @@ export default class AmalgamationStatement extends Vue { @import '@/assets/styles/theme.scss'; #amalgamation-statement { - font-size: 16px; + font-size: $px-16; } .statement-text { color: $gray7; - font-size: 16px; + font-size: $px-16; } :deep() { diff --git a/src/mixins/filing-template-mixin.ts b/src/mixins/filing-template-mixin.ts index d3999bb4d..09e9214b0 100644 --- a/src/mixins/filing-template-mixin.ts +++ b/src/mixins/filing-template-mixin.ts @@ -261,7 +261,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM this.refetchAmalgamatingBusinessesInfo() } - // restore the amalgamation court approval + // restore the amalgamation court approval selection which the saved value is either true or false if (draftFiling.amalgamationApplication.courtApproval !== null) { this.setAmalgamationCourtApproval(draftFiling.amalgamationApplication.courtApproval) } From 8a001315e3ef9ebb1e457fe7c27b43495cbc67b3 Mon Sep 17 00:00:00 2001 From: tshyun24 Date: Fri, 5 Jan 2024 12:37:59 -0800 Subject: [PATCH 12/12] JSDoc syntax --- src/components/Amalgamation/AmalgamationStatement.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Amalgamation/AmalgamationStatement.vue b/src/components/Amalgamation/AmalgamationStatement.vue index 5f75f742c..8d258f848 100644 --- a/src/components/Amalgamation/AmalgamationStatement.vue +++ b/src/components/Amalgamation/AmalgamationStatement.vue @@ -91,12 +91,11 @@ export default class AmalgamationStatement extends Vue { * Emit a value and event to the parent to handle validation. * @param valid The value to emit. */ - // Emit a boolean (validation) which is either option being selected @Emit('valid') // eslint-disable-next-line @typescript-eslint/no-unused-vars private amalgamationStatementValid (valid: boolean): void {} - // Once either option being selected, update court approval and validation + /** Update court approval and validation when either option is being selected. */ setCourtApproval (): void { this.courtApprovalUpdate(this.courtApproval) this.amalgamationStatementValid(true)