Skip to content

How To Save A Rule

klequis edited this page Oct 23, 2020 · 1 revision

A New Rule

  • Call ruleEditSlice.ruleCreate(rule)
    • It is currently called from Rule._handleSaveClick(ruleEdit)
    • Once the rule has been saved ruleCreate will refresh/get all rules & transactions.

An Existing Rule

  • Call ruleEditSlice.ruleUpdate(rule)
    • It is currently called from Rule._handleSaveClick(ruleEdit)
    • Once the rule has been saved ruleUpdate will refresh/get all rules & transactions.

On the Server, for Both a New or Existing Rule

  • Once the rules is saved the server will run all rules, applying them to transactions that match their criteria.

A future optimization could be to only update transactions that match the new/updated rule's criteria.