diff --git a/app/components/procedure/card/sva_svr_component/sva_svr_component.en.yml b/app/components/procedure/card/sva_svr_component/sva_svr_component.en.yml index f9aa71a10..8a4aa581f 100644 --- a/app/components/procedure/card/sva_svr_component/sva_svr_component.en.yml +++ b/app/components/procedure/card/sva_svr_component/sva_svr_component.en.yml @@ -1,4 +1,6 @@ --- en: - ready: "Configuré" - needs_configuration: "À configurer" + title: "Silence Vaut Accord ou Rejet" + subtitle: "Accept or Refuse a file after a deadline" + ready: "Configured" + disabled: "Disabled" diff --git a/app/components/procedure/card/sva_svr_component/sva_svr_component.fr.yml b/app/components/procedure/card/sva_svr_component/sva_svr_component.fr.yml index 18e6e9728..8ed547ab5 100644 --- a/app/components/procedure/card/sva_svr_component/sva_svr_component.fr.yml +++ b/app/components/procedure/card/sva_svr_component/sva_svr_component.fr.yml @@ -3,4 +3,4 @@ fr: title: "Silence Vaut Accord ou Rejet" subtitle: "Accepter ou Refuser un dossier après un délai" ready: "Configuré" - needs_configuration: "À configurer" + disabled: "Désactivé" diff --git a/app/components/procedure/card/sva_svr_component/sva_svr_component.html.haml b/app/components/procedure/card/sva_svr_component/sva_svr_component.html.haml index 2b4297749..e250e9153 100644 --- a/app/components/procedure/card/sva_svr_component/sva_svr_component.html.haml +++ b/app/components/procedure/card/sva_svr_component/sva_svr_component.html.haml @@ -4,7 +4,7 @@ - if @procedure.sva_svr_enabled? %p.fr-badge.fr-badge--success= t('.ready') - else - %p.fr-badge.fr-badge--info= t('.needs_configuration') + %p.fr-badge= t('.disabled') %h3.fr-h6.fr-mt-10v= t('.title') %p.fr-tile-subtitle= t('.subtitle') %p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit') diff --git a/app/components/procedure/sva_svr_form_component.rb b/app/components/procedure/sva_svr_form_component.rb index e39d740e6..f357a90ce 100644 --- a/app/components/procedure/sva_svr_form_component.rb +++ b/app/components/procedure/sva_svr_form_component.rb @@ -10,6 +10,7 @@ class Procedure::SVASVRFormComponent < ApplicationComponent def form_disabled? return false if procedure.brouillon? + return true if !procedure.feature_enabled?(:sva) procedure.sva_svr_enabled? end diff --git a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml index fbd8287ba..121f939f8 100644 --- a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml +++ b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml @@ -1,5 +1,12 @@ = form_for [procedure, configuration], url: admin_procedure_sva_svr_path(procedure), method: :put do |f| - - if procedure.publiee? && !procedure.sva_svr_enabled? + - if !procedure.feature_enabled?(:sva) + .fr-alert.fr-alert--info.fr-alert--sm.fr-my-8w + %p + Pour activer le paramétrage de cette fonctionnalité, contactez-nous sur + = link_to CONTACT_EMAIL, "mailto:#{CONTACT_EMAIL}", **helpers.external_link_attributes + en indiquant votre numéro de démarche (#{@procedure.id}) et le cadre d’application du SVA/SVR. + + - elsif procedure.publiee? && !procedure.sva_svr_enabled? .fr-alert.fr-alert--info.fr-alert--sm.fr-mb-4w %p= t('.notice_new_files_only') diff --git a/app/views/administrateurs/procedures/show.html.haml b/app/views/administrateurs/procedures/show.html.haml index 16ef212bf..2bd30c89c 100644 --- a/app/views/administrateurs/procedures/show.html.haml +++ b/app/views/administrateurs/procedures/show.html.haml @@ -85,7 +85,7 @@ = render Procedure::Card::AnnotationsComponent.new(procedure: @procedure) = render Procedure::Card::APIEntrepriseComponent.new(procedure: @procedure) = render Procedure::Card::APIParticulierComponent.new(procedure: @procedure) - = render Procedure::Card::SVASVRComponent.new(procedure: @procedure) if @procedure.sva_svr_enabled? || @procedure.feature_enabled?(:sva) + = render Procedure::Card::SVASVRComponent.new(procedure: @procedure) = render Procedure::Card::MonAvisComponent.new(procedure: @procedure) = render Procedure::Card::DossierSubmittedMessageComponent.new(procedure: @procedure) = render Procedure::Card::ChorusComponent.new(procedure: @procedure)