Skip to content

Commit

Permalink
Update Fee for Amend & Cancel Transport Permit (#1927)
Browse files Browse the repository at this point in the history
* Update Fees for Amend & Cancel Transport Permit
* Re-implement StaffPayment component for Amend and Cancel Transport Permit
  • Loading branch information
dimak1 authored Jun 10, 2024
1 parent bde3d19 commit 2d4bdec
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 20 deletions.
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.2.16",
"version": "3.2.17",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
4 changes: 2 additions & 2 deletions ppr-ui/src/composables/fees/factories/useFeeSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
Expand Down
9 changes: 0 additions & 9 deletions ppr-ui/src/composables/mhrInformation/useMhrInfoValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/views/mhrInformation/MhrInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
</section>

<section
v-if="isRoleStaffReg && !isCancelChangeLocationActive"
v-if="isRoleStaffReg"
id="staff-transfer-payment-section"
class="mt-10 pt-4 pb-4"
>
Expand Down
11 changes: 6 additions & 5 deletions ppr-ui/tests/unit/MhrTransportPermit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -903,11 +907,8 @@ 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')

// Staff Payment component should not exist for Cancelled Transport Permits
expect(wrapper.findComponent(StaffPayment).exists()).toBe(false)
expect(feeSummaryContainerText).toContain('$15.00')
expect(wrapper.findComponent(StaffPayment).exists()).toBeTruthy()

useTransportPermits().setLocationChange(false)
})
Expand Down

0 comments on commit 2d4bdec

Please sign in to comment.