From ea3267c0d72aaed9fc40212c295648f8fd6e32d8 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 17 Sep 2018 15:21:47 +0200 Subject: [PATCH 1/5] dossier: don't display 'brouillon' in the timeline if not required Unless the user is actually editing a brouillon, we don't need to show this state. --- app/views/new_user/dossiers/show/_status_overview.html.haml | 5 +++-- .../dossiers/show/_status_overview.html.haml_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/new_user/dossiers/show/_status_overview.html.haml b/app/views/new_user/dossiers/show/_status_overview.html.haml index 2db5da04c..59b119671 100644 --- a/app/views/new_user/dossiers/show/_status_overview.html.haml +++ b/app/views/new_user/dossiers/show/_status_overview.html.haml @@ -1,8 +1,9 @@ .status-overview - if !dossier.termine? %ul.status-timeline - %li.brouillon{ class: dossier.brouillon? ? 'active' : nil } - brouillon + - if dossier.brouillon? + %li.brouillon{ class: dossier.brouillon? ? 'active' : nil } + brouillon %li.en-construction{ class: dossier.en_construction? ? 'active' : nil } en construction %li.en-instruction{ class: dossier.en_instruction? ? 'active' : nil } diff --git a/spec/views/new_user/dossiers/show/_status_overview.html.haml_spec.rb b/spec/views/new_user/dossiers/show/_status_overview.html.haml_spec.rb index d98eecc4f..9aabaf058 100644 --- a/spec/views/new_user/dossiers/show/_status_overview.html.haml_spec.rb +++ b/spec/views/new_user/dossiers/show/_status_overview.html.haml_spec.rb @@ -39,7 +39,7 @@ describe 'new_user/dossiers/show/_status_overview.html.haml', type: :view do let(:dossier) { create :dossier, :en_construction } it 'renders the timeline (without the final states)' do - expect(rendered).to have_timeline_item('.brouillon').inactive + expect(rendered).not_to have_timeline_item('.brouillon') expect(rendered).to have_timeline_item('.en-construction').active expect(rendered).to have_timeline_item('.en-instruction').inactive expect(rendered).to have_timeline_item('.termine').inactive @@ -52,7 +52,7 @@ describe 'new_user/dossiers/show/_status_overview.html.haml', type: :view do let(:dossier) { create :dossier, :en_instruction } it 'renders the timeline (without the final states)' do - expect(rendered).to have_timeline_item('.brouillon').inactive + expect(rendered).not_to have_timeline_item('.brouillon') expect(rendered).to have_timeline_item('.en-construction').inactive expect(rendered).to have_timeline_item('.en-instruction').active expect(rendered).to have_timeline_item('.termine').inactive From 4a5218ffe906e866d9ad26ad18c1b302253a685c Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 17 Sep 2018 15:22:02 +0200 Subject: [PATCH 2/5] dossier: improve wording for 'en construction' --- .../new_user/dossiers/show/_status_overview.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/new_user/dossiers/show/_status_overview.html.haml b/app/views/new_user/dossiers/show/_status_overview.html.haml index 59b119671..610c7eca3 100644 --- a/app/views/new_user/dossiers/show/_status_overview.html.haml +++ b/app/views/new_user/dossiers/show/_status_overview.html.haml @@ -19,8 +19,12 @@ - elsif dossier.en_construction? .en-construction - %p Un accompagnant de l’administration est en train de vérifier que votre dossier est bien complet. - %p Si des modifications sont nécessaires, vous recevrez un email avec les modifications à effectuer. Et sinon, dès que votre dossier sera complet, il passera automatiquement en instruction. + %p Un instructeur de l’administration est en train de vérifier que votre dossier est bien complet. Si des modifications sont nécessaires, vous recevrez un message avec les modifications à effectuer. + + %p + Sinon, + = succeed '.' do + %strong votre dossier passera directement en instruction - elsif dossier.en_instruction? .en-instruction From a820f2118aa3c7454ccb06393fb432d1e777b752 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 17 Sep 2018 15:22:10 +0200 Subject: [PATCH 3/5] dossier: improve wording for 'en instruction' --- .../new_user/dossiers/show/_status_overview.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/new_user/dossiers/show/_status_overview.html.haml b/app/views/new_user/dossiers/show/_status_overview.html.haml index 610c7eca3..d6e1fd3db 100644 --- a/app/views/new_user/dossiers/show/_status_overview.html.haml +++ b/app/views/new_user/dossiers/show/_status_overview.html.haml @@ -28,8 +28,12 @@ - elsif dossier.en_instruction? .en-instruction - %p Votre dossier est complet. Il est en cours d’examen par les agent·e·s de l’administration. - %p Dès que l’administration aura statué sur votre dossier, vous recevrez un email avec le résultat. + %p Votre dossier est complet. Il est en cours d’examen par les instructeur de l’administration. + %p + Dès que l’administration aura statué sur votre dossier, + %strong + vous recevrez un email + avec le résultat. - elsif dossier.accepte? .accepte From b5368ea72b65fe3fc62732349c29f406e457655c Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 18 Sep 2018 10:33:37 +0200 Subject: [PATCH 4/5] Fix the 2018_09_12_fix_templates task --- lib/tasks/2018_09_12_fix_templates.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/2018_09_12_fix_templates.rake b/lib/tasks/2018_09_12_fix_templates.rake index 4d29f4035..127617f33 100644 --- a/lib/tasks/2018_09_12_fix_templates.rake +++ b/lib/tasks/2018_09_12_fix_templates.rake @@ -2,7 +2,7 @@ namespace :'2018_09_12_fix_templates' do task run: :environment do dossiers_with_invalid_attestations = find_dossiers_with_sent_and_invalid_attestations fix_templates - fixed_attestations = regenerate_attestations(dossiers_with_invalid_attestations) + fixed_attestations = delete_then_regenerate_attestations(dossiers_with_invalid_attestations) send_regenerated_attestations(dossiers_with_invalid_attestations) end From f696560a14dd4abe8ba81ed0c25d0fd6028895c9 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 18 Sep 2018 10:39:47 +0200 Subject: [PATCH 5/5] =?UTF-8?q?Affichage=20du=20service=20dans=20la=20list?= =?UTF-8?q?e=20des=20d=C3=A9marches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stylesheets/new_design/demarches_index.scss | 4 ++++ app/controllers/new_user/demarches_controller.rb | 1 + app/views/new_user/demarches/index.html.haml | 12 ++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/new_design/demarches_index.scss b/app/assets/stylesheets/new_design/demarches_index.scss index e14441051..808095ee2 100644 --- a/app/assets/stylesheets/new_design/demarches_index.scss +++ b/app/assets/stylesheets/new_design/demarches_index.scss @@ -30,3 +30,7 @@ background-color: $lighter-blue; } } + +.service-name { + color: $grey; +} diff --git a/app/controllers/new_user/demarches_controller.rb b/app/controllers/new_user/demarches_controller.rb index 56c984dd6..9d788ad39 100644 --- a/app/controllers/new_user/demarches_controller.rb +++ b/app/controllers/new_user/demarches_controller.rb @@ -9,6 +9,7 @@ module NewUser .select { |p| p.publiee? } @popular_demarches = Procedure + .includes(:service) .select("procedures.*, COUNT(*) AS procedures_count") .joins(:dossiers) .publiees diff --git a/app/views/new_user/demarches/index.html.haml b/app/views/new_user/demarches/index.html.haml index c7ccaef2c..334471b7b 100644 --- a/app/views/new_user/demarches/index.html.haml +++ b/app/views/new_user/demarches/index.html.haml @@ -12,14 +12,22 @@ %ul.demarche-links - @previous_demarches_still_active.each do |demarche| %li - = link_to(demarche.libelle, commencer_url(procedure_path: demarche.path), class: "demarche-link") + = link_to(commencer_url(procedure_path: demarche.path), class: "demarche-link") do + = demarche.libelle + %br + .service-name + = demarche&.service&.nom - if @popular_demarches.present? %h2.list-header LES PLUS POPULAIRES %ul.demarche-links - @popular_demarches.each do |demarche| %li - = link_to(demarche.libelle, commencer_url(procedure_path: demarche.path), class: "demarche-link") + = link_to(commencer_url(procedure_path: demarche.path), class: "demarche-link") do + = demarche.libelle + %br + .service-name + = demarche&.service&.nom %h2.list-header TOUTES LES DÉMARCHES = link_to("Voir l'intégralité des démarches disponibles", LISTE_DES_DEMARCHES_URL, class: "button")