From 5924122a9fc9b6c5754b1ed02a6ab8b146327888 Mon Sep 17 00:00:00 2001 From: Hrvoje Fekete Date: Fri, 13 Dec 2024 12:14:24 -0800 Subject: [PATCH] 24921 - fix: cancel payment, resume sole prop (#114) --- src/components/bcros/todo/Item.vue | 3 ++- src/utils/todo/action-functions.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/bcros/todo/Item.vue b/src/components/bcros/todo/Item.vue index 2519b51c..e2c46690 100644 --- a/src/components/bcros/todo/Item.vue +++ b/src/components/bcros/todo/Item.vue @@ -149,8 +149,9 @@ const deleteApplication = async (): Promise => { /** Cancel the payment and set the filing status to draft; reload the page; handle errors if exist */ const cancelPaymentAndSetToDraft = async (_refreshDashboard = true): Promise => { + const bId = currentBusinessIdentifier.value || bootstrapIdentifier.value const url = - `${runtimeConfig.public.legalApiURL}/businesses/${currentBusinessIdentifier.value}/filings/${prop.item.filingId}` + `${runtimeConfig.public.legalApiURL}/businesses/${bId}/filings/${prop.item.filingId}` await useBcrosFetch(url, { method: 'PATCH' }).then(({ error }) => { showConfirmDialog.value = false diff --git a/src/utils/todo/action-functions.ts b/src/utils/todo/action-functions.ts index ce0f4e2c..fc8f8bf1 100644 --- a/src/utils/todo/action-functions.ts +++ b/src/utils/todo/action-functions.ts @@ -113,7 +113,7 @@ export const doResumeFiling = (item: TodoItemI): void => { case FilingTypes.REGISTRATION: // navigate to Create UI to resume this Registration navigateFn = goToCreatePage - path = 'define-registration' + path = '/define-registration' params = { id: bootstrapIdentifier } break