Skip to content

Commit

Permalink
Improved: changed the ion-toggle with ion-input for shipment threshol…
Browse files Browse the repository at this point in the history
…d check filter(#260)
  • Loading branch information
R-Sourabh committed Nov 8, 2024
1 parent e76d257 commit a89609a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/AddInventoryFilterOptionsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ let enumerations = ref([]) as any
let areFiltersUpdated = ref(false)
// Added those enums here that needs to be hidden form the UI
const hiddenOptions = ["IIP_MSMNT_SYSTEM", "IIP_SPLIT_ITEM_GROUP", "IFP_SHIP_THREHOLD"]
const hiddenOptions = ["IIP_MSMNT_SYSTEM", "IIP_SPLIT_ITEM_GROUP"]
// Add entries for the enums those are dependent on another filter {enumId: { code, label }}
const dependentOptions = {"ISP_CUST_SEQ": { code: "facilityGroupId", label: "Facility group" }} as any
Expand Down
7 changes: 2 additions & 5 deletions src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@
</ion-toggle>
</ion-item>
<ion-item v-if="getFilterValue(inventoryRuleFilterOptions, conditionFilterEnums, 'SHIP_THREHOLD')">
<ion-toggle :checked="getFilterValue(inventoryRuleFilterOptions, conditionFilterEnums, 'SHIP_THREHOLD').fieldValue === 'Y'" @ionChange="updateRuleFilterValue($event, 'SHIP_THREHOLD')">
{{ translate("Shipment threshold check") }}
</ion-toggle>
<ion-label>{{ translate('Shipment threshold check') }}</ion-label>
<ion-chip slot="end" outline @click="selectValue('SHIP_THREHOLD', 'Add shipment threshold check')">{{ getFilterValue(inventoryRuleFilterOptions, conditionFilterEnums, "SHIP_THREHOLD").fieldValue || getFilterValue(inventoryRuleFilterOptions, conditionFilterEnums, "SHIP_THREHOLD").fieldValue == 0 ? getFilterValue(inventoryRuleFilterOptions, conditionFilterEnums, "SHIP_THREHOLD").fieldValue : "-" }}</ion-chip>
</ion-item>
</ion-card>
<ion-card>
Expand Down Expand Up @@ -1034,8 +1033,6 @@ function updateOrderFilterValue(event: CustomEvent, id: string, multi = false) {
function updateRuleFilterValue(event: CustomEvent, id: string) {
if(id === "FACILITY_ORDER_LIMIT") {
inventoryRuleFilterOptions.value[conditionFilterEnums[id].code].fieldValue = event.detail.checked ? "Y" : "N"
} else if(id === "SHIP_THREHOLD") {
inventoryRuleFilterOptions.value[conditionFilterEnums[id].code].fieldValue = event.detail.checked ? "Y" : "N"
} else {
inventoryRuleFilterOptions.value[conditionFilterEnums[id].code].fieldValue = event.detail.value
}
Expand Down

0 comments on commit a89609a

Please sign in to comment.