From 723f70e4a26e166d72e58d27eec844bbea676dd7 Mon Sep 17 00:00:00 2001 From: Dima K Date: Mon, 10 Jun 2024 07:25:01 -0700 Subject: [PATCH 1/3] Update Fees for Amend & Cancel Transport Permit --- ppr-ui/src/composables/fees/factories/useFeeSummary.ts | 4 ++-- ppr-ui/tests/unit/MhrTransportPermit.spec.ts | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ppr-ui/src/composables/fees/factories/useFeeSummary.ts b/ppr-ui/src/composables/fees/factories/useFeeSummary.ts index 843920244..a391e2368 100644 --- a/ppr-ui/src/composables/fees/factories/useFeeSummary.ts +++ b/ppr-ui/src/composables/fees/factories/useFeeSummary.ts @@ -130,10 +130,10 @@ export function getFeeSummary ( return { ...defaultFeeSummaries.transportPermit25 } } if (feeType === FeeSummaryTypes.MHR_AMEND_TRANSPORT_PERMIT) { - return { ...defaultFeeSummaries.feeDefaultNoFee } + return { ...defaultFeeSummaries.feeDefault15 } } if (feeType === FeeSummaryTypes.MHR_TRANSPORT_PERMIT_CANCEL) { - return { ...defaultFeeSummaries.feeDefaultNoFee } + return { ...defaultFeeSummaries.feeDefault15 } } if(feeType === FeeSummaryTypes.MHR_STAFF_CORRECTION) { return { ...defaultFeeSummaries[FeeSummaryDefaults.NO_FEE] } diff --git a/ppr-ui/tests/unit/MhrTransportPermit.spec.ts b/ppr-ui/tests/unit/MhrTransportPermit.spec.ts index e0b863289..bc00f0506 100644 --- a/ppr-ui/tests/unit/MhrTransportPermit.spec.ts +++ b/ppr-ui/tests/unit/MhrTransportPermit.spec.ts @@ -714,6 +714,10 @@ describe('Mhr Information Transport Permit', async () => { expect(locationChange.findAll('#updated-badge-component').length).toBe(1) expect(locationChange.findByTestId('amend-permit-changes-required-msg').exists()).toBeFalsy() + const feeSummaryContainerText = wrapper.find(getTestId('fee-summary')).text() + expect(feeSummaryContainerText).toContain('Amend Transport Permit') + expect(feeSummaryContainerText).toContain('$15.00') + // reset feature flags defaultFlagSet['mhr-amend-transport-permit-enabled'] = false useTransportPermits().setLocationChange(false) @@ -903,8 +907,7 @@ describe('Mhr Information Transport Permit', async () => { const feeSummaryContainerText = wrapper.find(getTestId('fee-summary')).text() expect(feeSummaryContainerText).toContain('Cancel Transport Permit') - expect(feeSummaryContainerText).toContain('No Fee') - expect(feeSummaryContainerText).toContain('$0.00') + expect(feeSummaryContainerText).toContain('$15.00') // Staff Payment component should not exist for Cancelled Transport Permits expect(wrapper.findComponent(StaffPayment).exists()).toBe(false) From 6967c21fd6b4f13e9e0e5422c3ac590426bdad02 Mon Sep 17 00:00:00 2001 From: Dima K Date: Mon, 10 Jun 2024 08:07:06 -0700 Subject: [PATCH 2/3] Re-implement StaffPayment component for Amend and Cancel Transport Permit --- .../composables/mhrInformation/useMhrInfoValidation.ts | 9 --------- ppr-ui/src/views/mhrInformation/MhrInformation.vue | 2 +- ppr-ui/tests/unit/MhrTransportPermit.spec.ts | 4 +--- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/ppr-ui/src/composables/mhrInformation/useMhrInfoValidation.ts b/ppr-ui/src/composables/mhrInformation/useMhrInfoValidation.ts index ad0888cc8..7fb469e9c 100644 --- a/ppr-ui/src/composables/mhrInformation/useMhrInfoValidation.ts +++ b/ppr-ui/src/composables/mhrInformation/useMhrInfoValidation.ts @@ -123,15 +123,6 @@ export const useMhrInfoValidation = (validationState: mhrInfoValidationStateIF) const isValidTransportPermitReview = computed((): boolean => { - if (isCancelChangeLocationActive.value) { - return ( - (isRoleStaffReg.value ? validationState.isSubmittingPartyValid : true) && - validationState.isRefNumValid && - validationState.isCompletionConfirmed && - validationState.isAuthorizationValid - ) - } - return ( ((isRoleStaffReg.value || isRoleStaffSbc.value) ? validationState.isSubmittingPartyValid : true) && validationState.isRefNumValid && diff --git a/ppr-ui/src/views/mhrInformation/MhrInformation.vue b/ppr-ui/src/views/mhrInformation/MhrInformation.vue index 3b35fe765..d42bd8734 100644 --- a/ppr-ui/src/views/mhrInformation/MhrInformation.vue +++ b/ppr-ui/src/views/mhrInformation/MhrInformation.vue @@ -350,7 +350,7 @@
diff --git a/ppr-ui/tests/unit/MhrTransportPermit.spec.ts b/ppr-ui/tests/unit/MhrTransportPermit.spec.ts index bc00f0506..907251c8d 100644 --- a/ppr-ui/tests/unit/MhrTransportPermit.spec.ts +++ b/ppr-ui/tests/unit/MhrTransportPermit.spec.ts @@ -908,9 +908,7 @@ describe('Mhr Information Transport Permit', async () => { const feeSummaryContainerText = wrapper.find(getTestId('fee-summary')).text() expect(feeSummaryContainerText).toContain('Cancel Transport Permit') expect(feeSummaryContainerText).toContain('$15.00') - - // Staff Payment component should not exist for Cancelled Transport Permits - expect(wrapper.findComponent(StaffPayment).exists()).toBe(false) + expect(wrapper.findComponent(StaffPayment).exists()).toBeTruthy() useTransportPermits().setLocationChange(false) }) From a7865472067396bd32c832469d0404724f08ed21 Mon Sep 17 00:00:00 2001 From: Dima K Date: Mon, 10 Jun 2024 08:07:42 -0700 Subject: [PATCH 3/3] Version update --- ppr-ui/package-lock.json | 4 ++-- ppr-ui/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index 090b219dd..6c7e738bb 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.2.16", + "version": "3.2.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.2.16", + "version": "3.2.17", "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 1069eb75e..ab6fa9107 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.2.16", + "version": "3.2.17", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components",