diff --git a/.github/environments/values.dev.yaml b/.github/environments/values.dev.yaml index a12b2407..5a4ece75 100644 --- a/.github/environments/values.dev.yaml +++ b/.github/environments/values.dev.yaml @@ -6,8 +6,10 @@ config: FRONTEND_CHES_BCC: NRM.PermittingAndData@gov.bc.ca FRONTEND_COMS_APIPATH: https://coms-dev.api.gov.bc.ca/api/v1 FRONTEND_COMS_BUCKETID: 1f9e1451-c130-4804-aeb0-b78b5b109c47 + FRONTEND_GEOCODER_APIPATH: https://geocoder.api.gov.bc.ca FRONTEND_OIDC_AUTHORITY: https://dev.loginproxy.gov.bc.ca/auth/realms/standard FRONTEND_OIDC_CLIENTID: nr-permit-connect-navigator-service-5188 + FRONTEND_ORGBOOK_APIPATH: https://orgbook.gov.bc.ca/api/v4 SERVER_APIPATH: /api/v1 SERVER_BODYLIMIT: 30mb SERVER_CHEFS_APIPATH: https://submit.digital.gov.bc.ca/app/api/v1 diff --git a/.github/environments/values.prod.yaml b/.github/environments/values.prod.yaml index 8d395a00..9a23a004 100644 --- a/.github/environments/values.prod.yaml +++ b/.github/environments/values.prod.yaml @@ -6,8 +6,10 @@ config: FRONTEND_CHES_BCC: Housing.Authorizations@gov.bc.ca FRONTEND_COMS_APIPATH: https://coms.api.gov.bc.ca/api/v1 FRONTEND_COMS_BUCKETID: 0089d041-5aab-485e-842d-8875475d0ed6 + FRONTEND_GEOCODER_APIPATH: https://geocoder.api.gov.bc.ca FRONTEND_OIDC_AUTHORITY: https://loginproxy.gov.bc.ca/auth/realms/standard FRONTEND_OIDC_CLIENTID: nr-permit-connect-navigator-service-5188 + FRONTEND_ORGBOOK_APIPATH: https://orgbook.gov.bc.ca/api/v4 SERVER_APIPATH: /api/v1 SERVER_BODYLIMIT: 30mb SERVER_CHEFS_APIPATH: https://submit.digital.gov.bc.ca/app/api/v1 diff --git a/.github/environments/values.test.yaml b/.github/environments/values.test.yaml index 1fd29c1a..5a098323 100644 --- a/.github/environments/values.test.yaml +++ b/.github/environments/values.test.yaml @@ -6,8 +6,10 @@ config: FRONTEND_CHES_BCC: NRM.PermittingAndData@gov.bc.ca FRONTEND_COMS_APIPATH: https://coms-test.api.gov.bc.ca/api/v1 FRONTEND_COMS_BUCKETID: a9eabd1d-5f77-4c60-bf6b-83ffa0e21c59 + FRONTEND_GEOCODER_APIPATH: https://geocoder.api.gov.bc.ca FRONTEND_OIDC_AUTHORITY: https://test.loginproxy.gov.bc.ca/auth/realms/standard FRONTEND_OIDC_CLIENTID: nr-permit-connect-navigator-service-5188 + FRONTEND_ORGBOOK_APIPATH: https://orgbook.gov.bc.ca/api/v4 SERVER_APIPATH: /api/v1 SERVER_BODYLIMIT: 30mb SERVER_CHEFS_APIPATH: https://submit.digital.gov.bc.ca/app/api/v1 diff --git a/app/app.ts b/app/app.ts index 9691dc36..f9c78332 100644 --- a/app/app.ts +++ b/app/app.ts @@ -37,7 +37,9 @@ app.use( 'default-src': [ "'self'", // eslint-disable-line new URL(config.get('frontend.oidc.authority')).origin, - new URL(config.get('frontend.coms.apiPath')).origin + new URL(config.get('frontend.coms.apiPath')).origin, + new URL(config.get('frontend.geocoder.apiPath')).origin, + new URL(config.get('frontend.orgbook.apiPath')).origin ] } } diff --git a/app/config/custom-environment-variables.json b/app/config/custom-environment-variables.json index 46f1430a..12195057 100644 --- a/app/config/custom-environment-variables.json +++ b/app/config/custom-environment-variables.json @@ -8,14 +8,16 @@ "apiPath": "FRONTEND_COMS_APIPATH", "bucketId": "FRONTEND_COMS_BUCKETID" }, - "externalApi": { - "geocoderApi": "FRONTEND_GEOCODER_APIPATH", - "orgBookApi": "FRONTEND_ORGBOOK_APIPATH" + "geocoder": { + "apiPath": "FRONTEND_GEOCODER_APIPATH" }, "notificationBanner": "FRONTEND_NOTIFICATION_BANNER", "oidc": { "authority": "FRONTEND_OIDC_AUTHORITY", "clientId": "FRONTEND_OIDC_CLIENTID" + }, + "orgbook": { + "apiPath": "FRONTEND_ORGBOOK_APIPATH" } }, "server": { diff --git a/charts/pcns/Chart.yaml b/charts/pcns/Chart.yaml index 454f6214..a316a25b 100644 --- a/charts/pcns/Chart.yaml +++ b/charts/pcns/Chart.yaml @@ -3,7 +3,7 @@ name: nr-permitconnect-navigator-service # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.6 +version: 0.0.7 kubeVersion: ">= 1.13.0" description: PermitConnect Navigator Service # A chart can be either an 'application' or a 'library' chart. diff --git a/charts/pcns/README.md b/charts/pcns/README.md index dc3e634f..21a6b964 100644 --- a/charts/pcns/README.md +++ b/charts/pcns/README.md @@ -1,6 +1,6 @@ # nr-permitconnect-navigator-service -![Version: 0.0.6](https://img.shields.io/badge/Version-0.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) +![Version: 0.0.7](https://img.shields.io/badge/Version-0.0.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) PermitConnect Navigator Service @@ -35,7 +35,7 @@ Kubernetes: `>= 1.13.0` | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | chesSecretOverride.password | string | `nil` | | | chesSecretOverride.username | string | `nil` | | -| config.configMap | object | `{"FRONTEND_APIPATH":"api/v1","FRONTEND_CHES_BCC":null,"FRONTEND_COMS_APIPATH":null,"FRONTEND_COMS_BUCKETID":null,"FRONTEND_OIDC_AUTHORITY":null,"FRONTEND_OIDC_CLIENTID":null,"SERVER_APIPATH":"/api/v1","SERVER_BODYLIMIT":"30mb","SERVER_CHEFS_APIPATH":null,"SERVER_CHES_APIPATH":null,"SERVER_CHES_TOKENURL":null,"SERVER_DB_HOST":null,"SERVER_DB_POOL_MAX":"10","SERVER_DB_POOL_MIN":"2","SERVER_DB_PORT":"5432","SERVER_LOGLEVEL":"http","SERVER_OIDC_AUTHORITY":null,"SERVER_OIDC_IDENTITYKEY":null,"SERVER_OIDC_PUBLICKEY":null,"SERVER_PORT":"8080"}` | These values will be wholesale added to the configmap as is; refer to the pcns documentation for what each of these values mean and whether you need them defined. Ensure that all values are represented explicitly as strings, as non-string values will not translate over as expected into container environment variables. For configuration keys named `*_ENABLED`, either leave them commented/undefined, or set them to string value "true". | +| config.configMap | object | `{"FRONTEND_APIPATH":"api/v1","FRONTEND_CHES_BCC":null,"FRONTEND_COMS_APIPATH":null,"FRONTEND_COMS_BUCKETID":null,"FRONTEND_GEOCODER_APIPATH":null,"FRONTEND_OIDC_AUTHORITY":null,"FRONTEND_OIDC_CLIENTID":null,"FRONTEND_ORGBOOK_APIPATH":null,"SERVER_APIPATH":"/api/v1","SERVER_BODYLIMIT":"30mb","SERVER_CHEFS_APIPATH":null,"SERVER_CHES_APIPATH":null,"SERVER_CHES_TOKENURL":null,"SERVER_DB_HOST":null,"SERVER_DB_POOL_MAX":"10","SERVER_DB_POOL_MIN":"2","SERVER_DB_PORT":"5432","SERVER_LOGLEVEL":"http","SERVER_OIDC_AUTHORITY":null,"SERVER_OIDC_IDENTITYKEY":null,"SERVER_OIDC_PUBLICKEY":null,"SERVER_PORT":"8080"}` | These values will be wholesale added to the configmap as is; refer to the pcns documentation for what each of these values mean and whether you need them defined. Ensure that all values are represented explicitly as strings, as non-string values will not translate over as expected into container environment variables. For configuration keys named `*_ENABLED`, either leave them commented/undefined, or set them to string value "true". | | config.enabled | bool | `false` | Set to true if you want to let Helm manage and overwrite your configmaps. | | config.releaseScoped | bool | `false` | This should be set to true if and only if you require configmaps and secrets to be release scoped. In the event you want all instances in the same namespace to share a similar configuration, this should be set to false | | dbSecretOverride.password | string | `nil` | | diff --git a/charts/pcns/values.yaml b/charts/pcns/values.yaml index e693f262..fe867bc0 100644 --- a/charts/pcns/values.yaml +++ b/charts/pcns/values.yaml @@ -135,8 +135,10 @@ config: FRONTEND_CHES_BCC: ~ FRONTEND_COMS_APIPATH: ~ FRONTEND_COMS_BUCKETID: ~ + FRONTEND_GEOCODER_APIPATH: ~ FRONTEND_OIDC_AUTHORITY: ~ FRONTEND_OIDC_CLIENTID: ~ + FRONTEND_ORGBOOK_APIPATH: ~ SERVER_APIPATH: /api/v1 SERVER_BODYLIMIT: 30mb diff --git a/frontend/src/components/form/AutoComplete.vue b/frontend/src/components/form/AutoComplete.vue index 200ca240..0ae77564 100644 --- a/frontend/src/components/form/AutoComplete.vue +++ b/frontend/src/components/form/AutoComplete.vue @@ -15,7 +15,7 @@ type Props = { placeholder?: string; disabled?: boolean; suggestions: Array; - getOptionLabel: Function; + getOptionLabel?: Function; bold?: boolean; forceSelection?: boolean; loading?: boolean; @@ -29,6 +29,7 @@ const props = withDefaults(defineProps(), { label: '', placeholder: '', disabled: false, + getOptionLabel: (e: string) => e, bold: true, forceSelection: false, loading: false, diff --git a/frontend/src/components/intake/ShasIntakeForm.vue b/frontend/src/components/intake/ShasIntakeForm.vue index 7ff3f284..e64f44e1 100644 --- a/frontend/src/components/intake/ShasIntakeForm.vue +++ b/frontend/src/components/intake/ShasIntakeForm.vue @@ -46,9 +46,9 @@ import { import { BASIC_RESPONSES, INTAKE_FORM_CATEGORIES, PROJECT_LOCATION } from '@/utils/enums'; import type { IInputEvent } from '@/interfaces'; -import type { Ref } from 'vue'; -import type { DropdownChangeEvent } from 'primevue/dropdown'; import type { AutoCompleteCompleteEvent } from 'primevue/autocomplete'; +import type { DropdownChangeEvent } from 'primevue/dropdown'; +import type { Ref } from 'vue'; // Types type GeocoderEntry = { @@ -213,18 +213,18 @@ async function onSubmit(data: any) { } } -const onRegisteredNameInput = async (e: AutoCompleteCompleteEvent) => { +async function onRegisteredNameInput(e: AutoCompleteCompleteEvent) { if (e?.query?.length >= 2) { const results = (await externalApiService.searchOrgBook(e.query))?.data?.results ?? []; orgBookOptions.value = results .filter((x: { [key: string]: string }) => x.type === 'name') .map((x: { [key: string]: string }) => x?.value); } -}; +} -const getRegisteredNameLabel = (e: any) => { +function getRegisteredNameLabel(e: any) { return e; -}; +} onBeforeMount(async () => { let response; @@ -254,7 +254,6 @@ onBeforeMount(async () => {