Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: made product item id and class dynamic to the barcode identification value of the product (#421) #422

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -161,7 +161,7 @@
}
},
async ionViewWillEnter() {
const current = await this.store.dispatch('return/setCurrent', { shipmentId: this.$route.params.id })

Check warning on line 164 in src/views/ReturnDetails.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'current' is assigned a value but never used

Check warning on line 164 in src/views/ReturnDetails.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'current' is assigned a value but never used
this.observeProductVisibility();
},
computed: {
Expand All @@ -174,6 +174,7 @@
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
Loading