diff --git a/app/components/dossiers/notified_toggle_component/notified_toggle_component.html.haml b/app/components/dossiers/notified_toggle_component/notified_toggle_component.html.haml index 0fe1c9b20..84ff21cb9 100644 --- a/app/components/dossiers/notified_toggle_component/notified_toggle_component.html.haml +++ b/app/components/dossiers/notified_toggle_component/notified_toggle_component.html.haml @@ -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-checkbox-group.fr-checkbox-group--sm = check_box_tag :order, opposite_order, active? diff --git a/app/models/concerns/columns_concern.rb b/app/models/concerns/columns_concern.rb index 3f8e11a52..efafecc18 100644 --- a/app/models/concerns/columns_concern.rb +++ b/app/models/concerns/columns_concern.rb @@ -14,8 +14,16 @@ module ColumnsConcern columns.concat(types_de_champ_columns) 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 - 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'] .map { |column| Column.new(table: 'self', column:, type: :date) }