From e94d09dcd74937d2519f5b5a82a6bd15e71c50b5 Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Mon, 18 Dec 2023 16:42:43 -0800 Subject: [PATCH] WIP --- package-lock.json | 18 +-- package.json | 4 +- src/App.vue | 6 + src/components/Amalgamation/BusinessTable.vue | 6 +- .../Amalgamation/ResultingBusinessName.vue | 97 ++++++++------- src/components/Restoration/BusinessName.vue | 1 + src/components/common/AddNameTranslation.vue | 1 + src/components/common/NameRequestInfo.vue | 117 +++++++++++++----- src/components/common/NameTranslations.vue | 4 +- src/components/common/Stepper.vue | 4 +- .../common/SummaryDefineCompany.vue | 46 +++++-- src/mixins/amalgamation-mixin.ts | 14 ++- src/mixins/filing-template-mixin.ts | 47 ++++++- src/store/store.ts | 14 ++- src/views/AmalgamationRegular/Information.vue | 19 --- .../IncorporationDefineCompany.vue | 5 +- .../Restoration/RestorationBusinessName.vue | 5 +- tests/unit/NameRequestInfo.spec.ts | 16 ++- 18 files changed, 278 insertions(+), 146 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50005ef04..e266eaca8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@bcrs-shared-components/confirm-dialog": "1.2.1", "@bcrs-shared-components/contact-info": "1.2.15", "@bcrs-shared-components/corp-type-module": "1.0.11", - "@bcrs-shared-components/correct-name": "1.0.33", + "@bcrs-shared-components/correct-name": "1.0.34", "@bcrs-shared-components/court-order-poa": "3.0.11", "@bcrs-shared-components/date-picker": "1.2.15", "@bcrs-shared-components/document-delivery": "1.2.0", @@ -30,7 +30,7 @@ "@bcrs-shared-components/interfaces": "1.1.5", "@bcrs-shared-components/jurisdiction": "1.0.1", "@bcrs-shared-components/limited-restoration-panel": "1.0.5", - "@bcrs-shared-components/mixins": "1.1.33", + "@bcrs-shared-components/mixins": "1.1.34", "@bcrs-shared-components/nature-of-business": "1.2.14", "@bcrs-shared-components/relationships-panel": "1.0.9", "@bcrs-shared-components/staff-comments": "1.3.15", @@ -326,15 +326,15 @@ "integrity": "sha512-+iE3qiySSafiA311m14DuoG9Rq/ranBJNT7Kf7KQ9dJFDNNuTA326pCGwKBeuT1L6pFpGeibXGE+vQ0AYnSPUA==" }, "node_modules/@bcrs-shared-components/correct-name": { - "version": "1.0.33", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/correct-name/-/correct-name-1.0.33.tgz", - "integrity": "sha512-7BsHUQHkmARVAn4Vjw/3EqK+9oCKkCc54p6mlfP49PSmc55Nw4lXDd5aIvvLBDE80snvrVM/AwzJcmC/5dBz+g==", + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/correct-name/-/correct-name-1.0.34.tgz", + "integrity": "sha512-F4dbd7PBI3KsgCqZfZy2n4hqhsJa9wvL8bkR9IIACy1RIQ0Mjv645y4EbHfim1YbEEnAhy2+QAz/9LzpOU+lEQ==", "dependencies": { "@bcrs-shared-components/confirm-dialog": "^1.2.3", "@bcrs-shared-components/corp-type-module": "^1.0.14", "@bcrs-shared-components/enums": "^1.1.5", "@bcrs-shared-components/interfaces": "^1.1.5", - "@bcrs-shared-components/mixins": "^1.1.33", + "@bcrs-shared-components/mixins": "^1.1.34", "@bcrs-shared-components/types": "^1.0.1", "vue": "^2.7.14" } @@ -468,9 +468,9 @@ } }, "node_modules/@bcrs-shared-components/mixins": { - "version": "1.1.33", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/mixins/-/mixins-1.1.33.tgz", - "integrity": "sha512-Pp9mkB5s63zrADcosO3EDnYwkeV4Al6EYeYeRSTqWO7SgPqReBx2I9sMygemz/VWig0uxdtiBibYnPtf9jpcPA==", + "version": "1.1.34", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/mixins/-/mixins-1.1.34.tgz", + "integrity": "sha512-KrccSKhOthyNA9qzl++0RfeURjyq5aJutY+tiHzYB+SqrOmZ5JYvU54p/hvxti/R9RgwFLZQaERaGeIdWWpvsg==", "dependencies": { "@bcrs-shared-components/enums": "^1.1.5", "@bcrs-shared-components/interfaces": "^1.1.5", diff --git a/package.json b/package.json index 31a23ad18..3e966ac4c 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@bcrs-shared-components/confirm-dialog": "1.2.1", "@bcrs-shared-components/contact-info": "1.2.15", "@bcrs-shared-components/corp-type-module": "1.0.11", - "@bcrs-shared-components/correct-name": "1.0.33", + "@bcrs-shared-components/correct-name": "1.0.34", "@bcrs-shared-components/court-order-poa": "3.0.11", "@bcrs-shared-components/date-picker": "1.2.15", "@bcrs-shared-components/document-delivery": "1.2.0", @@ -35,7 +35,7 @@ "@bcrs-shared-components/interfaces": "1.1.5", "@bcrs-shared-components/jurisdiction": "1.0.1", "@bcrs-shared-components/limited-restoration-panel": "1.0.5", - "@bcrs-shared-components/mixins": "1.1.33", + "@bcrs-shared-components/mixins": "1.1.34", "@bcrs-shared-components/nature-of-business": "1.2.14", "@bcrs-shared-components/relationships-panel": "1.0.9", "@bcrs-shared-components/staff-comments": "1.3.15", diff --git a/src/App.vue b/src/App.vue index 8b54a5177..cd7cbd6c8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -945,6 +945,12 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi this.nameRequestInvalidErrorDialog = true }) + // + // The NR checks below are sort-of a duplicate of code in BusinessName.vue and + // ResultingBusinessName.vue, but we assume the other checks passed if the user + // was able to add the NR to this filing, so these checks should be sufficient. + // + // ensure NR was found if (!nrResponse) { this.nameRequestInvalidType = NameRequestStates.NOT_FOUND diff --git a/src/components/Amalgamation/BusinessTable.vue b/src/components/Amalgamation/BusinessTable.vue index bd5c6be12..39697c9b0 100644 --- a/src/components/Amalgamation/BusinessTable.vue +++ b/src/components/Amalgamation/BusinessTable.vue @@ -99,7 +99,6 @@ export default class BusinessTable extends Mixins(AmalgamationMixin) { readonly AmlTypes = AmlTypes readonly GetCorpFullDescription = GetCorpFullDescription - @Action(useStore) setDefineCompanyStepValidity!: (x: boolean) => void @Action(useStore) spliceAmalgamatingBusiness!: (x: number) => void /** @@ -173,7 +172,10 @@ export default class BusinessTable extends Mixins(AmalgamationMixin) { @Watch('businesses', { deep: true, immediate: true }) @Emit('valid') private emitValidity (): boolean { - return this.businesses.every(business => business.status === AmlStatuses.OK) + return ( + this.businesses.length > 0 && + this.businesses.every(business => business.status === AmlStatuses.OK) + ) } } diff --git a/src/components/Amalgamation/ResultingBusinessName.vue b/src/components/Amalgamation/ResultingBusinessName.vue index 6eb9f7d30..7e6bca728 100644 --- a/src/components/Amalgamation/ResultingBusinessName.vue +++ b/src/components/Amalgamation/ResultingBusinessName.vue @@ -5,7 +5,7 @@ >
@@ -27,16 +27,18 @@ > @@ -46,7 +48,7 @@