2021-12-02 16:19:17 +01:00
|
|
|
-# small expires mention
|
|
|
|
- if dossier.expirable?
|
2023-02-23 15:00:59 +01:00
|
|
|
%p.expires_at
|
2021-12-03 16:09:51 +01:00
|
|
|
%small
|
|
|
|
= t("shared.dossiers.header.expires_at.#{dossier.state}", date: safe_expiration_date(dossier), duree_conservation_totale: dossier.duree_totale_conservation_in_months)
|
|
|
|
- if dossier.conservation_extension.positive?
|
|
|
|
= t('instructeurs.dossiers.header.banner.expiration_date_extended')
|
2023-01-03 17:03:30 +01:00
|
|
|
|
2024-06-04 17:52:01 +02:00
|
|
|
- if dossier.close_to_expiration? || dossier.has_expired?
|
|
|
|
- title = dossier.has_expired? ? 'title_expired' : 'title'
|
|
|
|
= render Dsfr::CalloutComponent.new(title: t("instructeurs.dossiers.header.banner.#{title}"), theme: :warning) do |c|
|
2023-01-03 17:03:30 +01:00
|
|
|
- c.with_body do
|
|
|
|
- if dossier.brouillon?
|
|
|
|
= t('instructeurs.dossiers.header.banner.states.brouillon')
|
|
|
|
- elsif dossier.en_construction?
|
|
|
|
= t('instructeurs.dossiers.header.banner.states.en_construction', nominal_duration_months: dossier.procedure.duree_conservation_dossiers_dans_ds)
|
|
|
|
- elsif dossier.termine?
|
|
|
|
= t('instructeurs.dossiers.header.banner.states.termine')
|
2021-12-02 16:19:17 +01:00
|
|
|
|
|
|
|
- if dossier.expiration_can_be_extended?
|
2023-01-03 17:03:30 +01:00
|
|
|
- c.with_bottom do
|
|
|
|
= button_to repousser_expiration_instructeur_dossier_path(dossier.procedure, dossier), class: 'fr-btn', id: 'test-instructeur-repousser-expiration' do
|
|
|
|
= t('instructeurs.dossiers.header.banner.button_delay_expiration', count: dossier.procedure.duree_conservation_dossiers_dans_ds)
|
|
|
|
|
2022-02-11 15:30:22 +01:00
|
|
|
- elsif dossier.en_instruction? && dossier.procedure.procedure_expires_when_termine_enabled
|
2021-12-02 16:19:17 +01:00
|
|
|
%p.expires_at_en_instruction
|
|
|
|
%small= t("shared.dossiers.header.expires_at.en_instruction")
|