diff --git a/app/components/instructeurs/column_table_header_component.rb b/app/components/instructeurs/column_table_header_component.rb index fa4ff6f90..4cb90dd93 100644 --- a/app/components/instructeurs/column_table_header_component.rb +++ b/app/components/instructeurs/column_table_header_component.rb @@ -11,7 +11,7 @@ class Instructeurs::ColumnTableHeaderComponent < ApplicationComponent def classname(column) return 'status-col' if column.dossier_state? - return 'number-col' if column.type == :number + return 'number-col' if column.dossier_id? return 'sva-col' if column.column == 'sva_svr_decision_on' end diff --git a/app/models/column.rb b/app/models/column.rb index 5131c77c6..b02feda10 100644 --- a/app/models/column.rb +++ b/app/models/column.rb @@ -32,6 +32,7 @@ class Column def ==(other) = h_id == other.h_id # using h_id instead of id to avoid inversion of keys def notifications? = [table, column] == ['notifications', 'notifications'] + def dossier_id? = [table, column] == ['self', 'id'] def dossier_state? = [table, column] == ['self', 'state'] def groupe_instructeur? = [table, column] == ['groupe_instructeur', 'id'] def dossier_labels? = [table, column] == ['dossier_labels', 'label_id'] diff --git a/app/models/concerns/columns_concern.rb b/app/models/concerns/columns_concern.rb index 0a4a98299..5d61dc982 100644 --- a/app/models/concerns/columns_concern.rb +++ b/app/models/concerns/columns_concern.rb @@ -51,7 +51,7 @@ module ColumnsConcern columns.filter { _1.id.in?(self.columns.map(&:id)) } end - def dossier_id_column = dossier_col(table: 'self', column: 'id', type: :number) + def dossier_id_column = dossier_col(table: 'self', column: 'id', type: :integer) def dossier_state_column options_for_select = I18n.t('instructeurs.dossiers.filterable_state').map(&:to_a).map(&:reverse)