diff --git a/.env.example b/.env.example index 5614b69b..43d6c160 100644 --- a/.env.example +++ b/.env.example @@ -10,8 +10,7 @@ VUE_APP_BUSINESSES_URL="https://dev.account.bcregistry.gov.bc.ca/" VUE_APP_BCONLINE_URL="https://d1.bconline.gov.bc.ca/" VUE_APP_BUSINESS_EDIT_URL="https://dev.edit.business.bcregistry.gov.bc.ca" VUE_APP_BUSINESS_CREATE_URL="https://dev.create.business.bcregistry.gov.bc.ca" -# old dashboard -VUE_APP_DASHBOARD_URL="https://dev.business.bcregistry.gov.bc.ca/" +VUE_APP_BUSINESS_FILING_URL="https://dev.business.bcregistry.gov.bc.ca/" #vaults API VUE_APP_AUTH_API_URL="https://auth-api-dev-142173140222.northamerica-northeast1.run.app" diff --git a/devops/vaults.env b/devops/vaults.env index 4ee97671..fa99ddde 100644 --- a/devops/vaults.env +++ b/devops/vaults.env @@ -8,7 +8,7 @@ VUE_APP_ADDRESS_COMPLETE_KEY="op://canadapost/$APP_ENV/address-key/ADDRESS_COMPL VUE_APP_POD_NAMESPACE="op://btr/$APP_ENV/shared/BTR_POD_NAMESPACE" # vaults web-url -VUE_APP_DASHBOARD_URL="op://web-url/$APP_ENV/business/DASHBOARD_URL" +VUE_APP_BUSINESS_FILING_URL="op://web-url/$APP_ENV/business/DASHBOARD_URL" VUE_APP_REGISTRY_URL="op://web-url/$APP_ENV/registry/REGISTRY_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" diff --git a/nuxt.config.ts b/nuxt.config.ts index 8a254aaf..097cf750 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -51,7 +51,7 @@ export default defineNuxtConfig({ authApiURL: `${process.env.VUE_APP_AUTH_API_URL || ''}${process.env.VUE_APP_AUTH_API_VERSION || ''}`, authWebURL: process.env.VUE_APP_AUTH_WEB_URL || '', businessesURL: process.env.VUE_APP_BUSINESSES_URL || '', - dashboardOldUrl: process.env.VUE_APP_DASHBOARD_URL || '', + filingURL: process.env.VUE_APP_BUSINESS_FILING_URL || '', createURL: process.env.VUE_APP_BUSINESS_CREATE_URL || '', kcURL: process.env.VUE_APP_KEYCLOAK_AUTH_URL || '', kcRealm: process.env.VUE_APP_KEYCLOAK_REALM || '', diff --git a/package.json b/package.json index 014b3182..5bdb907e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "bcros-business-dashboard", "private": true, "type": "module", - "version": "1.0.0", + "version": "1.0.1", "scripts": { "build": "nuxt generate", "build:local": "nuxt build", diff --git a/src/components/bcros/businessDetails/LinkActions.vue b/src/components/bcros/businessDetails/LinkActions.vue index 50b56559..124175d2 100644 --- a/src/components/bcros/businessDetails/LinkActions.vue +++ b/src/components/bcros/businessDetails/LinkActions.vue @@ -6,7 +6,7 @@ import { FilingSubTypeE } from '~/enums/filing-sub-type-e' import { useBcrosDashboardActions } from '~/stores/dashboardActions' const { currentBusiness } = storeToRefs(useBcrosBusiness()) -const { goToDigitalCredentialsPage, goToBusinessDashboard } = useBcrosNavigate() +const { goToDigitalCredentialsPage, goToFilingUI } = useBcrosNavigate() const { isAllowedToFile } = useBcrosBusiness() const { isButtonForActionVisible } = useBcrosDashboardActions() @@ -56,7 +56,7 @@ const allActions: ComputedRef> = computed(() => { disabled: !isAllowedToFile(FilingTypes.CONSENT_AMALGAMATION_OUT), label: t('button.tombstone.menuAction.consentToAmalgamateOut'), click: () => { - goToBusinessDashboard(`/${currentBusiness.value.identifier}/consent-amalgamation-out'`, param) + goToFilingUI(`/${currentBusiness.value.identifier}/consent-amalgamation-out'`, param) }, tooltip: t('tooltip.tombstone.menuAction.consentToAmalgamateOut'), name: 'consentToAmalgamateOut' @@ -69,7 +69,7 @@ const allActions: ComputedRef> = computed(() => { disabled: !isAllowedToFile(FilingTypes.CONSENT_CONTINUATION_OUT), label: t('button.tombstone.menuAction.consentToContinueOut'), click: () => { - goToBusinessDashboard(`/${currentBusiness.value.identifier}/consent-continuation-out`, param) + goToFilingUI(`/${currentBusiness.value.identifier}/consent-continuation-out`, param) }, tooltip: t('tooltip.tombstone.menuAction.consentToContinueOut'), name: 'consentToContinueOut' @@ -81,7 +81,7 @@ const allActions: ComputedRef> = computed(() => { disabled: !isAllowedToFile(FilingTypes.AGM_EXTENSION), label: t('button.tombstone.menuAction.requestAgmExtension'), click: () => { - goToBusinessDashboard(`/${currentBusiness.value.identifier}/agm-extension`, param) + goToFilingUI(`/${currentBusiness.value.identifier}/agm-extension`, param) }, tooltip: !isAllowedToFile(FilingTypes.AGM_EXTENSION) @@ -96,7 +96,7 @@ const allActions: ComputedRef> = computed(() => { disabled: !isAllowedToFile(FilingTypes.AGM_LOCATION_CHANGE), label: t('button.tombstone.menuAction.requestAgmLocationChange'), click: () => { - goToBusinessDashboard(`/${currentBusiness.value.identifier}/agm-location-chg`, param) + goToFilingUI(`/${currentBusiness.value.identifier}/agm-location-chg`, param) }, tooltip: !isAllowedToFile(FilingTypes.AGM_EXTENSION) @@ -111,7 +111,7 @@ const allActions: ComputedRef> = computed(() => { disabled: !isAllowedToFile(FilingTypes.AMALGAMATION_APPLICATION), label: t('button.tombstone.menuAction.amalgamate'), click: () => { - goToBusinessDashboard(`/${currentBusiness.value.identifier}/amalgamation-selection`) + goToFilingUI(`/${currentBusiness.value.identifier}/amalgamation-selection`) }, tooltip: currentBusiness.value.adminFreeze diff --git a/src/composables/useBcrosNavigate.ts b/src/composables/useBcrosNavigate.ts index 83034eac..3285f8b6 100644 --- a/src/composables/useBcrosNavigate.ts +++ b/src/composables/useBcrosNavigate.ts @@ -42,7 +42,7 @@ export const useBcrosNavigate = () => { redirect(config.public.authWebURL + 'setup-account') } function goToDigitalCredentialsPage () { - redirect(config.public.dashboardOldUrl + `/${business.currentBusiness.identifier}/digital-credentials/`) + redirect(config.public.filingURL + `/${business.currentBusiness.identifier}/digital-credentials/`) } function goToBusinessProfilePage () { @@ -53,8 +53,8 @@ export const useBcrosNavigate = () => { redirect(config.public.createURL + path, params) } - function goToBusinessDashboard (path: string, params?: { [key: string]: string }) { - redirect(config.public.dashboardOldUrl + path, params) + function goToFilingUI (path: string, params?: { [key: string]: string }) { + redirect(config.public.filingURL + path, params) } function goToEditPage (path: string, params?: { [key: string]: string }) { @@ -74,7 +74,7 @@ export const useBcrosNavigate = () => { goToTransactions, goToDigitalCredentialsPage, goToCreatePage, - goToBusinessDashboard, + goToFilingUI, goToEditPage, goToBusinessProfilePage } diff --git a/src/interfaces/tasks-i.ts b/src/interfaces/tasks-i.ts index a8681b2c..714e9bbc 100644 --- a/src/interfaces/tasks-i.ts +++ b/src/interfaces/tasks-i.ts @@ -52,6 +52,7 @@ export interface TaskToDoI { documents?: Array header: TaskApiHeaderI incorporationApplication?: any + noticeOfWithdrawal?: any registrarsNotation?: any registrarsOrder?: any registration?: any diff --git a/src/interfaces/todo-i.ts b/src/interfaces/todo-i.ts index 22a37a5b..bcbe3f69 100644 --- a/src/interfaces/todo-i.ts +++ b/src/interfaces/todo-i.ts @@ -78,4 +78,7 @@ export interface TodoItemI { submitter?: string submittedDate?: Date latestReviewComment?: string + + // Notice of Withdrawal only + filingToBeWithdrawn?: number } diff --git a/src/pages/dashboard.vue b/src/pages/dashboard.vue index 7829f7fb..4ece9357 100644 --- a/src/pages/dashboard.vue +++ b/src/pages/dashboard.vue @@ -198,7 +198,7 @@ const setChangeOfAddress = (show: boolean) => { } const goToStandaloneAddresses = () => { - const baseUrl = useRuntimeConfig().public.dashboardOldUrl + const baseUrl = useRuntimeConfig().public.filingURL const url = `${baseUrl}/${business.currentBusinessIdentifier}/standalone-addresses?filingId=0` navigateTo(url, { external: true }) } @@ -216,7 +216,7 @@ const changeAddress = () => { } const goToStandaloneDirectors = () => { - const baseUrl = useRuntimeConfig().public.dashboardOldUrl + const baseUrl = useRuntimeConfig().public.filingURL const url = `${baseUrl}/${business.currentBusinessIdentifier}/standalone-directors?filingId=0` navigateTo(url, { external: true }) } diff --git a/src/utils/todo/action-functions.ts b/src/utils/todo/action-functions.ts index fc8f8bf1..313c2862 100644 --- a/src/utils/todo/action-functions.ts +++ b/src/utils/todo/action-functions.ts @@ -5,13 +5,13 @@ import { FilingTypes } from '@bcrs-shared-components/enums' /** Files a new filing (todo item). */ export const doFileNow = (item: TodoItemI) => { const business = useBcrosBusiness() - const { goToBusinessDashboard, goToEditPage } = useBcrosNavigate() + const { goToFilingUI, goToEditPage } = useBcrosNavigate() switch (item.name) { case FilingTypes.ANNUAL_REPORT: { // file the subject Annual Report const path = `/${business.currentBusiness.identifier}/annual-report` const param = { filingId: '0', arFilingYear: item.ARFilingYear.toString() } - goToBusinessDashboard(path, param) + goToFilingUI(path, param) break } case FilingTypes.CONVERSION: { @@ -41,7 +41,7 @@ export const doResumePayment = (item: TodoItemI): boolean => { export const doResumeFiling = (item: TodoItemI): void => { const { currentBusinessIdentifier } = useBcrosBusiness() const { bootstrapIdentifier } = useBcrosBusinessBootstrap() - const { goToBusinessDashboard, goToCreatePage, goToEditPage } = useBcrosNavigate() + const { goToFilingUI, goToCreatePage, goToEditPage } = useBcrosNavigate() let navigateFn: Function | undefined let path = '' @@ -55,29 +55,29 @@ export const doResumeFiling = (item: TodoItemI): void => { break case FilingTypes.ANNUAL_REPORT: - // navigate to the Annual Report page of the old dashboard - navigateFn = goToBusinessDashboard + // navigate to the Annual Report page of Filings UI + navigateFn = goToFilingUI path = `/${currentBusinessIdentifier}/annual-report` params = { filingId: item.filingId.toString(), arFilingYear: item.ARFilingYear.toString() } break case FilingTypes.CHANGE_OF_DIRECTORS: - // navigate to Change of Directors page of the old dashboard - navigateFn = goToBusinessDashboard + // navigate to Change of Directors page of Filings UI + navigateFn = goToFilingUI path = `/${currentBusinessIdentifier}/standalone-directors` params = { filingId: item.filingId.toString() } break case FilingTypes.CHANGE_OF_ADDRESS: - // navigate to Change of Address page of the old dashboard - navigateFn = goToBusinessDashboard + // navigate to Change of Address page of Filings UI + navigateFn = goToFilingUI path = `/${currentBusinessIdentifier}/standalone-addresses` params = { filingId: item.filingId.toString() } break case FilingTypes.CONSENT_CONTINUATION_OUT: - // navigate to Consent Continuation Out page of the old dashboard - navigateFn = goToBusinessDashboard + // navigate to Consent Continuation Out page of Filings UI + navigateFn = goToFilingUI path = `/${currentBusinessIdentifier}/consent-continuation-out` params = { filingId: item.filingId.toString() } break @@ -90,8 +90,8 @@ export const doResumeFiling = (item: TodoItemI): void => { break case FilingTypes.CONTINUATION_OUT: - // navigate to Continuation Out page of the old dashboard - navigateFn = goToBusinessDashboard + // navigate to Continuation Out page of Filings UI + navigateFn = goToFilingUI path = `/${currentBusinessIdentifier}/continuation-out` params = { filingId: item.filingId.toString() } break @@ -145,6 +145,16 @@ export const doResumeFiling = (item: TodoItemI): void => { params = { 'conversion-id': item.filingId.toString() } break + case FilingTypes.NOTICE_OF_WITHDRAWAL: + // navigate to Notice of Withdrawal page of Filings UI + navigateFn = goToFilingUI + path = `/${currentBusinessIdentifier}/notice-of-withdrawal` + params = { + filingToBeWithdrawn: item.filingToBeWithdrawn.toString(), + filingId: item.filingId.toString() + } + break + case FilingTypes.SPECIAL_RESOLUTION: // navigate to Edit UI to resume this Special Resolution navigateFn = goToEditPage diff --git a/src/utils/todo/task-filing/content-loader.ts b/src/utils/todo/task-filing/content-loader.ts index cecedac9..737bc4b8 100644 --- a/src/utils/todo/task-filing/content-loader.ts +++ b/src/utils/todo/task-filing/content-loader.ts @@ -114,6 +114,8 @@ export const getDraftTitle = (filing: TaskToDoI): string => { return filingTypeToName(FilingTypes.DISSOLUTION) case FilingTypes.INCORPORATION_APPLICATION: return FilingNames.INCORPORATION_APPLICATION + case FilingTypes.NOTICE_OF_WITHDRAWAL: + return FilingNames.NOTICE_OF_WITHDRAWAL case FilingTypes.REGISTRATION: return FilingNames.REGISTRATION case FilingTypes.RESTORATION: diff --git a/src/utils/todo/task-filing/index.ts b/src/utils/todo/task-filing/index.ts index 0e503036..3741c71c 100644 --- a/src/utils/todo/task-filing/index.ts +++ b/src/utils/todo/task-filing/index.ts @@ -133,6 +133,11 @@ export const buildFilingTodo = async (task: TaskI): Promise => { newTodo.comment = filingData.comment } + // For NoW filing, add relevant fields to newTodo + if (isFilingType([FilingTypes.NOTICE_OF_WITHDRAWAL])) { + newTodo.filingToBeWithdrawn = filing.noticeOfWithdrawal.filingId + } + // Add the actionButton for newTodo addActionButton(newTodo)