From 901768d670d8574c17ccf455f2869c5670cf89f5 Mon Sep 17 00:00:00 2001 From: Dima K Date: Wed, 22 May 2024 14:12:28 -0700 Subject: [PATCH] Update Cancel Transport Permit payload (#1891) * Fix SubmittingParty in Cancel Permit payload --- ppr-ui/package-lock.json | 4 ++-- ppr-ui/package.json | 2 +- .../composables/mhrRegistration/useMhrCorrections.ts | 10 ++++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index 72e8bc987..a6d351dfa 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.1.31", + "version": "3.1.32", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.1.31", + "version": "3.1.32", "dependencies": { "@bcrs-shared-components/input-field-date-picker": "^1.0.0", "@lemoncode/fonk": "^1.5.1", diff --git a/ppr-ui/package.json b/ppr-ui/package.json index ff0f36e51..b0d32d6b9 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.1.31", + "version": "3.1.32", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts b/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts index 6f193c9ef..2400e901a 100755 --- a/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts +++ b/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts @@ -17,6 +17,7 @@ import { MhRegistrationSummaryIF, NewMhrRegistrationApiIF, RegistrationTypeIF, + SubmittingPartyIF, UpdatedBadgeIF } from '@/interfaces' import { cloneDeep, omit } from 'lodash' @@ -39,6 +40,7 @@ export const useMhrCorrections = () => { getMhrHomeSections, isRoleStaffReg, getMhrTransportPermit, + getMhrAccountSubmittingParty, getMhrTransportPermitPreviousLocation, getMhrRegistrationOwnLand, getMhrRegistrationLocation, @@ -359,14 +361,18 @@ export const useMhrCorrections = () => { const isCancelTransportPermit = useTransportPermits().isCancelChangeLocationActive.value + const submittingParty: SubmittingPartyIF = isRoleStaffReg.value + ? getMhrTransportPermit.value.submittingParty + : getMhrAccountSubmittingParty.value + const payloadData: AdminRegistrationIF = { documentType: isCancelTransportPermit ? APIRegistrationTypes.TRANSPORT_PERMIT_CANCEL : APIRegistrationTypes.REGISTERED_LOCATION_CHANGE, documentId: getMhrTransportPermit.value.documentId, submittingParty: { - ...getMhrTransportPermit.value.submittingParty, - phoneNumber: fromDisplayPhone(getMhrTransportPermit.value.submittingParty?.phoneNumber) + ...submittingParty, + phoneNumber: fromDisplayPhone(submittingParty?.phoneNumber) }, location: isCancelTransportPermit ? { ...getMhrTransportPermitPreviousLocation.value }