2024-10-29 16:38:17 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Columns::DossierColumn < Column
|
2024-10-31 21:36:13 +01:00
|
|
|
def value(dossier)
|
2024-10-29 16:38:17 +01:00
|
|
|
case table
|
|
|
|
when 'self'
|
|
|
|
dossier.public_send(column)
|
|
|
|
when 'etablissement'
|
|
|
|
dossier.etablissement.public_send(column)
|
|
|
|
when 'individual'
|
|
|
|
dossier.individual.public_send(column)
|
|
|
|
when 'groupe_instructeur'
|
|
|
|
dossier.groupe_instructeur.label
|
|
|
|
when 'followers_instructeurs'
|
|
|
|
dossier.followers_instructeurs.map(&:email).join(' ')
|
|
|
|
end
|
|
|
|
end
|
2024-10-25 14:36:38 +02:00
|
|
|
|
|
|
|
def dossier_column? = true
|
2024-10-29 16:38:17 +01:00
|
|
|
end
|