vendors can be updated through datomic.
This commit is contained in:
@@ -111,17 +111,6 @@
|
||||
(fn [db [_ new-invoices]]
|
||||
(assoc-in db [:invoices :pending] new-invoices)))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::approve-invoices
|
||||
(fn [cofx [_]]
|
||||
{:http {:method :post
|
||||
:token (-> cofx :db :user)
|
||||
:uri (str "/api/invoices/approve"
|
||||
(when-let [company-id (:id @(re-frame/subscribe [::subs/company]))]
|
||||
(str "?company=" company-id)))
|
||||
:on-success [::received-invoices :pending]
|
||||
}}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::view-pending-invoices
|
||||
(fn [cofx []]
|
||||
@@ -143,16 +132,6 @@
|
||||
[:id :total :invoice-number :date [:vendor [:name :id]] [:company [:name :id]]]]]}
|
||||
:on-success [::received-invoices :unpaid]}}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::reject-invoices
|
||||
(fn [cofx [_]]
|
||||
{:http {:method :post
|
||||
:token (-> cofx :db :user)
|
||||
:uri (str "/api/invoices/reject"
|
||||
(when-let [company-id (:id @(re-frame/subscribe [::subs/company]))]
|
||||
(str "?company=" company-id)))
|
||||
:on-success [::received-invoices :pending]
|
||||
}}))
|
||||
(re-frame/reg-event-db
|
||||
::submitted-new-invoice
|
||||
(fn [db [_ invoice]]
|
||||
|
||||
Reference in New Issue
Block a user