really improved vendor dialog code.

This commit is contained in:
Bryce Covert
2020-04-18 09:16:32 -07:00
parent 9204e18b98
commit ec10e6b823
13 changed files with 211 additions and 335 deletions

View File

@@ -10,7 +10,9 @@
[auto-ap.views.utils :refer [active-when active-when= login-url dispatch-event appearing css-transition-group]]
[auto-ap.views.components.vendor-dialog :refer [vendor-dialog]]
[auto-ap.views.components.vendor-dialog :refer [vendor-dialog]]))
[auto-ap.views.components.vendor-dialog :refer [vendor-dialog]]
[auto-ap.entities.vendors :as vendor]
[auto-ap.views.components.vendor-dialog :as vendor-dialog]))
(defn navbar-drop-down-contents [{:keys [id]} children ]
@@ -85,7 +87,7 @@
[:div.navbar-end
[:div.navbar-item
[:a.button.is-primary.is-outlined
{:on-click (dispatch-event [::events/modal-status :auto-ap.views.main/user-editing-vendor {:visible? true}])}
{:on-click (dispatch-event [::vendor-dialog/started {}])}
[:span.icon [:i.fa.fa-plus] ] [:span "Vendor"]]]
@@ -140,9 +142,7 @@
]
#_[footer]
[:div
[vendor-dialog {:vendor @(re-frame/subscribe [::subs/user-editing-vendor])
:save-event [::events/save-vendor]
:change-event [::events/change-nested-form-state [:user-editing-vendor]] :id :auto-ap.views.main/user-editing-vendor}]
[vendor-dialog {}]
bottom]
[:div#dz-hidden]]))