From 729b0877339e145fc2477cc878919bb42e03f9e6 Mon Sep 17 00:00:00 2001 From: Cameron Bowler Date: Wed, 4 Sep 2024 10:06:04 -0700 Subject: [PATCH] include Folio in Transport permit, amend and cancel payloads --- ppr-ui/package-lock.json | 4 ++-- ppr-ui/package.json | 2 +- .../src/composables/mhrInformation/useTransportPermits.ts | 6 +++++- ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts | 6 +++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index 191608d2d..17abbc5f7 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.2.51", + "version": "3.2.52", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.2.51", + "version": "3.2.52", "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 b1e54da45..cad1dc2f2 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.2.51", + "version": "3.2.52", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/composables/mhrInformation/useTransportPermits.ts b/ppr-ui/src/composables/mhrInformation/useTransportPermits.ts index 9995122b1..6533a98be 100644 --- a/ppr-ui/src/composables/mhrInformation/useTransportPermits.ts +++ b/ppr-ui/src/composables/mhrInformation/useTransportPermits.ts @@ -42,7 +42,8 @@ export const useTransportPermits = () => { getMhrInformation, getMhrAccountSubmittingParty, getMhrRegistrationLocation, - getMhrTransportPermitPreviousLocation + getMhrTransportPermitPreviousLocation, + getStaffPayment } = storeToRefs(useStore()) const { @@ -220,6 +221,9 @@ export const useTransportPermits = () => { const payloadData: MhrTransportPermitIF = cloneDeep({ ...getMhrTransportPermit.value, + ...(isRoleStaffReg.value && !!getStaffPayment.value && { + clientReferenceId: getStaffPayment.value.folioNumber + }), submittingParty: { ...submittingParty, phoneNumber: fromDisplayPhone(submittingParty?.phoneNumber) diff --git a/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts b/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts index 8d9675053..20f897394 100755 --- a/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts +++ b/ppr-ui/src/composables/mhrRegistration/useMhrCorrections.ts @@ -45,7 +45,8 @@ export const useMhrCorrections = () => { getMhrTransportPermitPreviousLocation, getMhrRegistrationOwnLand, getMhrRegistrationLocation, - getMhrRegistrationHomeOwnerGroups + getMhrRegistrationHomeOwnerGroups, + getStaffPayment } = storeToRefs(useStore()) const { containsCurrentRoute, goToRoute } = useNavigation() @@ -408,6 +409,9 @@ export const useMhrCorrections = () => { : getMhrAccountSubmittingParty.value const payloadData: AdminRegistrationIF = { + ...(isRoleStaffReg.value && !!getStaffPayment.value && { + clientReferenceId: getStaffPayment.value.folioNumber + }), documentType: isCancelTransportPermit ? APIRegistrationTypes.TRANSPORT_PERMIT_CANCEL : APIRegistrationTypes.REGISTERED_LOCATION_CHANGE,