2021-11-26 14:31:30 +01:00
|
|
|
-# small expires mention
|
|
|
|
- if dossier.expirable?
|
2021-12-02 16:19:17 +01:00
|
|
|
%p.expires_at.mb-2
|
|
|
|
%small= t("shared.dossiers.header.expires_at.#{dossier.state}", date: safe_expiration_date(dossier), duree_conservation_totale: dossier.duree_totale_conservation_in_months)
|
2023-01-03 16:53:19 +01:00
|
|
|
|
2021-11-26 14:31:30 +01:00
|
|
|
- if dossier.close_to_expiration?
|
2023-01-03 16:53:19 +01:00
|
|
|
= render Dsfr::CalloutComponent.new(title: t('users.dossiers.header.banner.title'), theme: :warning) do |c|
|
|
|
|
- c.with_body do
|
|
|
|
- if dossier.brouillon?
|
|
|
|
= t('users.dossiers.header.banner.states.brouillon')
|
|
|
|
- elsif dossier.en_construction?
|
|
|
|
= t('users.dossiers.header.banner.states.en_construction', nominal_duration_months: dossier.procedure.duree_conservation_dossiers_dans_ds)
|
|
|
|
- elsif dossier.termine?
|
|
|
|
= t('users.dossiers.header.banner.states.termine')
|
2021-11-26 14:31:30 +01:00
|
|
|
|
|
|
|
- if dossier.expiration_can_be_extended?
|
2023-01-03 16:53:19 +01:00
|
|
|
- c.with_bottom do
|
|
|
|
= button_to users_dossier_repousser_expiration_path(dossier), class: 'fr-btn', id: 'test-user-repousser-expiration' do
|
|
|
|
= t('users.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-11-26 14:31:30 +01:00
|
|
|
%p.expires_at_en_instruction
|
|
|
|
%small= t("shared.dossiers.header.expires_at.en_instruction")
|
|
|
|
|