a bunch of filtering fixes.
This commit is contained in:
@@ -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]]]])]]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user