Skip to content

Commit

Permalink
Strata/Platform/Host - UI: minor updates (#394)
Browse files Browse the repository at this point in the history
* fix error modal

* remove hardcoded jobtitle property

* update decline tos redirect url

* bump platform version

* fix version compared to other pr
  • Loading branch information
deetz99 authored Dec 13, 2024
1 parent 68dace9 commit 4e1769e
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getErrorKey = () => {
const errorKey = getErrorKey()
</script>
<template>
<ModalBase :actions="[{ label: $t('btn.close'), handler: () => useStrrModals().close() }]">
<ModalBase>
<div class="-mt-6 flex flex-col items-center gap-4 text-center">
<UIcon
name="i-mdi-alert-circle-outline"
Expand Down
11 changes: 8 additions & 3 deletions strr-base-web/app/composables/useStrrModals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ import {

export const useStrrModals = () => {
const modal = useModal()
const { t } = useI18n()
const connectNav = useConnectNav()
const t = useNuxtApp().$i18n.t
const { redirect } = useNavigate()
const accountStore = useConnectAccountStore()
const config = useRuntimeConfig().public

function openAppSubmitError (e: unknown) {
modal.open(ModalErrorApplicationSubmit, {
// @ts-expect-error - actions prop is passed down from ModalInfoCollectionNotice -> ModalBase
actions: [{ label: t('btn.close'), handler: () => close() }],
error: e
})
}

function openCreateAccountModal () {
const connectNav = useConnectNav()
modal.open(ModalBase, {
title: t('label.createNewAccount'),
content: t('strr.text.onlyPremiumAccountModalContent'),
Expand All @@ -41,14 +43,17 @@ export const useStrrModals = () => {
}

function openConfirmDeclineTosModal () {
const keycloak = useKeycloak()
modal.open(ModalBase, {
title: t('modal.declineTos.title'),
content: t('modal.declineTos.content'),
actions: [
{ label: t('btn.cancel'), variant: 'outline', handler: () => close() },
{
label: t('modal.declineTos.declineBtn'),
handler: () => navigateTo(config.declineTosRedirectUrl as string, { external: true })
handler: () => {
keycloak.logout(config.declineTosRedirectUrl as string)
}
}
]
})
Expand Down
3 changes: 1 addition & 2 deletions strr-base-web/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ export default defineNuxtConfig({
environment: process.env.NUXT_ENVIRONMENT_HEADER || '',
version: `STRR Base UI v${process.env.npm_package_version}`,
housingStrrUrl: process.env.NUXT_REGISTRY_HOME_URL, // TODO: update to NUXT_HOUSING_STRR_URL once we get the housing strr url set
// TODO: move to app config for core layer ?
declineTosRedirectUrl: process.env.NUXT_REGISTRY_HOME_URL, // TODO: update to NUXT_HOUSING_STRR_URL once we get the housing strr url set,
declineTosRedirectUrl: process.env.NUXT_DECLINE_TOS_REDIRECT_URL,
bcGovStrrUrl: process.env.NUXT_BCGOV_STRR_URL
// set by layer - still required in .env
// keycloakAuthUrl - NUXT_KEYCLOAK_AUTH_URL
Expand Down
1 change: 1 addition & 0 deletions strr-host-pm-web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ NUXT_HOUSING_REQUIRED_DOCS_URL="https://www2.gov.bc.ca/gov/content/housing-tenan
NUXT_HOUSING_PROOF_OF_PR_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/host-registration#documents"
NUXT_HOST_TAC_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/registry-toc-hosts"
NUXT_BCGOV_STRR_URL="https://www.gov.bc.ca/STRRegistry"
NUXT_DECLINE_TOS_REDIRECT_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry"

#vaults keycloak
NUXT_KEYCLOAK_AUTH_URL="https://dev.loginproxy.gov.bc.ca/auth"
Expand Down
1 change: 1 addition & 0 deletions strr-host-pm-web/devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ NUXT_HOUSING_PROOF_OF_PR_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy
NUXT_HOST_TAC_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/registry-toc-hosts"
NUXT_BCGOV_STRR_URL="https://www.gov.bc.ca/STRRegistry"
NUXT_HOST_ACC_ACT_SUMMARY="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/short-term-rental-legislation#act"
NUXT_DECLINE_TOS_REDIRECT_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry"

# vaults api
NUXT_PAY_API_URL="op://API/$APP_ENV/pay-api/PAY_API_URL"
Expand Down
2 changes: 1 addition & 1 deletion strr-host-pm-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "strr-host-pm-web",
"private": true,
"type": "module",
"version": "0.0.8",
"version": "0.0.9",
"scripts": {
"build-check": "nuxt build",
"build": "nuxt generate",
Expand Down
1 change: 1 addition & 0 deletions strr-platform-web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ NUXT_BASE_URL="http://localhost:3000/" # app base url
NUXT_HOUSING_STRR_URL="" # TODO: add housing strr base url here for redirects
NUXT_PLATFORMS_TAC_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/registry-toc-platforms"
NUXT_BCGOV_STRR_URL="https://www.gov.bc.ca/STRRegistry"
NUXT_DECLINE_TOS_REDIRECT_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry"

#vaults keycloak
NUXT_KEYCLOAK_AUTH_URL="https://dev.loginproxy.gov.bc.ca/auth"
Expand Down
1 change: 1 addition & 0 deletions strr-platform-web/devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ NUXT_BASE_URL="op://web-url/$APP_ENV/strr/STRR_PLATFORM_URL"
NUXT_HOUSING_STRR_URL="" # TODO: add housing strr base url here for redirects
NUXT_PLATFORMS_TAC_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/registry-toc-platforms"
NUXT_BCGOV_STRR_URL="https://www.gov.bc.ca/STRRegistry"
NUXT_DECLINE_TOS_REDIRECT_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry"

# vaults api
NUXT_PAY_API_URL="op://API/$APP_ENV/pay-api/PAY_API_URL"
Expand Down
2 changes: 1 addition & 1 deletion strr-platform-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "strr-platform-web",
"private": true,
"type": "module",
"version": "0.0.22",
"version": "0.0.23",
"scripts": {
"build-check": "nuxt build",
"build": "nuxt generate",
Expand Down
1 change: 1 addition & 0 deletions strr-strata-web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ NUXT_BASE_URL="http://localhost:3000/" # app base url
NUXT_HOUSING_STRR_URL="" # TODO: add housing strr base url here for redirects
NUXT_STRATA_TAC_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/registry-toc-strataplatforms"
NUXT_BCGOV_STRR_URL="https://www.gov.bc.ca/STRRegistry"
NUXT_DECLINE_TOS_REDIRECT_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry"

#vaults keycloak
NUXT_KEYCLOAK_AUTH_URL="https://dev.loginproxy.gov.bc.ca/auth"
Expand Down
6 changes: 0 additions & 6 deletions strr-strata-web/app/stores/strataApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ export const useStrrStrataApplicationStore = defineStore('strr/strataApplication
const submitStrataApplication = async () => {
const body = createApplicationBody()

// TODO: confirm if jobTitle for completing party is required for strata application
// @ts-expect-error - temporary until we confirm requirements
body.registration.completingParty.jobTitle = 'Completing Party Job Title'

// console.info('submitting application: ', body)

const res = await postApplication<StrataApplicationPayload, StrataApplicationResp>(body) as StrataApplicationResp

const paymentToken = res.header.paymentToken
Expand Down
1 change: 1 addition & 0 deletions strr-strata-web/devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ NUXT_BASE_URL="op://web-url/$APP_ENV/strr/STRR_STRATA_HOTEL_URL"
NUXT_HOUSING_STRR_URL="" # TODO: add housing strr base url here for redirects
NUXT_STRATA_TAC_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry/registry-toc-strataplatforms"
NUXT_BCGOV_STRR_URL="https://www.gov.bc.ca/STRRegistry"
NUXT_DECLINE_TOS_REDIRECT_URL="https://www2.gov.bc.ca/gov/content/housing-tenancy/short-term-rentals/registry"

# vaults api
NUXT_PAY_API_URL="op://API/$APP_ENV/pay-api/PAY_API_URL"
Expand Down
2 changes: 1 addition & 1 deletion strr-strata-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "strr-strata-web",
"private": true,
"type": "module",
"version": "0.0.18",
"version": "0.0.19",
"scripts": {
"build-check": "nuxt build",
"build": "nuxt generate",
Expand Down

0 comments on commit 4e1769e

Please sign in to comment.