Makes multiple client selection somewhat possible via graphql.

This commit is contained in:
2023-08-31 13:05:06 -07:00
parent 9c472dfc8e
commit 1d82ec29e0
29 changed files with 274 additions and 139 deletions

View File

@@ -75,17 +75,18 @@
[:admin "Admin"]]
:allow-nil? false
:keywordize? true}]]
(when (#{:user :manager :power_user} (:role data))
[form-builder/field-v2 {:field :clients}
"Client"
[com/multi-field-v2 {:template [[form-builder/raw-field-v2 {:field :client}
[com/entity-typeahead
{:entities clients
:entity->text :name
:style {:width "13em"}}]]]
:key-fn :id
:schema [:sequential client-schema]
:new-text "Grant access to client"}]])
[form-builder/field-v2 {:field :clients}
(if (= :admin (:role data))
"Client Assignments"
"Client")
[com/multi-field-v2 {:template [[form-builder/raw-field-v2 {:field :client}
[com/entity-typeahead
{:entities clients
:entity->text :name
:style {:width "13em"}}]]]
:key-fn :id
:schema [:sequential client-schema]
:new-text "Grant access to client"}]]
[form-builder/hidden-submit-button]]]))