a little ux
This commit is contained in:
@@ -32,7 +32,8 @@
|
||||
(re-frame/reg-event-fx
|
||||
::view-unpaid-invoices
|
||||
(fn [cofx []]
|
||||
{:http {:method :get
|
||||
{:db (assoc-in (:db cofx) [:status :loading] true)
|
||||
:http {:method :get
|
||||
:uri "/api/invoices/unpaid"
|
||||
:on-success [::received-invoices :unpaid]}}))
|
||||
|
||||
@@ -47,4 +48,7 @@
|
||||
(re-frame/reg-event-db
|
||||
::received-invoices
|
||||
(fn [db [_ type new-invoices]]
|
||||
(assoc-in db [:invoices type] new-invoices)))
|
||||
(-> db
|
||||
(assoc-in [:invoices type] new-invoices)
|
||||
(assoc-in [:status :loading] false)
|
||||
)))
|
||||
|
||||
Reference in New Issue
Block a user