Skip to content

Commit

Permalink
Improved: showing accepted or rejected status in the items in the ass…
Browse files Browse the repository at this point in the history
…igned status (#565)
  • Loading branch information
amansinghbais committed Dec 31, 2024
1 parent fb0dd1a commit d7ce380
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/AssignedCountPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<ion-content>
<ion-list>
<ion-list-header>{{ getProductIdentificationValue(productStoreSettings["productIdentificationPref"].primaryId, getProduct(item.productId)) || getProduct(item.productId).productName }}</ion-list-header>
<ion-item :lines="item.quantity ? 'none' : 'full'">
<ion-item :lines="isRemoveItemEligible(item) ? 'full' : 'none'">
<ion-label>{{ translate("Last counted")}}</ion-label>
<ion-note slot="end">{{ timeFromNow(item.lastCountedDate) }}</ion-note>
</ion-item>
<ion-item v-if="!item.quantity" lines="none" button @click="updateItem('remove')">
<ion-item v-if="isRemoveItemEligible(item)" lines="none" button @click="updateItem('remove')">
<ion-label>{{ translate("Remove from count")}}</ion-label>
<ion-icon slot="end" :icon="removeCircleOutline"/>
</ion-item>
Expand Down Expand Up @@ -39,4 +39,8 @@ const productStoreSettings = computed(() => store.getters["user/getProductStoreS
function updateItem(action: string) {
popoverController.dismiss({ itemAction: action })
}
function isRemoveItemEligible(item: any) {
return item.itemStatusId !== 'INV_COUNT_REJECTED' && item.itemStatusId !== 'INV_COUNT_COMPLETED' && !item.quantity;
}
</script>
1 change: 1 addition & 0 deletions src/views/AssignedDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<Image :src="getProduct(item.productId).mainImageUrl"/>
</ion-thumbnail>
<ion-label>
<p class="overline" v-if="item.itemStatusId === 'INV_COUNT_COMPLETED' || item.itemStatusId === 'INV_COUNT_REJECTED'">{{ translate(item.itemStatusId === "INV_COUNT_COMPLETED" ? "accepted" : "rejected") }}</p>
<h2>{{ getProductIdentificationValue(productStoreSettings["productIdentificationPref"].primaryId, getProduct(item.productId)) || getProduct(item.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productStoreSettings["productIdentificationPref"].secondaryId, getProduct(item.productId)) }}</p>
</ion-label>
Expand Down

0 comments on commit d7ce380

Please sign in to comment.