Skip to content

Commit

Permalink
Improved: Added a loader in the complete count function that complete…
Browse files Browse the repository at this point in the history
…s the pending count(hotwax#635)
  • Loading branch information
R-Sourabh committed Jan 17, 2025
1 parent 65a1fca commit 60bc6b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/views/PendingReviewDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,17 @@ async function recountItem(item?: any) {
}
async function completeCount() {
emitter.emit("presentLoader");
try {
const resp = await CountService.fetchCycleCountItemsCount({
inventoryCountImportId: props?.inventoryCountImportId,
statusId: "INV_COUNT_CREATED",
})
if(!hasError(resp) && resp.data?.count > 0) {
await fetchCountItems();
showToast(translate("Unable to complete the count as some items are still pending review. Please review the updated item list and try again"))
await fetchCountItems();
emitter.emit("dismissLoader")
return;
}
Expand All @@ -510,6 +512,7 @@ async function completeCount() {
showToast(translate("Failed to complete cycle count"))
logger.error(err)
}
emitter.emit("dismissLoader")
}
async function reassignCount() {
Expand Down

0 comments on commit 60bc6b7

Please sign in to comment.