ability to approve

This commit is contained in:
Bryce Covert
2017-12-09 08:26:52 -08:00
parent 36cac4a023
commit bc6db905a5
6 changed files with 59 additions and 4 deletions

View File

@@ -85,8 +85,7 @@
[:h1.title "All invoices"]])
{:component-did-mount (fn []
(go
(re-frame/dispatch [::events/received-invoices (:body (<! (http/get "/api/invoices")))]))
)})])
(re-frame/dispatch [::events/received-invoices (:body (<! (http/get "/api/invoices")))])))})])
(defmethod active-page :import-invoices []
[(with-meta
@@ -114,7 +113,16 @@
[:td customer-identifier]
[:td invoice-number]
[:td date]
[:td total]])]]]]]))
[:td total]])]]]
[:div.card-footer
[:a.card-footer-item
{:on-click (fn [e]
(.preventDefault e)
(re-frame/dispatch [::events/approve-invoices]))}
"Approve all"]
[:a.card-footer-item
"Reject all"]
]]]))
{:component-did-mount (fn []
(go
(->> (<! (http/get "/api/invoices/pending"))