Skip to content

Commit

Permalink
Improved: showing formated unit price of the item with currency symbol (
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Sep 2, 2024
1 parent eadaf5a commit b6db857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/GiftCardActivationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : item.productName }}
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}</p>
</ion-label>
<ion-label slot="end">{{ itemPriceInfo.unitPrice }} {{ itemPriceInfo.currency }}</ion-label>
<ion-label slot="end">{{ formatCurrency(itemPriceInfo.unitPrice, itemPriceInfo.currencyUom) }}</ion-label>
</ion-item>
</ion-list>
</ion-content>
Expand Down Expand Up @@ -69,7 +69,7 @@ import { mapGetters, useStore } from "vuex";
import { cardOutline, closeOutline, giftOutline, saveOutline } from "ionicons/icons";
import { getProductIdentificationValue, translate, useProductIdentificationStore } from '@hotwax/dxp-components'
import { UtilService } from "@/services/UtilService";
import { formatUtcDate, hasError, showToast } from '@/utils';
import { formatCurrency, formatUtcDate, hasError, showToast } from '@/utils';
import logger from "@/logger";
import { DateTime } from 'luxon';
Expand Down Expand Up @@ -170,6 +170,7 @@ export default defineComponent({
return {
cardOutline,
closeOutline,
formatCurrency,
formatUtcDate,
getProductIdentificationValue,
giftOutline,
Expand Down
2 changes: 1 addition & 1 deletion src/services/UtilService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ const fetchGiftCardItemPriceInfo = async (payload: any): Promise<any> => {
});

if(!hasError(resp)) {
itemPriceInfo.currency = resp.data.docs[0].currencyUom
itemPriceInfo.currencyUom = resp.data.docs[0].currencyUom
} else {
throw resp.data;
}
Expand Down

0 comments on commit b6db857

Please sign in to comment.