Skip to content

Commit

Permalink
Merge pull request #577 from amansinghbais/#565-rejected
Browse files Browse the repository at this point in the history
Improved: showing accepted or rejected status in the items in the assigned status (#565)
  • Loading branch information
ymaheshwari1 authored Jan 9, 2025
2 parents 4d60821 + 776ba05 commit 285fa2f
Show file tree
Hide file tree
Showing 2 changed files with 15 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>
9 changes: 9 additions & 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="item.itemStatusId === 'INV_COUNT_COMPLETED' ? 'overline status-success' : 'overline status-danger'" 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 Expand Up @@ -410,6 +411,14 @@ function updateCustomTime(event: any) {
--padding-bottom: 80px;
}
.status-success {
color: var(--ion-color-success);
}
.status-danger {
color: var(--ion-color-danger);
}
@media (max-width: 991px) {
.header {
grid: "search"
Expand Down

0 comments on commit 285fa2f

Please sign in to comment.