extract dossier_id_column, notifications_column
This commit is contained in:
parent
c6559577f1
commit
3c7521a428
2 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
= form_tag update_sort_instructeur_procedure_path(procedure_id: @procedure.id, column_id: 'notifications/notifications', order: opposite_order), method: :get, data: { controller: 'autosubmit' } do
|
= form_tag update_sort_instructeur_procedure_path(procedure_id: @procedure.id, column_id: @procedure.notifications_column.id, order: opposite_order), method: :get, data: { controller: 'autosubmit' } do
|
||||||
.fr-fieldset__element.fr-m-0
|
.fr-fieldset__element.fr-m-0
|
||||||
.fr-checkbox-group.fr-checkbox-group--sm
|
.fr-checkbox-group.fr-checkbox-group--sm
|
||||||
= check_box_tag :order, opposite_order, active?
|
= check_box_tag :order, opposite_order, active?
|
||||||
|
|
|
@ -14,8 +14,16 @@ module ColumnsConcern
|
||||||
columns.concat(types_de_champ_columns)
|
columns.concat(types_de_champ_columns)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def dossier_id_column
|
||||||
|
Column.new(table: 'self', column: 'id', classname: 'number-col', type: :number)
|
||||||
|
end
|
||||||
|
|
||||||
|
def notifications_column
|
||||||
|
Column.new(table: 'notifications', column: 'notifications', label: "notifications", filterable: false)
|
||||||
|
end
|
||||||
|
|
||||||
def dossier_columns
|
def dossier_columns
|
||||||
common = [Column.new(table: 'self', column: 'id', classname: 'number-col', type: :number), Column.new(table: 'notifications', column: 'notifications', label: "notifications", filterable: false)]
|
common = [dossier_id_column, notifications_column]
|
||||||
|
|
||||||
dates = ['created_at', 'updated_at', 'depose_at', 'en_construction_at', 'en_instruction_at', 'processed_at']
|
dates = ['created_at', 'updated_at', 'depose_at', 'en_construction_at', 'en_instruction_at', 'processed_at']
|
||||||
.map { |column| Column.new(table: 'self', column:, type: :date) }
|
.map { |column| Column.new(table: 'self', column:, type: :date) }
|
||||||
|
|
Loading…
Reference in a new issue