diff --git a/app/serializers/dossier_serializer.rb b/app/serializers/dossier_serializer.rb index 0acd0ed29..a6d62e851 100644 --- a/app/serializers/dossier_serializer.rb +++ b/app/serializers/dossier_serializer.rb @@ -1,4 +1,6 @@ class DossierSerializer < ActiveModel::Serializer + include DossierHelper + attributes :id, :created_at, :updated_at, @@ -46,7 +48,7 @@ class DossierSerializer < ActiveModel::Serializer end def simplified_state - object.decorate.display_state + dossier_display_state(object) end def initiated_at diff --git a/app/views/new_gestionnaire/dossiers/_header.html.haml b/app/views/new_gestionnaire/dossiers/_header.html.haml index a624838f2..3928b531d 100644 --- a/app/views/new_gestionnaire/dossiers/_header.html.haml +++ b/app/views/new_gestionnaire/dossiers/_header.html.haml @@ -46,4 +46,4 @@ .print-header = dossier.procedure.libelle.truncate_words(10) > - = "Dossier nº #{dossier.id} (#{dossier.statut})" + = "Dossier nº #{dossier.id} (#{dossier_display_state(dossier, lower: true)})" diff --git a/app/views/new_gestionnaire/dossiers/_state_button.html.haml b/app/views/new_gestionnaire/dossiers/_state_button.html.haml index 48aaa5d8a..4063b6e56 100644 --- a/app/views/new_gestionnaire/dossiers/_state_button.html.haml +++ b/app/views/new_gestionnaire/dossiers/_state_button.html.haml @@ -1,7 +1,7 @@ - if dossier.en_construction? || dossier.en_instruction? %span.dropdown %button.button.primary.dropdown-button - = dossier.decorate.display_state + = dossier_display_state dossier .dropdown-content.fade-in-down %ul.dropdown-items - if dossier.en_construction? @@ -55,7 +55,7 @@ - if dossier.motivation.present? || dossier.attestation.present? %span.dropdown %button.button.dropdown-button{ class: button_or_label_class(dossier) } - = dossier.statut + = dossier_display_state(dossier, lower: true) .dropdown-content.fade-in-down.terminated - if dossier.motivation.present? %h4 Motivation @@ -67,4 +67,4 @@ = link_to "Voir l'attestation", attestation_gestionnaire_dossier_path(dossier.procedure, dossier), target: '_blank', class: 'button' - else %span.label{ class: button_or_label_class(dossier) } - = dossier.statut + = dossier_display_state(dossier, lower: true)