approach
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user