Skip to content

Commit

Permalink
Merge pull request #513 from amansinghbais/#494-fetch-identifier
Browse files Browse the repository at this point in the history
Improved: fetching dynamic good identification from store permissions page and showing 'not counted' for rejected item without quantity (#494)
  • Loading branch information
ravilodhi authored Nov 12, 2024
2 parents aa2bdbd + a43466e commit b4a25e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
"Update time zone": "Update time zone",
"Upload": "Upload",
"Upload inventory count": "Upload inventory count",
"units": "units",
"units": "{count} units",
"Username": "Username",
"Variance": "Variance",
"variance": "variance",
Expand Down
3 changes: 2 additions & 1 deletion src/views/CountDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,13 @@ async function scanProduct() {
element.scrollIntoView({ behavior: 'smooth' });
}
}, 0);
inputCount.value = ""
} else if(selectedItem.itemStatusId === "INV_COUNT_CREATED") {
if((!selectedItem.quantity && selectedItem.quantity !== 0) || product.value.isRecounting) {
hasUnsavedChanges.value = true;
inputCount.value++
} else if(selectedItem.quantity >= 0 && selectedItem.itemStatusId !== "INV_COUNT_REJECTED" && selectedItem.itemStatusId !== "INV_COUNT_COMPLETED") {
this.openRecountAlert()
openRecountAlert()
}
}
queryString.value = ""
Expand Down
4 changes: 2 additions & 2 deletions src/views/ProductItemList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<p>{{ getProductIdentificationValue(productStoreSettings["productIdentificationPref"].secondaryId, getProduct(item.productId)) }}</p>
</ion-label>
<ion-badge slot="end" color="danger" v-if="item.itemStatusId === 'INV_COUNT_REJECTED'">
{{ item.quantity === 0 ? 0 : item.quantity }} {{ translate("units") }}
{{ (!item.quantity && item.quantity !== 0) ? translate("not counted") : translate("units", { count: item.quantity }) }}
</ion-badge>
<ion-note v-else-if="item.itemStatusId === 'INV_COUNT_COMPLETED'" color="success">
{{ translate("accepted") }}
</ion-note>
<ion-badge slot="end" v-else-if="item.quantity >= 0 && item.statusId === 'INV_COUNT_ASSIGNED'">
{{ item.quantity }} {{ translate("units") }}
{{ translate("units", { count: item.quantity }) }}
</ion-badge>
<ion-note v-else-if="item.quantity === undefined || item.quantity === null && item.statusId === 'INV_COUNT_ASSIGNED'">
{{ translate("pending") }}
Expand Down
1 change: 1 addition & 0 deletions src/views/StorePermissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const productIdentifications = computed(() => store.getters["user/getGoodIdentif
onIonViewWillEnter(async () => {
await store.dispatch("user/getProductStoreSetting")
await store.dispatch("user/fetchGoodIdentificationTypes")
})
function updateProductStoreSetting(event: any, key: string) {
Expand Down

0 comments on commit b4a25e9

Please sign in to comment.