remove last field_hash
This commit is contained in:
parent
305b8c13c7
commit
969282e453
1 changed files with 2 additions and 20 deletions
|
@ -41,9 +41,9 @@ class ProcedurePresentation < ApplicationRecord
|
|||
|
||||
def displayed_fields_for_headers
|
||||
[
|
||||
field_hash('self', 'id', classname: 'number-col'),
|
||||
Facet.new(table: 'self', column: 'id', classname: 'number-col'),
|
||||
*displayed_fields.map { Facet.new(**_1.deep_symbolize_keys) },
|
||||
field_hash('self', 'state', classname: 'state-col'),
|
||||
Facet.new(table: 'self', column: 'state', classname: 'state-col'),
|
||||
*Facet.sva_svr_facets(procedure:)
|
||||
]
|
||||
end
|
||||
|
@ -368,24 +368,6 @@ class ProcedurePresentation < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def field_hash(table, column, label: nil, classname: '', virtual: false, type: :text, scope: '', value_column: :value, filterable: true)
|
||||
Facet.new(table:, column:, label:, classname:, virtual:, type:, scope:, value_column:, filterable:)
|
||||
end
|
||||
|
||||
def field_hash_for_type_de_champ_public(type_champ, libelle, stable_id)
|
||||
field_hash(TYPE_DE_CHAMP, stable_id.to_s,
|
||||
label: libelle,
|
||||
type: TypeDeChamp.filter_hash_type(type_champ),
|
||||
value_column: TypeDeChamp.filter_hash_value_column(type_champ))
|
||||
end
|
||||
|
||||
def field_hash_for_type_de_champ_private(type_champ, libelle, stable_id)
|
||||
field_hash(TYPE_DE_CHAMP_PRIVATE, stable_id.to_s,
|
||||
label: libelle,
|
||||
type: TypeDeChamp.filter_hash_type(type_champ),
|
||||
value_column: TypeDeChamp.filter_hash_value_column(type_champ))
|
||||
end
|
||||
|
||||
def valid_column?(table, column, extra_columns = {})
|
||||
valid_columns_for_table(table).include?(column) ||
|
||||
extra_columns[table]&.include?(column)
|
||||
|
|
Loading…
Reference in a new issue