2017-11-24 19:25:29 +01:00
|
|
|
module DossierHelper
|
2017-11-24 19:26:24 +01:00
|
|
|
def button_or_label_class(dossier)
|
2017-11-24 19:25:29 +01:00
|
|
|
if dossier.closed?
|
|
|
|
'accepted'
|
|
|
|
elsif dossier.without_continuation?
|
|
|
|
'without-continuation'
|
|
|
|
elsif dossier.refused?
|
|
|
|
'refused'
|
|
|
|
end
|
|
|
|
end
|
2017-12-05 16:07:05 +01:00
|
|
|
|
|
|
|
def highlight_if_unseen_class(seen_at, updated_at)
|
|
|
|
if seen_at&.<(updated_at)
|
|
|
|
"highlighted"
|
|
|
|
end
|
|
|
|
end
|
2017-11-24 19:25:29 +01:00
|
|
|
end
|