From dd48c2995d300f340c155b2d92d7ed0cc7f56b61 Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Fri, 24 May 2024 09:34:32 -0700 Subject: [PATCH 1/2] - app version = 5.10.12 - added COLIN env config - imported some updated shared components - added COLIN vault keys - added a base class - misc cleanup - added error dialog to Extrapro Registration - re-worked Extrapro Registration components, layout, logic, etc - added rules + validation - added date picker - removed ULC radio group - finished affidavit file upload - changed historical fields to display-only - changed active fields to all editable - added jurisdiction conversions - fixed some Manual Business Info bugs + cleanup - added BN hints - re-worked Summary Business Home Jurisdiction fields, etc - added conditional contact info to Generic Error Dialog - added Colin Business interface - updated Continuation In Filing interface - updated Continuation Authorization interface - updated Existing Business Info interface - updated filing save/restore code - added Colin Services module - added store getters for new (continuation in) entity types - added COLIN keys to Fetch Config - updated unit test --- .env.example | 2 + devops/vaults.env | 2 + package-lock.json | 65 +- package.json | 12 +- src/assets/styles/base.scss | 4 + .../ContinuationAuthorization.vue | 8 +- .../ContinuationIn/ExtraproRegistration.vue | 635 +++++++++++++----- .../ContinuationIn/ManualBusinessInfo.vue | 136 ++-- .../SummaryBusinessHomeJurisdiction.vue | 114 ++-- .../Registration/BusinessNumber.vue | 6 - src/dialogs/GenericErrorDialog.vue | 5 +- .../colin-business-interface.ts | 14 + .../existing-business-info-interface.ts | 33 - .../filing-interfaces/filing-interfaces.ts | 11 +- src/interfaces/index.ts | 5 +- .../continuation-authorization-interface.ts | 0 .../existing-business-info-interface.ts | 36 + src/mixins/filing-template-mixin.ts | 40 +- src/services/auth-services.ts | 4 +- src/services/colin-services.ts | 23 + src/services/index.ts | 1 + src/store/store.ts | 22 +- src/utils/AxiosInstance.ts | 5 + src/utils/FetchConfig.ts | 3 + .../ContinuationInBusinessHome.vue | 2 +- .../SummaryBusinessHomeJurisdiction.spec.ts | 11 +- 26 files changed, 772 insertions(+), 427 deletions(-) create mode 100644 src/interfaces/filing-interfaces/colin-business-interface.ts delete mode 100644 src/interfaces/filing-interfaces/existing-business-info-interface.ts rename src/interfaces/{filing-interfaces => store-interfaces/state-interfaces}/continuation-authorization-interface.ts (100%) create mode 100644 src/interfaces/store-interfaces/state-interfaces/existing-business-info-interface.ts create mode 100644 src/services/colin-services.ts diff --git a/.env.example b/.env.example index 088e6eead..1ec419aee 100644 --- a/.env.example +++ b/.env.example @@ -14,6 +14,8 @@ VUE_APP_SITEMINDER_LOGOUT_URL="https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi" #vaults API VUE_APP_AUTH_API_URL="https://auth-api-dev.apps.silver.devops.gov.bc.ca" VUE_APP_AUTH_API_VERSION="/api/v1" +VUE_APP_COLIN_API_URL="https://colin-api-dev.apps.silver.devops.gov.bc.ca" +VUE_APP_COLIN_API_VERSION="/api/v1" VUE_APP_LEGAL_API_URL="https://legal-api-dev.apps.silver.devops.gov.bc.ca" VUE_APP_LEGAL_API_VERSION_2="/api/v2" VUE_APP_NAICS_API_URL="https://legal-api-dev.apps.silver.devops.gov.bc.ca" diff --git a/devops/vaults.env b/devops/vaults.env index 0d530e6ab..5fd04e581 100644 --- a/devops/vaults.env +++ b/devops/vaults.env @@ -14,6 +14,8 @@ VUE_APP_SITEMINDER_LOGOUT_URL="op://web-url/$APP_ENV/siteminder/SITEMINDER_LOGOU #vaults API VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL" VUE_APP_AUTH_API_VERSION="op://API/$APP_ENV/auth-api/AUTH_API_VERSION" +VUE_APP_COLIN_API_URL="op://API/$APP_ENV/colin-api-entity/COLIN_API_URL" +VUE_APP_COLIN_API_VERSION="op://API/$APP_ENV/colin-api-entity/COLIN_API_VERSION" VUE_APP_LEGAL_API_URL="op://API/$APP_ENV/legal-api/LEGAL_API_URL" VUE_APP_LEGAL_API_VERSION_2="op://API/$APP_ENV/legal-api/LEGAL_API_VERSION_2" VUE_APP_NAICS_API_URL="op://API/$APP_ENV/naics-api/NAICS_API_URL" diff --git a/package-lock.json b/package-lock.json index cc72dd534..de2547f21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "business-create-ui", - "version": "5.10.11", + "version": "5.10.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-create-ui", - "version": "5.10.11", + "version": "5.10.12", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/approval-type": "1.0.19", "@bcrs-shared-components/base-address": "2.0.3", "@bcrs-shared-components/breadcrumb": "2.1.15", - "@bcrs-shared-components/business-lookup": "1.3.1", + "@bcrs-shared-components/business-lookup": "1.3.3", "@bcrs-shared-components/certify": "2.1.15", "@bcrs-shared-components/completing-party": "2.1.30", "@bcrs-shared-components/confirm-dialog": "1.2.1", @@ -20,17 +20,17 @@ "@bcrs-shared-components/corp-type-module": "1.0.16", "@bcrs-shared-components/correct-name": "1.0.46", "@bcrs-shared-components/court-order-poa": "3.0.11", - "@bcrs-shared-components/date-picker": "1.2.15", + "@bcrs-shared-components/date-picker": "1.2.55", "@bcrs-shared-components/document-delivery": "1.2.0", "@bcrs-shared-components/effective-date-time": "1.1.15", "@bcrs-shared-components/enums": "1.1.10", "@bcrs-shared-components/expandable-help": "1.0.1", "@bcrs-shared-components/genesys-web-message": "1.0.0", "@bcrs-shared-components/help-business-number": "1.1.1", - "@bcrs-shared-components/interfaces": "1.1.13", - "@bcrs-shared-components/jurisdiction": "1.1.2", + "@bcrs-shared-components/interfaces": "1.1.15", + "@bcrs-shared-components/jurisdiction": "1.1.3", "@bcrs-shared-components/limited-restoration-panel": "1.0.5", - "@bcrs-shared-components/mixins": "1.1.44", + "@bcrs-shared-components/mixins": "1.1.46", "@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", @@ -242,16 +242,6 @@ "vue-property-decorator": "^9.1.2" } }, - "node_modules/@bcrs-shared-components/approval-type/node_modules/@bcrs-shared-components/date-picker": { - "version": "1.2.52", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/date-picker/-/date-picker-1.2.52.tgz", - "integrity": "sha512-t9jPVfUb+RbQxN5GEpRs8zXOIoUddXWNXgqn7eV+0pocxLrmrTRfAUUck6l7cp/XdKbl9dtE12gpp5k8Jl+Cug==", - "dependencies": { - "@bcrs-shared-components/interfaces": "^1.1.12", - "@bcrs-shared-components/mixins": "^1.1.43", - "vue": "^2.7.14" - } - }, "node_modules/@bcrs-shared-components/base-address": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@bcrs-shared-components/base-address/-/base-address-2.0.3.tgz", @@ -273,11 +263,11 @@ } }, "node_modules/@bcrs-shared-components/business-lookup": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/business-lookup/-/business-lookup-1.3.1.tgz", - "integrity": "sha512-fq4dcDDFlLOa8Bm2JAx+HPaUUQ49I63Ab/gak0yBuIqnV9VDepgHn3Hz3GzRIQkNjJHvZjEKd5tXmYhWOLZ0xQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/business-lookup/-/business-lookup-1.3.3.tgz", + "integrity": "sha512-6m7ILSKZc8MP2TpYnD5K1tsXF8+9o+5D58d0UlZwnThSzRaRRFYt1BvHnSkbHg7ov26PHWpRlg2uYYmYZQwyUQ==", "dependencies": { - "@bcrs-shared-components/interfaces": "^1.1.13", + "@bcrs-shared-components/interfaces": "^1.1.15", "lodash": "4.17.21", "vue": "^2.7.14" } @@ -358,12 +348,13 @@ } }, "node_modules/@bcrs-shared-components/date-picker": { - "version": "1.2.15", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/date-picker/-/date-picker-1.2.15.tgz", - "integrity": "sha512-zG/tFZgRHDVx1xaR5cz+MdlzN0HFW9jkPIQuUjtSpD1DLYaas2NDzPmBfuPboVMMKfjh/2AvhiPPQDAQZIz89Q==", + "version": "1.2.55", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/date-picker/-/date-picker-1.2.55.tgz", + "integrity": "sha512-QjFr4iBjJFyifMOimWTOI+ayxGPPaxNJj6ofUpA71AV7+4WLgIFX+mKGaYFkqCtqSJgFR6Y/Kb1e7VP4Jk1SsA==", "dependencies": { - "@bcrs-shared-components/interfaces": "^1.0.58", - "vue-property-decorator": "^9.1.2" + "@bcrs-shared-components/interfaces": "^1.1.15", + "@bcrs-shared-components/mixins": "^1.1.46", + "vue": "^2.7.14" } }, "node_modules/@bcrs-shared-components/document-delivery": { @@ -427,9 +418,9 @@ } }, "node_modules/@bcrs-shared-components/interfaces": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/interfaces/-/interfaces-1.1.13.tgz", - "integrity": "sha512-+ukMaxz8mChD3gF5km8fW+afsO+7l4tZKyNsBkgWUVIC4eSqDO9XVSVOEAJS3e+R5dM4jdORbiHZzL4kkUT4ZQ==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/interfaces/-/interfaces-1.1.15.tgz", + "integrity": "sha512-wPL9eQS7ILJ3gUecakAj3WHIavkLE5mFANUfeL7c9JFFBxlk46CsSeRvOoJSTzB3Br5vjGv4Y+Tk70yqk56eYA==", "dependencies": { "@bcrs-shared-components/corp-type-module": "^1.0.16", "@bcrs-shared-components/enums": "^1.1.10", @@ -437,11 +428,13 @@ } }, "node_modules/@bcrs-shared-components/jurisdiction": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/jurisdiction/-/jurisdiction-1.1.2.tgz", - "integrity": "sha512-WynkqBVlXjgoBRVe8W6RDh7dzODmLxVO9K0Gxe/5kX6EgbnkueK0NUsvcQl+qq/i+MSiKkZpyRMxAJY0sLTs8A==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/jurisdiction/-/jurisdiction-1.1.3.tgz", + "integrity": "sha512-LvHMAaMelmicH4Oiwe1jW0IFlSGnv0ReC+PsISULaQJw1CGXsMUuKZjJkc2bkEM3FKi9tKQEcNsf3298c8zCTw==", "dependencies": { "@bcrs-shared-components/enums": "^1.1.10", + "@bcrs-shared-components/interfaces": "^1.1.15", + "@bcrs-shared-components/mixins": "^1.1.46", "vue": "^2.7.14" } }, @@ -454,13 +447,13 @@ } }, "node_modules/@bcrs-shared-components/mixins": { - "version": "1.1.44", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/mixins/-/mixins-1.1.44.tgz", - "integrity": "sha512-alY2txATh3joXOs7DLi1XsgeIloll/9Vr7sz0mxUSUN0CXWrU0l9ROH42d5Nrr5vueWczTHZxyv/WLYSd6TPGg==", + "version": "1.1.46", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/mixins/-/mixins-1.1.46.tgz", + "integrity": "sha512-owtneegoCUw6S4L/dXk3wNczo09JtmibYg7jHgO6E1f4a2qm0yggq84cJL3c8oWU7UAJzKXjjtWT+TKFIRrWyA==", "dependencies": { "@bcrs-shared-components/corp-type-module": "^1.0.16", "@bcrs-shared-components/enums": "^1.1.10", - "@bcrs-shared-components/interfaces": "^1.1.13", + "@bcrs-shared-components/interfaces": "^1.1.15", "country-list": "^2.3.0", "lodash": "4.17.21", "provinces": "^1.11.0", diff --git a/package.json b/package.json index 69dd9238e..8741e9859 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-create-ui", - "version": "5.10.11", + "version": "5.10.12", "private": true, "appName": "Create UI", "sbcName": "SBC Common Components", @@ -17,7 +17,7 @@ "@bcrs-shared-components/approval-type": "1.0.19", "@bcrs-shared-components/base-address": "2.0.3", "@bcrs-shared-components/breadcrumb": "2.1.15", - "@bcrs-shared-components/business-lookup": "1.3.1", + "@bcrs-shared-components/business-lookup": "1.3.3", "@bcrs-shared-components/certify": "2.1.15", "@bcrs-shared-components/completing-party": "2.1.30", "@bcrs-shared-components/confirm-dialog": "1.2.1", @@ -25,17 +25,17 @@ "@bcrs-shared-components/corp-type-module": "1.0.16", "@bcrs-shared-components/correct-name": "1.0.46", "@bcrs-shared-components/court-order-poa": "3.0.11", - "@bcrs-shared-components/date-picker": "1.2.15", + "@bcrs-shared-components/date-picker": "1.2.55", "@bcrs-shared-components/document-delivery": "1.2.0", "@bcrs-shared-components/effective-date-time": "1.1.15", "@bcrs-shared-components/enums": "1.1.10", "@bcrs-shared-components/expandable-help": "1.0.1", "@bcrs-shared-components/genesys-web-message": "1.0.0", "@bcrs-shared-components/help-business-number": "1.1.1", - "@bcrs-shared-components/interfaces": "1.1.13", - "@bcrs-shared-components/jurisdiction": "1.1.2", + "@bcrs-shared-components/interfaces": "1.1.15", + "@bcrs-shared-components/jurisdiction": "1.1.3", "@bcrs-shared-components/limited-restoration-panel": "1.0.5", - "@bcrs-shared-components/mixins": "1.1.44", + "@bcrs-shared-components/mixins": "1.1.46", "@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/assets/styles/base.scss b/src/assets/styles/base.scss index e121207c5..1d18ae8d7 100644 --- a/src/assets/styles/base.scss +++ b/src/assets/styles/base.scss @@ -241,6 +241,10 @@ p { font-size: $px-14; } +.font-15 { + font-size: $px-15; +} + .error-text { color: $app-red !important; } diff --git a/src/components/ContinuationIn/ContinuationAuthorization.vue b/src/components/ContinuationIn/ContinuationAuthorization.vue index e3e3f0b2f..d12b94a92 100644 --- a/src/components/ContinuationIn/ContinuationAuthorization.vue +++ b/src/components/ContinuationIn/ContinuationAuthorization.vue @@ -12,6 +12,7 @@ lazy-validation @submit.prevent > + + + import { Component, Emit, Mixins, Watch } from 'vue-property-decorator' import { Action, Getter } from 'pinia-class' +import { StatusCodes } from 'http-status-codes' import { useStore } from '@/store/store' import { DocumentMixin } from '@/mixins' import { ContinuationAuthorizationIF, FormIF, PresignedUrlIF } from '@/interfaces' @@ -149,6 +153,7 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) { expiryDateRef: DatePickerShared, formRef: FormIF } + readonly PdfPageSize = PdfPageSize @Getter(useStore) getContinuationAuthorization!: ContinuationAuthorizationIF @@ -189,6 +194,7 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) { return Math.min((this.authorization.files.length + 1), 5) } + /** Called when this component is mounted. */ mounted (): void { // set or initialize authorization object this.authorization = this.getContinuationAuthorization || { files: [] } as ContinuationAuthorizationIF @@ -227,7 +233,7 @@ export default class ExtraproRegistration extends Mixins(DocumentMixin) { try { psu = await this.getPresignedUrl(file.name) const res = await this.uploadToUrl(psu.preSignedUrl, file, psu.key, this.getKeycloakGuid) - if (!res || res.status !== 200) throw new Error() + if (!res || res.status !== StatusCodes.OK) throw new Error() } catch { // put file uploader into manual error mode by setting custom error message this.customErrorMessage[index] = this.UPLOAD_FAILED_MESSAGE diff --git a/src/components/ContinuationIn/ExtraproRegistration.vue b/src/components/ContinuationIn/ExtraproRegistration.vue index dfa6effaa..0b9d03583 100644 --- a/src/components/ContinuationIn/ExtraproRegistration.vue +++ b/src/components/ContinuationIn/ExtraproRegistration.vue @@ -1,5 +1,14 @@