Skip to content

Commit

Permalink
add remainingAmount to refund rs when refund amount is 0 (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jxio authored Feb 9, 2024
1 parent ee34afa commit 8a16daf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/ViewRoutingSlip/RoutingSlipInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
>
</v-col>
</v-row>
<v-row v-if="routingSlipDetails.refundAmount">
<v-row v-if="showRefundAmount">
<v-col class="col-6 col-sm-3 font-weight-bold">
Refund Amount
</v-col>
<v-col class="col-6 col-sm-9">
{{ routingSlipDetails.refundAmount }}
{{ routingSlipDetails.refundAmount || routingSlipDetails.remainingAmount }}
</v-col>
</v-row>

Expand Down Expand Up @@ -172,6 +172,7 @@ import can from '@/directives/can'
isRoutingSlipAChild,
statusChange,
showAddress,
showRefundAmount,
refundRequestForm,
refundRequestDetails,
errorMessage,
Expand All @@ -195,6 +196,7 @@ import can from '@/directives/can'
isRoutingSlipAChild,
statusChange,
showAddress,
showRefundAmount,
refundRequestForm,
refundRequestDetails,
errorMessage,
Expand Down
7 changes: 7 additions & 0 deletions src/composables/ViewRoutingSlip/useRoutingSlipInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -274,6 +280,7 @@ export default function useRoutingSlipInfo (props) {
isRoutingSlipAChild,
statusChange,
showAddress,
showRefundAmount,
refundRequestForm,
refundRequestDetails,
errorMessage,
Expand Down

0 comments on commit 8a16daf

Please sign in to comment.