feat(export.dossier_id): not a number, a string.

This commit is contained in:
mfo 2024-11-14 14:16:08 +01:00
parent ac6f5ba025
commit 9f2aff3459
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
3 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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']

View file

@ -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)