diff --git a/strr-base-web/app/locales/en-CA.ts b/strr-base-web/app/locales/en-CA.ts index 51fcf3bc..e6a4deb0 100644 --- a/strr-base-web/app/locales/en-CA.ts +++ b/strr-base-web/app/locales/en-CA.ts @@ -1,5 +1,9 @@ /* eslint-disable max-len */ export default { + badge: { + basicAccount: 'BASIC ACCOUNT', + inactiveAccount: 'INACTIVE ACCOUNT' + }, btn: { getStarted: 'Get Started', goHome: 'Go Home', diff --git a/strr-platform-web/app/locales/en-CA.ts b/strr-platform-web/app/locales/en-CA.ts index 91f35471..539adc2d 100644 --- a/strr-platform-web/app/locales/en-CA.ts +++ b/strr-platform-web/app/locales/en-CA.ts @@ -1,9 +1,5 @@ /* eslint-disable max-len */ export default { - badge: { - basicAccount: 'BASIC ACCOUNT', - inactiveAccount: 'INACTIVE ACCOUNT' - }, feeSummary: { itemLabels: { PLATREG_SM: 'Platform Application Fee', diff --git a/strr-strata-web/app/app.config.ts b/strr-strata-web/app/app.config.ts index 7ee40d9f..096399d3 100644 --- a/strr-strata-web/app/app.config.ts +++ b/strr-strata-web/app/app.config.ts @@ -1,3 +1,14 @@ export default defineAppConfig({ + strrBaseLayer: { + page: { + login: { + redirectPath: '/auth/account/choose-existing' + // options: { // allow all options? + // createAccount: false, + // idps: () => ['bceid', 'bcsc'] // function required to overwrite default value, will merge if no function + // } + } + } + }, ui: {} }) diff --git a/strr-strata-web/app/composables/useStrataModals.ts b/strr-strata-web/app/composables/useStrataModals.ts new file mode 100644 index 00000000..6f531c78 --- /dev/null +++ b/strr-strata-web/app/composables/useStrataModals.ts @@ -0,0 +1,24 @@ +// https://ui.nuxt.com/components/modal#control-programmatically +import { ModalBase } from '#components' + +export const useStrataModals = () => { + const modal = useModal() + const { t } = useI18n() + + function openhelpRegisteringStrataModal () { + modal.open(ModalBase, { + title: t('modal.helpRegisteringStrata.title'), + content: t('modal.helpRegisteringStrata.content'), + actions: [{ label: t('btn.close'), handler: () => close() }] + }) + } + + function close () { + modal.close() + } + + return { + openhelpRegisteringStrataModal, + close + } +} diff --git a/strr-strata-web/app/locales/en-CA.ts b/strr-strata-web/app/locales/en-CA.ts index 0838f523..3702573a 100644 --- a/strr-strata-web/app/locales/en-CA.ts +++ b/strr-strata-web/app/locales/en-CA.ts @@ -70,5 +70,35 @@ export default { site: 'Strata Hotel Brand Website | Strata Hotel Brand {count} Website' } } + }, + btn: { + addStrataHotel: 'Add a Strata Hotel', + view: 'View' + }, + label: { + hotelName: 'Hotel Name', + expiryDate: 'Expiry Date', + application: 'Application', + registration: 'Registration' + }, + modal: { + helpRegisteringStrata: { + triggerBtn: 'Help with registering and managing short-term rentals', + title: 'Short Term Rental Help', + content: 'Help Text Here' + } + }, + table: { + strataHotelList: { + title: '{boldStart}My Strata Hotel List{boldEnd} ({count})', + emptyText: "You don't have any strata hotels yet. Add a strata hotel above." + } + }, + page: { + dashboardList: { + title: 'Dashboard - My Short Term Rental Registry', + h1: 'My Short Term Rental Registry', + subtitle: 'Register and keep short-term rental unit information up to date.' + } } } diff --git a/strr-strata-web/app/middleware/require-account.ts b/strr-strata-web/app/middleware/require-account.ts new file mode 100644 index 00000000..bffeb3c7 --- /dev/null +++ b/strr-strata-web/app/middleware/require-account.ts @@ -0,0 +1,8 @@ +export default defineNuxtRouteMiddleware((to) => { + const accountStore = useConnectAccountStore() + const localePath = useLocalePath() + + if (!accountStore.currentAccount.id) { + return navigateTo({ path: localePath('/auth/account/choose-existing'), query: { return: to.fullPath } }) + } +}) diff --git a/strr-strata-web/app/pages/application.vue b/strr-strata-web/app/pages/application.vue index 35c6db42..c601e6c1 100644 --- a/strr-strata-web/app/pages/application.vue +++ b/strr-strata-web/app/pages/application.vue @@ -174,7 +174,7 @@ useHead({ definePageMeta({ layout: 'connect-form', - middleware: ['auth'], + middleware: ['auth', 'require-account'], path: '/strata-hotel/application' }) diff --git a/strr-strata-web/app/pages/auth/account/choose-existing.vue b/strr-strata-web/app/pages/auth/account/choose-existing.vue new file mode 100644 index 00000000..2080be45 --- /dev/null +++ b/strr-strata-web/app/pages/auth/account/choose-existing.vue @@ -0,0 +1,146 @@ + + diff --git a/strr-strata-web/app/pages/strata-hotel/dashboard/[registrationId].vue b/strr-strata-web/app/pages/strata-hotel/dashboard/[registrationId].vue index 3757e802..9c930e67 100644 --- a/strr-strata-web/app/pages/strata-hotel/dashboard/[registrationId].vue +++ b/strr-strata-web/app/pages/strata-hotel/dashboard/[registrationId].vue @@ -68,7 +68,7 @@ useHead({ definePageMeta({ layout: 'connect-dashboard', - middleware: ['auth'] + middleware: ['auth', 'require-account'] }) setBreadcrumbs([ diff --git a/strr-strata-web/app/pages/strata-hotel/dashboard/index.vue b/strr-strata-web/app/pages/strata-hotel/dashboard/index.vue index 4119ce62..a5dac693 100644 --- a/strr-strata-web/app/pages/strata-hotel/dashboard/index.vue +++ b/strr-strata-web/app/pages/strata-hotel/dashboard/index.vue @@ -1,120 +1,86 @@