Made it so customers can create vendors.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
[auto-ap.events.admin.vendors :as events]
|
||||
[auto-ap.entities.vendors :as entity]
|
||||
[auto-ap.views.components.address :refer [address-field]]
|
||||
[auto-ap.views.components.vendor-dialog :refer [vendor-dialog]]
|
||||
[auto-ap.views.components.modal :refer [modal]]
|
||||
[clojure.spec.alpha :as s]
|
||||
[auto-ap.views.utils :refer [login-url dispatch-value-change dispatch-event bind-field horizontal-field]]
|
||||
@@ -55,7 +56,7 @@
|
||||
|
||||
|
||||
|
||||
(defn edit-dialog []
|
||||
#_(defn edit-dialog []
|
||||
(let [editing-vendor (:vendor @(re-frame/subscribe [::subs/admin]))
|
||||
companies-by-id @(re-frame/subscribe [::subs/companies-by-id])]
|
||||
|
||||
@@ -263,7 +264,9 @@
|
||||
[:div.is-pulled-right
|
||||
[:a.button.is-primary.is-large {:on-click (dispatch-event [::events/new])} "New vendor"]]
|
||||
|
||||
(when editing-vendor
|
||||
[edit-dialog])])])
|
||||
[vendor-dialog {:vendor editing-vendor
|
||||
:save-event [::events/save]
|
||||
:change-event ::events/change
|
||||
:id ::admin-vendor}]])])
|
||||
{:component-did-mount (fn []
|
||||
(re-frame/dispatch [::events/mounted]))})])
|
||||
|
||||
Reference in New Issue
Block a user