diff --git a/src/locales/en.json b/src/locales/en.json index 93c711f..22b9cda 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -97,7 +97,6 @@ "No run history": "No run history", "No runs scheduled": "No runs scheduled", "No time zone found": "No time zone found", - "None": "None", "OMS": "OMS", "OMS instance": "OMS instance", "Order batches": "Order batches", diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index d32b9ea..0f3de0f 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -259,9 +259,6 @@ {{ translate("Queue") }} - - {{ translate("None") }} - @@ -666,6 +663,16 @@ async function addInventoryRule() { const routingRuleId = await store.dispatch("orderRouting/createRoutingRule", payload) if(routingRuleId) { + // Updating the rule action to NEXT_RULE by default after creation + await store.dispatch("orderRouting/updateRule", { + routingRuleId, + orderRoutingId: props.orderRoutingId, + actions: [{ + actionTypeEnumId: "ORA_NEXT_RULE", + actionValue: "", + createdDate: DateTime.now().toMillis() + }] + }) // TODO: Fix warning of duplicate keys when creating a new rule inventoryRules.value = sortSequence(JSON.parse(JSON.stringify(currentRouting.value["rules"]))) fetchRuleInformation(routingRuleId) @@ -691,13 +698,11 @@ function updateOrderRouting(value: string) { function updateUnfillableActionType(value: string) { const actionType = ruleActionType.value ruleActionType.value = value - // Create the new action type only when we have not selected none option, otherwise just delete the previous selected action type - if(value) { - inventoryRuleActions.value[ruleActionType.value] = { - actionTypeEnumId: value, - actionValue: "", // after changing action type, as next_rule action does not need to have a value, so in all cases making intially the value as empty and will update if required from some other function - createdDate: DateTime.now().toMillis() - } + + inventoryRuleActions.value[ruleActionType.value] = { + actionTypeEnumId: value, + actionValue: "", // after changing action type, as next_rule action does not need to have a value, so in all cases making intially the value as empty and will update if required from some other function + createdDate: DateTime.now().toMillis() } // deleting previous action type, but using the data of previous action delete inventoryRuleActions.value[actionType]