progress on bugs

This commit is contained in:
Bryce Covert
2020-08-19 18:25:27 -07:00
parent 2716b6e2ba
commit a08c197159
8 changed files with 26 additions and 47 deletions

View File

@@ -13,6 +13,9 @@
[auto-ap.datomic.transaction-rules :as tr]
[clojure.tools.logging :as log]))
(defn ->pattern [x]
(. java.util.regex.Pattern (compile x java.util.regex.Pattern/CASE_INSENSITIVE)))
(defn rule-applies? [transaction {:keys [:transaction-rule/description
:transaction-rule/dom-gte :transaction-rule/dom-lte
:transaction-rule/amount-gte :transaction-rule/amount-lte
@@ -83,8 +86,7 @@
(recur rules)))
[])))
(defn ->pattern [x]
(. java.util.regex.Pattern (compile x java.util.regex.Pattern/CASE_INSENSITIVE)))
(defn group-rules-by-priority [rules]
(->> rules