locations.

This commit is contained in:
Bryce Covert
2019-04-14 22:08:36 -07:00
parent c44a36c815
commit b05b2244a0
13 changed files with 170 additions and 67 deletions

View File

@@ -14,7 +14,7 @@
true))
(re-frame/reg-sub
::account-request
::request
:<- [::forms/form ::form]
(fn [{{:keys [id location type numeric-code name account-set]} :data}]
{:id id
@@ -49,7 +49,7 @@
:query-obj {:venia/operation {:operation/type :mutation
:operation/name "UpsertAccount"}
:venia/queries [{:query/data [:upsert-account
{:account @(re-frame/subscribe [::account-request])}
{:account @(re-frame/subscribe [::request])}
[:id :type :name :account-set :numeric-code :location]]}]}
:on-success [::edited edit-completed]
:on-error [::forms/save-error ::form]}}))))
@@ -130,7 +130,7 @@
[:div.notification.is-warning.animated.fadeInUp
error])
[:button.button.is-large.is-primary {:disabled (if (s/valid? ::entity/account @(re-frame/subscribe [::account-request]))
[:button.button.is-large.is-primary {:disabled (if (s/valid? ::entity/account @(re-frame/subscribe [::request]))
""
"disabled")
:on-click (dispatch-event [::saving edit-completed])