a bunch of filtering fixes.

This commit is contained in:
Bryce Covert
2020-05-20 07:51:07 -07:00
parent 3678997013
commit d30dfb5e34
8 changed files with 125 additions and 6 deletions

View File

@@ -8,10 +8,17 @@
[re-frame.core :as re-frame]))
(re-frame/reg-sub
::table-params
::specific-table-params
(fn [db]
(::table-params db)))
(re-frame/reg-sub
::table-params
:<- [::specific-table-params]
:<- [::subs/query-params]
(fn [[specific-table-params query-params]]
(merge (select-keys query-params #{:start :sort}) specific-table-params)))
(re-frame/reg-event-fx
::params-changed
[(re-frame/path [::table-params])]
@@ -40,7 +47,7 @@
[:td status]
[:td
(when (or (= :pending status)
(and (#{":cash" :cash} type)
(and (#{":cash" :cash ":debit" :debit} type)
(not= :voided status)))
[:button.button.is-warning.is-outlined {:on-click (dispatch-event (conj void-event check))} [:span [:span.icon [:i.fa.fa-minus-circle]]]])]]))