Skip to content

Commit

Permalink
Merge pull request #809 from amansinghbais/#805-badge
Browse files Browse the repository at this point in the history
Improved: showing latest badge in case of multiple payment preferences (#805)
  • Loading branch information
ravilodhi authored Oct 14, 2024
2 parents ded55cc + 7bfd846 commit b2684d4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/OrderLookupDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,17 @@
<ion-card-title>{{ translate("Payment") }}</ion-card-title>
</ion-card-header>
<div v-if="order.orderPayments?.length">
<ion-list v-for="orderPayment in order.orderPayments" :key="orderPayment">
<ion-list v-for="(orderPayment, index) in order.orderPayments" :key="index">
<ion-item lines="none">
<ion-label class="ion-text-wrap">
<p class="overline">{{ orderPayment.methodTypeId }}</p>
<ion-label>{{ translate(getPaymentMethodDesc(orderPayment.methodTypeId)) || orderPayment.methodTypeId }}</ion-label>
<ion-note :color="getColorByDesc(getStatusDesc(orderPayment.paymentStatus))">{{ translate(getStatusDesc(orderPayment.paymentStatus)) }}</ion-note>
</ion-label>
<p slot="end">{{ formatCurrency(orderPayment.amount, order.currencyUom) }}</p>
<div slot="end" class="ion-text-end">
<ion-badge v-if="order.orderPayments.length > 1 && index === 0" color="dark">{{ translate("Latest") }}</ion-badge>
<ion-label slot="end">{{ formatCurrency(orderPayment.amount, order.currencyUom) }}</ion-label>
</div>
</ion-item>
</ion-list>
</div>
Expand Down

0 comments on commit b2684d4

Please sign in to comment.