This commit is contained in:
Bryce Covert
2020-08-17 20:11:52 -07:00
parent 6a8bb77e95
commit 441077169f
5 changed files with 27 additions and 24 deletions

View File

@@ -75,14 +75,6 @@
[::checks-printed invoices pdf-url])}]}))
(re-frame/reg-sub
::checked-invoices
:<- [::data-page/data :invoices]
:<- [::data-page/checked :invoices]
(fn [[data checked]]
(filter (comp #(get checked %) :id) (:data data))))
(defn print-checks-query [invoice-payments bank-account-id type client-id]
{:venia/operation {:operation/type :mutation
:operation/name "PrintChecks"}
@@ -104,7 +96,7 @@
:query-obj (print-checks-query (map (fn [{:keys [id outstanding-balance] }]
{:invoice-id id
:amount outstanding-balance})
@(re-frame/subscribe [::checked-invoices]))
(vals @(re-frame/subscribe [::data-page/checked :invoices])))
bank-account-id
type
(:client db))
@@ -140,7 +132,7 @@
(defn pay-button []
(let [current-client @(re-frame/subscribe [::subs/client])
checked-invoices @(re-frame/subscribe [::checked-invoices])]
checked-invoices (vals @(re-frame/subscribe [::data-page/checked :invoices]))]
[:div
[:div.is-pulled-right
[:div.buttons