Expose repetitions and options on champ_descriptors
This commit is contained in:
parent
eb6c4b3dd1
commit
86f562e7ea
3 changed files with 34 additions and 2 deletions
|
@ -74,6 +74,11 @@ describe API::V2::GraphqlController do
|
|||
label
|
||||
description
|
||||
required
|
||||
champDescriptors {
|
||||
id
|
||||
type
|
||||
}
|
||||
options
|
||||
}
|
||||
dossiers {
|
||||
nodes {
|
||||
|
@ -129,7 +134,9 @@ describe API::V2::GraphqlController do
|
|||
label: tdc.libelle,
|
||||
type: tdc.type_champ,
|
||||
description: tdc.description,
|
||||
required: tdc.mandatory?
|
||||
required: tdc.mandatory?,
|
||||
champDescriptors: tdc.repetition? ? tdc.reload.types_de_champ.map { |tdc| { id: tdc.to_typed_id, type: tdc.type_champ } } : nil,
|
||||
options: tdc.drop_down_list? ? tdc.drop_down_list_options.reject(&:empty?) : nil
|
||||
}
|
||||
end,
|
||||
dossiers: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue