Skip to content

Commit

Permalink
Merge pull request #223 from ymaheshwari1/feat/add-action-type-on-rul…
Browse files Browse the repository at this point in the history
…e-creation

Implemented: support to define the default action type for a rule
  • Loading branch information
ymaheshwari1 authored May 24, 2024
2 parents 90db08a + 9ee109e commit 507444e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -663,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)
Expand Down

0 comments on commit 507444e

Please sign in to comment.