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: fetching dynamic good identification from store permissions page and showing 'not counted' for rejected item without quantity (#494) #513

Merged
merged 5 commits into from
Nov 12, 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 @@ -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
Loading