Skip to content

Commit

Permalink
add urls to env/config
Browse files Browse the repository at this point in the history
  • Loading branch information
deetz99 committed Dec 3, 2024
1 parent 1da303b commit d82cc85
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
4 changes: 4 additions & 0 deletions strr-host-pm-web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ NUXT_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/"
NUXT_PAYMENT_PORTAL_URL="https://dev.account.bcregistry.gov.bc.ca/makepayment/"
NUXT_AUTH_WEB_URL="https://dev.account.bcregistry.gov.bc.ca/"
NUXT_BASE_URL="http://localhost:3000/" # app base url
NUXT_HOUSING_STRR_URL="" # TODO: add housing strr base url here for redirects
NUXT_HOUSING_LEARN_MORE_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/host-registration#documents"
NUXT_HOUSING_ALL_RULES_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals"
NUXT_HOUSING_REQUIRED_DOCS_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals"

#vaults keycloak
NUXT_KEYCLOAK_AUTH_URL="https://dev.loginproxy.gov.bc.ca/auth"
Expand Down
7 changes: 3 additions & 4 deletions strr-host-pm-web/app/components/form/AddDocuments/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { Form } from '#ui/types'
const config = useRuntimeConfig().public
const reqStore = usePropertyReqStore()
const docStore = useDocumentStore()
const propStore = useHostPropertyStore()
Expand All @@ -14,9 +15,7 @@ defineEmits<{
const blFormRef = ref<Form<any>>()
const docFormRef = ref<Form<any>>()
const docUploadHelpId = useId()
// eslint-disable-next-line max-len
const learnMoreLink = 'https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/host-registration#documents'
const docUploadHelpId = useId() // id for aria-describedby on doc select
// revalidate uploaded documents when user adding/removing docs if step marked as complete
watch(
Expand Down Expand Up @@ -44,7 +43,7 @@ onMounted(async () => {
<template #link>
<UButton
:label="$t('link.learnMore')"
:to="learnMoreLink"
:to="config.housingLearnMoreUrl"
:padded="false"
variant="link"
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
const reqStore = usePropertyReqStore()
const localePath = useLocalePath()
const config = useRuntimeConfig().public
const accordianRef = ref()
Expand Down Expand Up @@ -63,7 +64,7 @@ function handleContinueApp () {
>
<template #linkAllRules>
<a
href="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals"
:href="config.housingAllRulesUrl"
target="_blank"
class="text-bcGovColor-activeBlue underline"
>
Expand All @@ -72,7 +73,7 @@ function handleContinueApp () {
</template>
<template #linkReqDocs>
<a
href="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals"
:href="config.housingRequiredDocsUrl"
target="_blank"
class="text-bcGovColor-activeBlue underline"
>
Expand Down
4 changes: 4 additions & 0 deletions strr-host-pm-web/devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ NUXT_REGISTRY_HOME_URL="op://web-url/$APP_ENV/registry/REGISTRY_HOME_URL"
NUXT_PAYMENT_PORTAL_URL="op://web-url/$APP_ENV/pay/PAYMENT_PORTAL_URL"
NUXT_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL"
NUXT_BASE_URL="op://web-url/$APP_ENV/strr/STRR_HOST_URL"
NUXT_HOUSING_STRR_URL="" # TODO: add housing strr base url here for redirects
NUXT_HOUSING_LEARN_MORE_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/host-registration#documents"
NUXT_HOUSING_ALL_RULES_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals"
NUXT_HOUSING_REQUIRED_DOCS_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals"

# vaults api
NUXT_PAY_API_URL="op://API/$APP_ENV/pay-api/PAY_API_URL"
Expand Down
5 changes: 4 additions & 1 deletion strr-host-pm-web/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export default defineNuxtConfig({
public: {
// Keys within public, will be also exposed to the client-side
baseUrl: process.env.NUXT_BASE_URL,
version: `STRR Host & Property Manager UI v${process.env.npm_package_version}`
version: `STRR Host & Property Manager UI v${process.env.npm_package_version}`,
housingLearnMoreUrl: process.env.NUXT_HOUSING_LEARN_MORE_URL,
housingAllRulesUrl: process.env.NUXT_HOUSING_ALL_RULES_URL,
housingRequiredDocsUrl: process.env.NUXT_HOUSING_REQUIRED_DOCS_URL
// set by strr-base-web layer (still required in .env)
// addressCompleteKey - NUXT_ADDRESS_COMPLETE_KEY
// payApiURL - NUXT_PAY_API_VERSION
Expand Down

0 comments on commit d82cc85

Please sign in to comment.