diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index 90cfb00..2d3436c 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -165,7 +165,7 @@ {{ "Select if partial allocation should be allowed in this inventory rule" }} - {{ "Allow partial allocation" }} + {{ "Allow partial allocation" }} @@ -490,6 +490,23 @@ function updatePartialAllocation(checked: any) { }) } +function isPromiseDateFilterApplied() { + 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) { + inventoryRules.value.find((inventoryRule: any) => { + const assignmentEnumId = JSON.parse(JSON.stringify(currentRouting.value["rules"])).find((rule: any) => rule.routingRuleId === selectedRoutingRule.value.routingRuleId)?.assignmentEnumId + + if(inventoryRule.routingRuleId === selectedRoutingRule.value.routingRuleId) { + inventoryRule.assignmentEnumId = assignmentEnumId + return true; + } + }) + } + return filter?.fieldValue || filter?.fieldValue == 0 +} + function getFilterValue(options: any, enums: any, parameter: string) { return options?.[enums[parameter].code] }