Skip to content

Commit

Permalink
Removed: logic to revert the value for partial allocation when promis…
Browse files Browse the repository at this point in the history
…e date filter is selected(#68)
  • Loading branch information
ymaheshwari1 committed Feb 14, 2024
1 parent 0a3cd3a commit 734f41a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -624,18 +624,8 @@ function isPromiseDateFilterApplied() {
return;
}
// When user updates partial allocation and then selects promiseDate filter then we will assume that the user wants to change the value for partialAllocation on server and thus we will not revert any change made in the partial allocation action and update its value on server
const filter = getFilterValue(orderRoutingFilterOptions.value, ruleEnums, "PROMISE_DATE")
// When promise date range is selected for order filter, we will revert any change made to the partialAllocation enum and will change it to its initial value and will disable the partial allocation feature
if(filter?.fieldValue || filter?.fieldValue == 0) {
const assignmentEnumId = JSON.parse(JSON.stringify(currentRouting.value["rules"])).find((rule: any) => rule.routingRuleId === selectedRoutingRule.value.routingRuleId)?.assignmentEnumId
inventoryRules.value.find((inventoryRule: any) => {
if(inventoryRule.routingRuleId === selectedRoutingRule.value.routingRuleId) {
inventoryRule.assignmentEnumId = assignmentEnumId
return true;
}
})
}
return filter?.fieldValue || filter?.fieldValue == 0
}
Expand Down

0 comments on commit 734f41a

Please sign in to comment.