refacto(dossier list): use model method en_construction_ou_instruction?

This commit is contained in:
Eric Leroy-Terquem 2024-03-18 10:50:51 +01:00
parent 5754d01242
commit bfd4ae9d50
No known key found for this signature in database
GPG key ID: ECE60B4C1FA2ABB3

View file

@ -58,13 +58,13 @@
= I18n.t('views.users.dossiers.dossiers_list.procedure_closed.brouillon.internal_procedure', link: commencer_path(dossier.procedure.replaced_by_procedure.path)).html_safe
- elsif dossier.brouillon? && dossier.procedure.closing_reason_other?
= I18n.t('views.users.dossiers.dossiers_list.procedure_closed.brouillon.other', link: closing_details_path(dossier.procedure.path)).html_safe
- elsif (dossier.en_construction? || dossier.en_instruction?) && dossier.procedure.closing_reason_internal_procedure?
- elsif dossier.en_construction_ou_instruction? && dossier.procedure.closing_reason_internal_procedure?
= I18n.t('views.users.dossiers.dossiers_list.procedure_closed.en_cours.internal_procedure')
- elsif (dossier.en_construction? || dossier.en_instruction?) && dossier.procedure.closing_reason_other?
- elsif dossier.en_construction_ou_instruction? && dossier.procedure.closing_reason_other?
= I18n.t('views.users.dossiers.dossiers_list.procedure_closed.en_cours.other', link: closing_details_path(dossier.procedure.path)).html_safe
- elsif (dossier.termine? && dossier.procedure.closing_reason == Procedure.closing_reasons.fetch(:internal_procedure))
- elsif dossier.termine? && dossier.procedure.closing_reason_internal_procedure?
= I18n.t('views.users.dossiers.dossiers_list.procedure_closed.termine.internal_procedure', link: commencer_path(dossier.procedure.replaced_by_procedure.path)).html_safe
- elsif (dossier.termine? && dossier.procedure.closing_reason == Procedure.closing_reasons.fetch(:other))
- elsif dossier.termine? && dossier.procedure.closing_reason_other?
= I18n.t('views.users.dossiers.dossiers_list.procedure_closed.termine.other', link: closing_details_path(dossier.procedure.path)).html_safe