New vendor everywhere

This commit is contained in:
Bryce Covert
2019-05-17 22:02:26 -07:00
parent 598c58a6bd
commit 9396bbb7eb
7 changed files with 27 additions and 34 deletions

View File

@@ -15,10 +15,10 @@
(re-frame/reg-event-fx
::edit
(fn [{:keys [db]} [_ vendor-id]]
{:db (assoc-in db [:admin :vendor]
{:db (assoc-in db [:user-editing-vendor]
(-> (get (:vendors db) vendor-id)
(assoc :default-account-id (:id (:default-account (get (:vendors db) vendor-id))))))
:dispatch [::events/modal-status :auto-ap.views.pages.admin.vendors/admin-vendor {:visible? true}]}))
:dispatch [::events/modal-status :auto-ap.views.main/user-editing-vendor {:visible? true}]}))
(re-frame/reg-event-fx
::new