added description

This commit is contained in:
Bryce Covert
2021-10-11 18:36:58 -07:00
parent d20ae49e39
commit 20c2181770
4 changed files with 18 additions and 3 deletions

View File

@@ -59,6 +59,13 @@
'[(re-find ?note-pattern ?n)]]}
:args [(re-pattern (str "(?i)" (:note args)))]})
(not (str/blank? (:description args)))
(merge-query {:query {:in ['?description]
:where ['[?e :transaction-rule/description ?d]
'[(clojure.string/lower-case ?d) ?d2]
'[(clojure.string/includes? ?d2 ?description)]]}
:args [(clojure.string/lower-case (:description args))]})
true
(merge-query {:query {:find ['?e]
:where ['[?e :transaction-rule/transaction-approval-status]]}}))]

View File

@@ -627,7 +627,8 @@
:per_page {:type 'Int}
:sort {:type '(list :sort_item)}
:asc {:type 'Boolean}
:note {:type 'String}}
:note {:type 'String}
:description {:type 'String}}
:resolve :get-transaction-rule-page}
:ledger_page {:type :ledger_page

View File

@@ -38,7 +38,8 @@
:per-page (:per-page params)
:vendor-id (:id (:vendor params))
:client-id (:id @(re-frame/subscribe [::subs/client]))
:note (:note params)}
:note (:note params)
:description (:description params)}
[[:transaction-rules default-read]
:total
:start

View File

@@ -23,5 +23,11 @@
[:div.field
[:div.control [:input.input {:placeholder "HOME DEPOT"
:value @(re-frame/subscribe [::data-page/filter data-page :note])
:on-change (dispatch-value-change [::data-page/filter-changed data-page :note])} ]]]]])
:on-change (dispatch-value-change [::data-page/filter-changed data-page :note])} ]]]]
[:p.menu-label "Description"]
[:div
[:div.field
[:div.control [:input.input {:placeholder "HOME DEPOT"
:value @(re-frame/subscribe [::data-page/filter data-page :description])
:on-change (dispatch-value-change [::data-page/filter-changed data-page :description])} ]]]]])