improvements for payment finding

This commit is contained in:
2021-04-27 21:46:45 -07:00
parent ec236ae979
commit 4c764ed927
6 changed files with 45 additions and 10 deletions

View File

@@ -38,6 +38,7 @@
:sort (:sort params)
:client-id (:id @(re-frame/subscribe [::subs/client]))
:vendor-id (:id (:vendor params))
:payment-type (:payment-type params)
:exact-match-id (some-> (:exact-match-id params) str)
:date-range (:date-range params)
:amount-gte (:amount-gte (:amount-range params))

View File

@@ -45,6 +45,27 @@
:value @(re-frame/subscribe [::data-page/filter data-page :invoice-number])
:on-change (dispatch-value-change [::data-page/filter-changed data-page :invoice-number])} ]]]
[:p.menu-label "Payment Type"]
[:div.field.has-addons
[:p.control [:a.button.is-small {:on-click
(dispatch-event [::data-page/filter-changed data-page :payment-type :cash])
:class (when (= :cash @(re-frame/subscribe [::data-page/filter data-page :payment-type]))
["is-selected" "is-success"])}
"Cash" ]]
[:p.control [:a.button.is-small {:on-click
(dispatch-event [::data-page/filter-changed data-page :payment-type :check])
:class (when (= :check @(re-frame/subscribe [::data-page/filter data-page :payment-type]))
["is-selected" "is-success"])}
"Check" ]]
[:p.control [:a.button.is-small {:on-click
(dispatch-event [::data-page/filter-changed data-page :payment-type :debit])
:class (when (= :debit @(re-frame/subscribe [::data-page/filter data-page :payment-type]))
["is-selected" "is-success"])}
"Debit"]]
[:p.control [:a.button.is-small {:on-click
(dispatch-event [::data-page/filter-changed data-page :payment-type nil])}
"All"]]]
(when-let [exact-match-id @(re-frame/subscribe [::data-page/filter data-page :exact-match-id])]
[:div
[:p.menu-label "Specific Payment"]