Skip to content

Commit

Permalink
Improved: made product item dynamic to the barcode identification val…
Browse files Browse the repository at this point in the history
…ue of the product (#421)
  • Loading branch information
amansinghbais committed Nov 15, 2024
1 parent 9acb9f9 commit 8ae4e07
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"Scanned item is not present within the shipment:": "Scanned item is not present within the shipment: {itemName}",
"Scanned successfully.": "Scanned {itemName} successfully.",
"Search items": "Search items",
"Searched item is not present within the shipment:": "Scanned item is not present within the shipment: {itemName}",
"Searched item is not present within the shipment:": "Searched item is not present within the shipment: {itemName}",
"secondary identifier": "secondary identifier",
"Search": "Search",
"Search purchase orders": "Search purchase orders",
Expand Down
5 changes: 3 additions & 2 deletions src/views/PurchaseOrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</ion-item>

<template v-if="!isPOReceived()">
<ion-card v-for="(item, index) in getPOItems('pending')" v-show="item.orderItemStatusId !== 'ITEM_COMPLETED' && item.orderItemStatusId !== 'ITEM_REJECTED'" :key="index" :class="item.internalName === lastScannedId ? 'scanned-item' : '' " :id="item.internalName">
<ion-card v-for="(item, index) in getPOItems('pending')" v-show="item.orderItemStatusId !== 'ITEM_COMPLETED' && item.orderItemStatusId !== 'ITEM_REJECTED'" :key="index" :class="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId)) === lastScannedId ? 'scanned-item' : '' " :id="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId))">
<div class="product">
<div class="product-info">
<ion-item lines="none">
Expand Down Expand Up @@ -112,7 +112,7 @@
</ion-button>
</ion-item>

<ion-card v-for="(item, index) in getPOItems('completed')" v-show="showCompletedItems && item.orderItemStatusId === 'ITEM_COMPLETED'" :key="index">
<ion-card v-for="(item, index) in getPOItems('completed')" v-show="showCompletedItems && item.orderItemStatusId === 'ITEM_COMPLETED'" :key="index" :class="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId)) === lastScannedId ? 'scanned-item' : '' " :id="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId))">
<div class="product">
<div class="product-info">
<ion-item lines="none">
Expand Down Expand Up @@ -233,6 +233,7 @@ export default defineComponent({
facilityLocationsByFacilityId: 'user/getFacilityLocationsByFacilityId',
currentFacility: 'user/getCurrentFacility',
isForceScanEnabled: 'util/isForceScanEnabled',
barcodeIdentifier: 'util/getBarcodeIdentificationPref',
})
},
methods: {
Expand Down
3 changes: 2 additions & 1 deletion src/views/ReturnDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</ion-button>
</div>

<ion-card v-for="item in current.items" :key="item.id" :class="item.sku === lastScannedId ? 'scanned-item' : ''" :id="item.sku">
<ion-card v-for="item in current.items" :key="item.id" :class="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId)) === lastScannedId ? 'scanned-item' : ''" :id="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId))">
<div class="product" :data-product-id="item.productId">
<div class="product-info">
<ion-item lines="none">
Expand Down Expand Up @@ -174,6 +174,7 @@ export default defineComponent({
validStatusChange: 'return/isReturnReceivable',
isReturnReceivable: 'return/isReturnReceivable',
isForceScanEnabled: 'util/isForceScanEnabled',
barcodeIdentifier: 'util/getBarcodeIdentificationPref'
}),
},
methods: {
Expand Down
3 changes: 2 additions & 1 deletion src/views/ShipmentDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</ion-button>
</div>

<ion-card v-for="item in current.items" :key="item.id" :class="item.sku === lastScannedId ? 'scanned-item' : ''" :id="item.sku">
<ion-card v-for="item in current.items" :key="item.id" :class="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId)) === lastScannedId ? 'scanned-item' : ''" :id="getProductIdentificationValue(barcodeIdentifier, getProduct(item.productId))">
<div class="product" :data-product-id="item.productId">
<div class="product-info">
<ion-item lines="none">
Expand Down Expand Up @@ -172,6 +172,7 @@ export default defineComponent({
facilityLocationsByFacilityId: 'user/getFacilityLocationsByFacilityId',
currentFacility: 'user/getCurrentFacility',
isForceScanEnabled: 'util/isForceScanEnabled',
barcodeIdentifier: 'util/getBarcodeIdentificationPref',
}),
},
methods: {
Expand Down

0 comments on commit 8ae4e07

Please sign in to comment.