database inserts.

This commit is contained in:
Bryce Covert
2017-12-08 07:39:41 -08:00
parent 9188ef7ca6
commit 252a6c5f9b
3 changed files with 51 additions and 10 deletions

View File

@@ -62,19 +62,17 @@
[:th "Invoice #"]
[:th "Date"]
[:th "Amount"]]]
[:tbody (for [{:strs [customer_identifier invoice_number date total] :as i} @invoices]
^{:key (str customer_identifier "-" invoice_number)}
[:tbody (for [{:keys [customer-identifier invoice-number date total id] :as i} @invoices]
^{:key (str customer-identifier "-" invoice-number "-" date "-" total "-" id)}
[:tr
[:td customer_identifier]
[:td invoice_number]
[:td customer-identifier]
[:td invoice-number]
[:td date]
[:td total]])]]]))
{:component-did-mount (fn []
(go
(->> (<! (http/get "/api/invoices"))
:body
(.parse js/JSON )
(js->clj)
(conj [::events/received-invoices])
(re-frame/dispatch))))})])