From 8a16daf96246dc6af572dad62c37d1f03f48135a Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Fri, 9 Feb 2024 11:13:08 -0800 Subject: [PATCH] add remainingAmount to refund rs when refund amount is 0 (#220) --- src/components/ViewRoutingSlip/RoutingSlipInfo.vue | 6 ++++-- src/composables/ViewRoutingSlip/useRoutingSlipInfo.ts | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/ViewRoutingSlip/RoutingSlipInfo.vue b/src/components/ViewRoutingSlip/RoutingSlipInfo.vue index 03d7e528..a05ba3e0 100644 --- a/src/components/ViewRoutingSlip/RoutingSlipInfo.vue +++ b/src/components/ViewRoutingSlip/RoutingSlipInfo.vue @@ -57,12 +57,12 @@ > - + Refund Amount - {{ routingSlipDetails.refundAmount }} + {{ routingSlipDetails.refundAmount || routingSlipDetails.remainingAmount }} @@ -172,6 +172,7 @@ import can from '@/directives/can' isRoutingSlipAChild, statusChange, showAddress, + showRefundAmount, refundRequestForm, refundRequestDetails, errorMessage, @@ -195,6 +196,7 @@ import can from '@/directives/can' isRoutingSlipAChild, statusChange, showAddress, + showRefundAmount, refundRequestForm, refundRequestDetails, errorMessage, diff --git a/src/composables/ViewRoutingSlip/useRoutingSlipInfo.ts b/src/composables/ViewRoutingSlip/useRoutingSlipInfo.ts index dc4fe16a..05fd4a20 100644 --- a/src/composables/ViewRoutingSlip/useRoutingSlipInfo.ts +++ b/src/composables/ViewRoutingSlip/useRoutingSlipInfo.ts @@ -82,6 +82,12 @@ export default function useRoutingSlipInfo (props) { ) }) + const showRefundAmount = computed(() => { + return ( + isRefundProcess(currentStatus?.value) + ) + }) + const showAddressEditMode = computed(() => { // need show address as editable also as view return isAddressEditable.value @@ -274,6 +280,7 @@ export default function useRoutingSlipInfo (props) { isRoutingSlipAChild, statusChange, showAddress, + showRefundAmount, refundRequestForm, refundRequestDetails, errorMessage,