chore: only create columns on fillable champs
This commit is contained in:
parent
10e3faec92
commit
e2ace4f6bd
1 changed files with 15 additions and 11 deletions
|
@ -93,17 +93,21 @@ class TypesDeChamp::TypeDeChampBase
|
||||||
end
|
end
|
||||||
|
|
||||||
def columns(procedure_id:, displayable: true, prefix: nil)
|
def columns(procedure_id:, displayable: true, prefix: nil)
|
||||||
[
|
if fillable?
|
||||||
Column.new(
|
[
|
||||||
procedure_id:,
|
Column.new(
|
||||||
table: Column::TYPE_DE_CHAMP_TABLE,
|
procedure_id:,
|
||||||
column: stable_id.to_s,
|
table: Column::TYPE_DE_CHAMP_TABLE,
|
||||||
label: libelle_with_prefix(prefix),
|
column: stable_id.to_s,
|
||||||
type: TypeDeChamp.column_type(type_champ),
|
label: libelle_with_prefix(prefix),
|
||||||
value_column: TypeDeChamp.value_column(type_champ),
|
type: TypeDeChamp.column_type(type_champ),
|
||||||
displayable:
|
value_column: TypeDeChamp.value_column(type_champ),
|
||||||
)
|
displayable:
|
||||||
]
|
)
|
||||||
|
]
|
||||||
|
else
|
||||||
|
[]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue