Skip to content

Commit

Permalink
- app version = 4.8.0
Browse files Browse the repository at this point in the history
- added temporary Legal API URL in example env file
- added CSP entry for temp Legal API domain in firebase config
- added temporary mapping for Legal Name API URL in vaults config
- fixed timer id warning
- added Alternate Name IF and property to Business Information IF
- updated getOriginalLegalName to return operating name from entity snapshot for firms
- fixed some typing issues
  • Loading branch information
severinbeauvais committed Oct 10, 2023
1 parent 05d30b4 commit 707b397
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 29 deletions.
18 changes: 10 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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=
18 changes: 10 additions & 8 deletions devops/vaults.env
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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=
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
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.7.1",
"version": "4.8.0",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<BreadcrumbIF> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
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
* and sent to/from the API.
* Ref: https://github.com/bcgov/business-schemas/blob/main/src/registry_schemas/schemas/business.json
*/
export interface BusinessInformationIF {
alternateNames?: Array<AlternateNameIF>
foundingDate: string // actually date-time (API format)
hasRestrictions?: boolean
identifier: string
Expand Down
8 changes: 7 additions & 1 deletion src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
},

Expand Down
2 changes: 1 addition & 1 deletion src/views/Change.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/views/Correction/FirmCorrection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/views/LimitedRestorationExtension.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>) => void
@Action(useStore) setStateFilingRestoration!: () => void
/** Whether App is ready. */
@Prop({ default: false }) readonly appReady!: boolean
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/views/LimitedRestorationToFull.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>) => void
@Action(useStore) setStateFilingRestoration!: () => void
@Action(useStore) setValidComponent!: (x: ActionKvIF) => void
/** Whether App is ready. */
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 707b397

Please sign in to comment.