Fixes an issue with adding accounts.
This commit is contained in:
@@ -496,7 +496,7 @@
|
|||||||
{:errors (fc/field-errors)}
|
{:errors (fc/field-errors)}
|
||||||
[:div {:hx-trigger "changed"
|
[:div {:hx-trigger "changed"
|
||||||
:hx-target "next div"
|
:hx-target "next div"
|
||||||
:hx-vals (format "js:{name: '%s', 'client-id': event.detail.clientId, value: event.detail.accountId || ''}" account-name)
|
:hx-vals (format "js:{name: '%s', 'client-id': event.detail.clientId || '', value: event.detail.accountId || ''}" account-name)
|
||||||
:hx-get (str (bidi/path-for ssr-routes/only-routes ::route/account-typeahead))
|
:hx-get (str (bidi/path-for ssr-routes/only-routes ::route/account-typeahead))
|
||||||
:x-init "$watch('clientId', cid => $dispatch('changed', $data));"}]
|
:x-init "$watch('clientId', cid => $dispatch('changed', $data));"}]
|
||||||
(account-typeahead* {:value (fc/field-value)
|
(account-typeahead* {:value (fc/field-value)
|
||||||
@@ -886,10 +886,10 @@
|
|||||||
(wrap-schema-enforce :route-params [:map [:db/id entity-id]]))
|
(wrap-schema-enforce :route-params [:map [:db/id entity-id]]))
|
||||||
::route/new-account (-> new-account
|
::route/new-account (-> new-account
|
||||||
(wrap-schema-enforce :query-schema [:map
|
(wrap-schema-enforce :query-schema [:map
|
||||||
[:client-id {:optional true}
|
[:client-id {:optional true}
|
||||||
[:maybe entity-id]]
|
[:maybe entity-id]]
|
||||||
[:index {:optional true
|
[:index {:optional true
|
||||||
:default 0} [nat-int? {:default 0}]]])
|
:default 0} [nat-int? {:default 0}]]])
|
||||||
wrap-admin wrap-client-redirect-unauthenticated)
|
wrap-admin wrap-client-redirect-unauthenticated)
|
||||||
::route/location-select (-> location-select
|
::route/location-select (-> location-select
|
||||||
(wrap-schema-enforce :query-schema [:map
|
(wrap-schema-enforce :query-schema [:map
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
(str/join ", "
|
(str/join ", "
|
||||||
(map
|
(map
|
||||||
(fn [[field alpine-field]]
|
(fn [[field alpine-field]]
|
||||||
(format "\"%s\": $data.%s" field alpine-field))
|
(format "\"%s\": $data.%s || ''" field alpine-field))
|
||||||
|
|
||||||
field->alpine-field)))))
|
field->alpine-field)))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user