-
{{ translate("No results found for", { queryString }) }}
+
{{ translate("No results found for", { queryString: prevSearchedQuery }) }}
@@ -95,6 +95,7 @@ let queryString = ref('');
const isSearching = ref(false);
const selectedProductId = ref("") as Ref
;
const isLoading = ref(false);
+const prevSearchedQuery = ref("");
async function handleSearch() {
if(!queryString.value.trim()) {
@@ -120,6 +121,7 @@ async function getProducts() {
logger.error("Failed to fetch products", err)
}
products.value = productsList
+ prevSearchedQuery.value = queryString.value
isLoading.value = false;
}
function closeModal(payload = {}) {
diff --git a/src/views/CountDetail.vue b/src/views/CountDetail.vue
index 7b2271dc..19bcd391 100644
--- a/src/views/CountDetail.vue
+++ b/src/views/CountDetail.vue
@@ -270,6 +270,7 @@ const itemsList = computed(() => {
} else if (selectedSegment.value === 'pending') {
return cycleCountItems.value.itemList.filter(item =>(item.quantity === undefined || item.quantity === null) && item.itemStatusId === "INV_COUNT_CREATED");
} else if (selectedSegment.value === 'counted') {
+ // Based on discussion, item with rejected and completed status should be shown in the counted segment
return cycleCountItems.value.itemList.filter(item => item.quantity >= 0 || (item.itemStatusId === 'INV_COUNT_REJECTED' || item.itemStatusId === 'INV_COUNT_COMPLETED'));
} else if (selectedSegment.value === 'notCounted') {
return cycleCountItems.value.itemList.filter(item => !item.quantity && item.statusId === "INV_COUNT_REVIEW");
@@ -295,12 +296,14 @@ const barcodeInput = ref();
let isScanningInProgress = ref(false);
onIonViewDidEnter(async() => {
+ emitter.emit("presentLoader");
await Promise.allSettled([await fetchCycleCount(), store.dispatch("count/fetchCycleCountItems", { inventoryCountImportId : props?.id })])
selectedSegment.value = 'all';
queryString.value = '';
previousItem = itemsList.value[0]
await store.dispatch("product/currentProduct", itemsList.value[0])
barcodeInput.value?.$el?.setFocus();
+ emitter.emit("dismissLoader")
})
onIonViewDidLeave(async() => {
@@ -348,7 +351,6 @@ function inputCountValidation(event) {
}
async function fetchCycleCount() {
- emitter.emit("presentLoader");
let payload = props?.id
let resp
try {
@@ -362,7 +364,6 @@ async function fetchCycleCount() {
logger.error(err)
showToast(translate("Something went wrong"))
}
- emitter.emit("dismissLoader")
return;
}
diff --git a/src/views/HardCountDetail.vue b/src/views/HardCountDetail.vue
index 7799cd5a..84f2836e 100644
--- a/src/views/HardCountDetail.vue
+++ b/src/views/HardCountDetail.vue
@@ -253,12 +253,14 @@ let isScanningInProgress = ref(false);
onIonViewDidEnter(async() => {
+ emitter.emit("presentLoader");
await Promise.allSettled([fetchCycleCount(), await store.dispatch("count/fetchCycleCountItems", { inventoryCountImportId : props?.id })])
previousItem = itemsList.value[0];
await store.dispatch("product/currentProduct", itemsList.value?.length ? itemsList.value[0] : {})
barcodeInputRef.value?.$el?.setFocus();
selectedCountUpdateType.value = defaultRecountUpdateBehaviour.value
window.addEventListener('beforeunload', handleBeforeUnload);
+ emitter.emit("dismissLoader")
})
onIonViewDidLeave(async() => {
@@ -297,7 +299,6 @@ async function handleBeforeUnload() {
}
async function fetchCycleCount() {
- emitter.emit("presentLoader");
try {
const resp = await CountService.fetchCycleCount(props?.id)
if(!hasError(resp)) {
@@ -309,7 +310,6 @@ async function fetchCycleCount() {
logger.error(err)
showToast(translate("Something went wrong"))
}
- emitter.emit("dismissLoader")
}
function handleSegmentChange() {
diff --git a/src/views/ProductItemList.vue b/src/views/ProductItemList.vue
index 77d32c1a..699fbfca 100644
--- a/src/views/ProductItemList.vue
+++ b/src/views/ProductItemList.vue
@@ -18,10 +18,10 @@
{{ translate("accepted") }}
-
+
{{ translate("units", { count: isItemAlreadyAdded(item) ? item.quantity : item.scannedCount }) }}
-
+
{{ translate("pending") }}