diff --git a/.env.example b/.env.example index 700fe6c7..aa14a782 100644 --- a/.env.example +++ b/.env.example @@ -1,20 +1,22 @@ # Base Path Openshift: /businesses/edit Firebase: / VUE_APP_PATH="/" -#vaults Shared +# vaults Shared VUE_APP_ADDRESS_COMPLETE_KEY= -#vaults web-url +# vaults web-url VUE_APP_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/" VUE_APP_AUTH_WEB_URL="https://dev.account.bcregistry.gov.bc.ca/" VUE_APP_BUSINESSES_URL="https://dev.account.bcregistry.gov.bc.ca/" VUE_APP_DASHBOARD_URL="https://dev.business.bcregistry.gov.bc.ca/" VUE_APP_SITEMINDER_LOGOUT_URL="https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi" -#vaults API +# 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_LEGAL_API_URL="https://legal-api-dev.apps.silver.devops.gov.bc.ca" +# for Legal Name feature branch only: +VUE_APP_LEGAL_API_URL="https://business-api-dy4loprnwa-nn.a.run.app" +#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" VUE_APP_NAICS_API_VERSION_2="/api/v2" @@ -26,16 +28,16 @@ VUE_APP_REGISTRIES_SEARCH_API_URL="https://bcregistry-dev.apigee.net/registry-se VUE_APP_REGISTRIES_SEARCH_API_VERSION="/api/v1" VUE_APP_REGISTRIES_SEARCH_API_KEY= -#vaults launchdarkly +# vaults launchdarkly VUE_APP_BUSINESS_EDIT_LD_CLIENT_ID="642af8daefad6f134479c602" -#vaults keycloak +# vaults keycloak VUE_APP_KEYCLOAK_AUTH_URL="https://dev.loginproxy.gov.bc.ca/auth" VUE_APP_KEYCLOAK_REALM="bcregistry" VUE_APP_KEYCLOAK_CLIENTID="entity-web" -#vaults sentry +# vaults sentry VUE_APP_SENTRY_DSN= -#vaults hotjar +# vaults hotjar VUE_APP_HOTJAR_ID= diff --git a/devops/vaults.env b/devops/vaults.env index 4f8c4533..9a799d2c 100644 --- a/devops/vaults.env +++ b/devops/vaults.env @@ -1,20 +1,22 @@ # Base Path Openshift: /businesses/edit Firebase: / VUE_APP_PATH="/" -#vaults Shared +# vaults Shared VUE_APP_ADDRESS_COMPLETE_KEY="op://canadapost/$APP_ENV/address-key/ADDRESS_COMPLETE_KEY" -#vaults web-url +# vaults web-url VUE_APP_REGISTRY_HOME_URL="op://web-url/$APP_ENV/registry/REGISTRY_HOME_URL" VUE_APP_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL" VUE_APP_BUSINESSES_URL="op://web-url/$APP_ENV/business/BUSINESSES_URL" VUE_APP_DASHBOARD_URL="op://web-url/$APP_ENV/business/DASHBOARD_URL" VUE_APP_SITEMINDER_LOGOUT_URL="op://web-url/$APP_ENV/siteminder/SITEMINDER_LOGOUT_URL" -#vaults API +# 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_LEGAL_API_URL="op://API/$APP_ENV/legal-api/LEGAL_API_URL" +# for Legal Name feature branch only: +VUE_APP_LEGAL_API_URL="op://API/$APP_ENV/legal-api/LEGAL_NAME_API_URL" +#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" VUE_APP_NAICS_API_VERSION_2="op://API/$APP_ENV/naics-api/NAICS_API_VERSION" @@ -26,16 +28,16 @@ VUE_APP_REGISTRIES_SEARCH_API_URL="op://API/$APP_ENV/registries-search-api/REGIS VUE_APP_REGISTRIES_SEARCH_API_VERSION="op://API/$APP_ENV/registries-search-api/REGISTRIES_SEARCH_API_VERSION" VUE_APP_REGISTRIES_SEARCH_API_KEY="op://API/$APP_ENV/registries-search-api/REGISTRIES_SEARCH_API_KEY" -#vaults launchdarkly +# vaults launchdarkly VUE_APP_BUSINESS_EDIT_LD_CLIENT_ID="op://launchdarkly/$APP_ENV/business-edit/BUSINESS_EDIT_LD_CLIENT_ID" -#vaults keycloak +# vaults keycloak VUE_APP_KEYCLOAK_AUTH_URL="op://keycloak/$APP_ENV/base/KEYCLOAK_AUTH_BASE_URL" VUE_APP_KEYCLOAK_REALM="op://keycloak/$APP_ENV/base/KEYCLOAK_REALMNAME" VUE_APP_KEYCLOAK_CLIENTID="op://keycloak/$APP_ENV/entity-web/UI_KEYCLOAK_RESOURCE_NAME" -#vaults sentry +# vaults sentry VUE_APP_SENTRY_DSN="op://sentry/$APP_ENV/entity/SENTRY_DSN" -#vaults hotjar (hotjar id - ready to use) +# vaults hotjar (hotjar id - ready to use) VUE_APP_HOTJAR_ID= \ No newline at end of file diff --git a/firebase.json b/firebase.json index 07668cb2..4d421867 100644 --- a/firebase.json +++ b/firebase.json @@ -20,7 +20,7 @@ { "key" : "X-XSS-Protection", "value" : "1; mode=block" }, { "key": "Content-Security-Policy", - "value": "default-src 'self'; frame-src 'self' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; script-src 'self' 'unsafe-eval' 'unsafe-inline' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; style-src 'self' 'unsafe-inline' *.cloudflare.com *.googleapis.com; font-src 'self' *.gov.bc.ca *.hotjar.com *.cloudflare.com *.googleapis.com *.gstatic.com *.jsdelivr.net; img-src 'self' *.postescanada-canadapost.ca https://*.cac1.pure.cloud data: *.hotjar.com https://*.cac1.pure.cloud; connect-src 'self' *.gov.bc.ca *.launchdarkly.com *.hotjar.com *.postescanada-canadapost.ca *.sentry.io *.apigee.net wss://*.hotjar.com *.hotjar.io https://*.nr-data.net https://shyrka-prod-cac1.s3.ca-central-1.amazonaws.com https://*.newrelic.com https://*.cac1.pure.cloud wss://*.cac1.pure.cloud; manifest-src 'self'; media-src 'self' https://*.cac1.pure.cloud; object-src 'self' https://*.cac1.pure.cloud; child-src 'self' https://*.cac1.pure.cloud;" + "value": "default-src 'self'; frame-src 'self' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; script-src 'self' 'unsafe-eval' 'unsafe-inline' *.gov.bc.ca *.hotjar.com *.googleapis.com https://*.nr-data.net https://*.newrelic.com https://*.cac1.pure.cloud; style-src 'self' 'unsafe-inline' *.cloudflare.com *.googleapis.com; font-src 'self' *.gov.bc.ca *.hotjar.com *.cloudflare.com *.googleapis.com *.gstatic.com *.jsdelivr.net; img-src 'self' *.postescanada-canadapost.ca https://*.cac1.pure.cloud data: *.hotjar.com https://*.cac1.pure.cloud; connect-src 'self' *.gov.bc.ca *.run.app *.launchdarkly.com *.hotjar.com *.postescanada-canadapost.ca *.sentry.io *.apigee.net wss://*.hotjar.com *.hotjar.io https://*.nr-data.net https://shyrka-prod-cac1.s3.ca-central-1.amazonaws.com https://*.newrelic.com https://*.cac1.pure.cloud wss://*.cac1.pure.cloud; manifest-src 'self'; media-src 'self' https://*.cac1.pure.cloud; object-src 'self' https://*.cac1.pure.cloud; child-src 'self' https://*.cac1.pure.cloud;" }, { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate"}, { "key": "Pragma", "value": "no-cache"}, diff --git a/package-lock.json b/package-lock.json index 65c69dc2..ab252fbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-edit-ui", - "version": "4.7.1", + "version": "4.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-edit-ui", - "version": "4.7.0", + "version": "4.8.0", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/action-chip": "1.1.5", diff --git a/package.json b/package.json index e88822cb..b5cf85c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-edit-ui", - "version": "4.7.1", + "version": "4.8.0", "private": true, "appName": "Edit UI", "sbcName": "SBC Common Components", diff --git a/src/App.vue b/src/App.vue index 24f76284..288a7f7c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -226,7 +226,7 @@ export default class App extends Mixins(CommonMixin, FilingTemplateMixin) { haveData = false /** The Update Current JS Date timer id. */ - private updateCurrentJsDateId = 0 + private updateCurrentJsDateId = null as any // NodeJS.Timeout /** The route breadcrumbs list. */ get breadcrumbs (): Array { diff --git a/src/interfaces/store-interfaces/state-interfaces/business-information-interface.ts b/src/interfaces/store-interfaces/state-interfaces/business-information-interface.ts index 8743be0c..fc3470bb 100644 --- a/src/interfaces/store-interfaces/state-interfaces/business-information-interface.ts +++ b/src/interfaces/store-interfaces/state-interfaces/business-information-interface.ts @@ -1,5 +1,15 @@ import { CoopTypes } from '@/enums' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/' +import { IsoDatePacific, ApiDateTimeUtc } from '@bcrs-shared-components/interfaces' + +/** The Alternate Name (aka operating name) object. */ +export interface AlternateNameIF { + entityType: CorpTypeCd + identifier: string + nameRegisteredDate: ApiDateTimeUtc + nameStartDate: IsoDatePacific + operatingName: string +} /** * Interface for business information object in store @@ -7,6 +17,7 @@ import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module/' * Ref: https://github.com/bcgov/business-schemas/blob/main/src/registry_schemas/schemas/business.json */ export interface BusinessInformationIF { + alternateNames?: Array foundingDate: string // actually date-time (API format) hasRestrictions?: boolean identifier: string diff --git a/src/store/store.ts b/src/store/store.ts index dc58b0fc..116363ea 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -307,8 +307,14 @@ export const useStore = defineStore('store', { return this.stateModel.tombstone.businessId }, - /** The original legal name. */ + /** The original legal name (or operating name if this is a firm). */ getOriginalLegalName (): string { + if (this.isFirm) { + // return the operating name, if it exists + const businessInfo = this.getEntitySnapshot?.businessInfo + const alternateName = businessInfo?.alternateNames?.find(x => x.identifier === businessInfo.identifier) + return alternateName?.operatingName || 'Unknown' + } return this.getEntitySnapshot?.businessInfo?.legalName }, diff --git a/src/views/Change.vue b/src/views/Change.vue index 183174d8..1e150d6e 100644 --- a/src/views/Change.vue +++ b/src/views/Change.vue @@ -243,7 +243,7 @@ export default class Change extends Mixins(CommonMixin, FeeMixin, FilingTemplate this.setResource(this.firmChangeResource) // initialize Fee Summary data - this.setFilingData([this.firmChangeResource.filingData]) + this.setFilingData([this.firmChangeResource.filingData as any]) // update the current fees for this filing await this.setCurrentFeesFromFilingData() diff --git a/src/views/Correction/FirmCorrection.vue b/src/views/Correction/FirmCorrection.vue index 7297d537..7e8a454c 100644 --- a/src/views/Correction/FirmCorrection.vue +++ b/src/views/Correction/FirmCorrection.vue @@ -122,10 +122,10 @@ export default class FirmCorrection extends Mixins(CommonMixin, FeeMixin, Filing this.setResource(this.correctionResource) // initialize Fee Summary data - this.setFilingData([this.correctionResource.filingData]) + this.setFilingData([this.correctionResource.filingData as any]) // pre-select No Fee option - this.setStaffPayment({ option: StaffPaymentOptions.NO_FEE }) + this.setStaffPayment({ option: StaffPaymentOptions.NO_FEE } as any) // tell App that we're finished loading this.emitHaveData() diff --git a/src/views/LimitedRestorationExtension.vue b/src/views/LimitedRestorationExtension.vue index 99e0fa31..6d0ab780 100644 --- a/src/views/LimitedRestorationExtension.vue +++ b/src/views/LimitedRestorationExtension.vue @@ -176,7 +176,7 @@ export default class LimitedRestorationExtension extends Mixins( @Action(useStore) setFilingId!: (x: number) => void @Action(useStore) setHaveUnsavedChanges!: (x: boolean) => void @Action(useStore) setResource!: (x: ResourceIF) => void - @Action(useStore) setStateFilingRestoration!: (x: Promise) => void + @Action(useStore) setStateFilingRestoration!: () => void /** Whether App is ready. */ @Prop({ default: false }) readonly appReady!: boolean @@ -285,7 +285,7 @@ export default class LimitedRestorationExtension extends Mixins( this.setResource(this.restorationResource) // initialize Fee Summary data - this.setFilingData([this.restorationResource.filingData]) + this.setFilingData([this.restorationResource.filingData as any]) // update the current fees for this filing await this.setCurrentFeesFromFilingData() diff --git a/src/views/LimitedRestorationToFull.vue b/src/views/LimitedRestorationToFull.vue index f1075d47..ab9a3b32 100644 --- a/src/views/LimitedRestorationToFull.vue +++ b/src/views/LimitedRestorationToFull.vue @@ -210,7 +210,7 @@ export default class LimitedRestorationToFull extends Mixins( @Action(useStore) setFilingId!: (x: number) => void @Action(useStore) setHaveUnsavedChanges!: (x: boolean) => void @Action(useStore) setResource!: (x: ResourceIF) => void - @Action(useStore) setStateFilingRestoration!: (x: Promise) => void + @Action(useStore) setStateFilingRestoration!: () => void @Action(useStore) setValidComponent!: (x: ActionKvIF) => void /** Whether App is ready. */ @@ -312,7 +312,7 @@ export default class LimitedRestorationToFull extends Mixins( this.setResource(this.restorationResource) // initialize Fee Summary data - this.setFilingData([this.restorationResource.filingData]) + this.setFilingData([this.restorationResource.filingData as any]) // update the current fees for this filing await this.setCurrentFeesFromFilingData()