From 39edea5541f5447f654a52491552c5d55e2f7ae5 Mon Sep 17 00:00:00 2001 From: Kara Diaby Date: Thu, 5 May 2022 15:16:22 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Ajoute=20dans=20l'interface=20usager=20le?= =?UTF-8?q?=20contact=20du=20service=20de=20la=20d=C3=A9marche=20en=20cas?= =?UTF-8?q?=20de=20cloture=20ou=20suppression?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/dossiers/_procedure_removed_banner.html.haml | 4 ++++ config/locales/views/users/header/en.yml | 6 ++++++ config/locales/views/users/header/fr.yml | 1 + 3 files changed, 11 insertions(+) diff --git a/app/views/users/dossiers/_procedure_removed_banner.html.haml b/app/views/users/dossiers/_procedure_removed_banner.html.haml index db410b2b7..5bd763c47 100644 --- a/app/views/users/dossiers/_procedure_removed_banner.html.haml +++ b/app/views/users/dossiers/_procedure_removed_banner.html.haml @@ -12,6 +12,8 @@ - else %p = t('users.dossiers.header.banner.procedure_deleted_dossier_en_cours_content') + %p + = t('users.dossiers.header.banner.contact_service', service_name: dossier.procedure.service.nom, service_phone_number: dossier.procedure.service.telephone, service_email: dossier.procedure.service.email) - else .flex.justify-between @@ -19,4 +21,6 @@ = render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier }) if !dossier.brouillon? %p = t('users.dossiers.header.banner.procedure_close_content') + %p + = t('users.dossiers.header.banner.contact_service', service_name: dossier.procedure.service.nom, service_phone_number: dossier.procedure.service.telephone, service_email: dossier.procedure.service.email) diff --git a/config/locales/views/users/header/en.yml b/config/locales/views/users/header/en.yml index 37a23c3ab..5ce633d11 100644 --- a/config/locales/views/users/header/en.yml +++ b/config/locales/views/users/header/en.yml @@ -4,6 +4,12 @@ en: header: banner: title: Your file will expire + procedure_deleted_title: The procedure linked to your file is deleted + procedure_close_title: The procedure linked to your file is closed + procedure_deleted_dossier_en_cours_content: You can still consult your file, but it is no longer possible to modify it + procedure_deleted_dossier_termine_content: Your file has been processed by the administration, no action is possible + procedure_close_content: You can still consult your file, but it will not be processed by the administration + contact_service: For more information, please contact the service %{service_name}, available at %{service_phone_number} or by email %{service_email} states: brouillon: Your file is still in draft and will soon expire. So it will be deleted soon without being instructed. If you want to pursue your procedure you can submit it now. Otherwise you are able to delay its expiration by clicking on the underneath button. en_construction: Your file is pending for instruction. The maximum delay is 6 months, but you can extend the duration by a month by clicking on the underneath button. diff --git a/config/locales/views/users/header/fr.yml b/config/locales/views/users/header/fr.yml index 1ebab82d7..95887244b 100644 --- a/config/locales/views/users/header/fr.yml +++ b/config/locales/views/users/header/fr.yml @@ -8,6 +8,7 @@ fr: procedure_deleted_dossier_en_cours_content: "Vous pouvez toujours consulter votre dossier, mais il n’est plus possible de le modifier." procedure_deleted_dossier_termine_content: "Votre dossier a été traité par l'administration, aucune action n'est possible" procedure_close_content: "Vous pouvez toujours consulter votre dossier, mais il ne sera pas traité par l'administration" + contact_service: Pour plus d'informations, veuillez vous rapprocher du service %{service_name}, disponible au %{service_phone_number} ou par email %{service_email} title: Votre dossier va expirer states: brouillon: Votre dossier est en brouillon, mais va bientôt expirer. Cela signifie qu’il va bientôt être supprimé sans avoir été déposé. Si vous souhaitez le conserver afin de poursuivre la démarche, vous pouvez le conserver un mois de plus en cliquant sur le bouton ci-dessous. From 5f6f19871f33ef624d9e5e26376560ba568c3e32 Mon Sep 17 00:00:00 2001 From: Kara Diaby Date: Thu, 5 May 2022 15:31:13 +0200 Subject: [PATCH 2/2] tests --- app/controllers/users/commencer_controller.rb | 2 +- config/locales/en.yml | 2 +- config/locales/fr.yml | 2 +- spec/views/users/dossiers/show/_header.html.haml_spec.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/users/commencer_controller.rb b/app/controllers/users/commencer_controller.rb index 93893dedd..276abfe8e 100644 --- a/app/controllers/users/commencer_controller.rb +++ b/app/controllers/users/commencer_controller.rb @@ -70,7 +70,7 @@ module Users procedure = Procedure.find_by(path: params[:path]) if procedure&.close? - flash.alert = t('errors.messages.procedure_archived') + flash.alert = t('errors.messages.procedure_archived', service_name: procedure.service.nom, service_phone_number: procedure.service.telephone, service_email: procedure.service.email) else flash.alert = t('errors.messages.procedure_not_found') end diff --git a/config/locales/en.yml b/config/locales/en.yml index f6c355c28..0e875669a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -359,7 +359,7 @@ en: # # etablissement_fail: 'Désolé, nous n’avons pas réussi à enregistrer l’établissement correspondant à ce numéro SIRET' france_connect: connexion: "Error trying to connect to France Connect." - procedure_archived: "This procedure has been closed, it is no longer possible to submit a file." + procedure_archived: This procedure has been closed, it is no longer possible to submit a file. For more information, please contact the service %{service_name}, available at %{service_phone_number} or by email %{service_email} # # procedure_not_draft: "This procedure is not a draft anymore." # cadastres_empty: # one: "Aucune parcelle cadastrale sur la zone sélectionnée" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index d01aa509c..d0bf22ea4 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -364,7 +364,7 @@ fr: france_connect: connexion: "Erreur lors de la connexion à France Connect." forbidden_html: "Seul-e-s les usagers peuvent se connecter via France Connect. En tant qu’instructeur ou administrateur, nous vous invitons à réininitialiser votre mot de passe." - procedure_archived: "Cette démarche en ligne a été close, il n’est plus possible de déposer de dossier." + procedure_archived: Cette démarche en ligne a été close, il n’est plus possible de déposer de dossier. Pour plus d'informations veuillez contacter le service %{service_name} au %{service_phone_number} ou par email à %{service_email} empty_repetition: '« %{value} » doit comporter au moins un champ répétable' empty_drop_down: '« %{value} » doit comporter au moins un choix sélectionnable' # procedure_not_draft: "Cette démarche n’est maintenant plus en brouillon." diff --git a/spec/views/users/dossiers/show/_header.html.haml_spec.rb b/spec/views/users/dossiers/show/_header.html.haml_spec.rb index 3d75535cf..5d6550269 100644 --- a/spec/views/users/dossiers/show/_header.html.haml_spec.rb +++ b/spec/views/users/dossiers/show/_header.html.haml_spec.rb @@ -32,7 +32,7 @@ describe 'users/dossiers/show/header.html.haml', type: :view do end context "when the procedure is discarded with a dossier en construction" do - let(:procedure) { create(:procedure, :discarded) } + let(:procedure) { create(:procedure, :with_service, :discarded) } let(:dossier) { create(:dossier, :en_construction, procedure: procedure) } it 'affiche que la démarche est supprimée' do @@ -46,7 +46,7 @@ describe 'users/dossiers/show/header.html.haml', type: :view do end context "when the procedure is discarded with a dossier terminé" do - let(:procedure) { create(:procedure, :discarded) } + let(:procedure) { create(:procedure, :with_service, :discarded) } let(:dossier) { create(:dossier, :accepte, procedure: procedure) } it 'affiche que la démarche est supprimée' do