inject dossier_labels at dossier_labels_column build time
This commit is contained in:
parent
f5227f9609
commit
2b6cc49541
2 changed files with 1 additions and 5 deletions
|
@ -54,10 +54,6 @@ class Instructeurs::ColumnFilterValueComponent < ApplicationComponent
|
|||
[_1.label, _1.id]
|
||||
end
|
||||
end
|
||||
elsif column.table == 'dossier_labels'
|
||||
Procedure.find(procedure_id).labels.filter_map do
|
||||
[_1.name, _1.id]
|
||||
end
|
||||
else
|
||||
column.options_for_select
|
||||
end
|
||||
|
|
|
@ -91,7 +91,7 @@ module ColumnsConcern
|
|||
|
||||
def user_france_connected_column = Columns::DossierColumn.new(procedure_id: id, table: 'self', column: 'user_from_france_connect?', filterable: false, displayable: false)
|
||||
|
||||
def dossier_labels_column = Columns::DossierColumn.new(procedure_id: id, table: 'dossier_labels', column: 'label_id', type: :enum)
|
||||
def dossier_labels_column = Columns::DossierColumn.new(procedure_id: id, table: 'dossier_labels', column: 'label_id', type: :enum, options_for_select: labels.map { [_1.name, _1.id] })
|
||||
|
||||
def procedure_chorus_columns
|
||||
['domaine_fonctionnel', 'referentiel_prog', 'centre_de_cout']
|
||||
|
|
Loading…
Reference in a new issue