Skip to content

Commit

Permalink
Merge pull request #118 from ArwenQin/24656-Support-NoW-ToDoList
Browse files Browse the repository at this point in the history
24656 - Handle NoW Draft in ToDoList
  • Loading branch information
severinbeauvais authored Jan 14, 2025
2 parents 35dbb2e + 33edce7 commit c5ecd47
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 30 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions src/components/bcros/businessDetails/LinkActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -56,7 +56,7 @@ const allActions: ComputedRef<Array<MenuActionItem>> = 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'
Expand All @@ -69,7 +69,7 @@ const allActions: ComputedRef<Array<MenuActionItem>> = 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'
Expand All @@ -81,7 +81,7 @@ const allActions: ComputedRef<Array<MenuActionItem>> = 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)
Expand All @@ -96,7 +96,7 @@ const allActions: ComputedRef<Array<MenuActionItem>> = 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)
Expand All @@ -111,7 +111,7 @@ const allActions: ComputedRef<Array<MenuActionItem>> = 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
Expand Down
8 changes: 4 additions & 4 deletions src/composables/useBcrosNavigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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 }) {
Expand All @@ -74,7 +74,7 @@ export const useBcrosNavigate = () => {
goToTransactions,
goToDigitalCredentialsPage,
goToCreatePage,
goToBusinessDashboard,
goToFilingUI,
goToEditPage,
goToBusinessProfilePage
}
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/tasks-i.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export interface TaskToDoI {
documents?: Array<any>
header: TaskApiHeaderI
incorporationApplication?: any
noticeOfWithdrawal?: any
registrarsNotation?: any
registrarsOrder?: any
registration?: any
Expand Down
3 changes: 3 additions & 0 deletions src/interfaces/todo-i.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ export interface TodoItemI {
submitter?: string
submittedDate?: Date
latestReviewComment?: string

// Notice of Withdrawal only
filingToBeWithdrawn?: number
}
4 changes: 2 additions & 2 deletions src/pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
Expand All @@ -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 })
}
Expand Down
36 changes: 23 additions & 13 deletions src/utils/todo/action-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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 = ''
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/utils/todo/task-filing/content-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions src/utils/todo/task-filing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export const buildFilingTodo = async (task: TaskI): Promise<TodoItemI> => {
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)

Expand Down

0 comments on commit c5ecd47

Please sign in to comment.