From 77bf93dfc2366fb45491cb623a20390c6203cf86 Mon Sep 17 00:00:00 2001 From: mfo Date: Mon, 1 Jul 2024 11:01:38 +0200 Subject: [PATCH] feat(experts_procedures#create): link to typo errors --- .../invitation_with_typo_component.html.haml | 2 +- .../administrateurs/experts_procedures_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/procedure/invitation_with_typo_component/invitation_with_typo_component.html.haml b/app/components/procedure/invitation_with_typo_component/invitation_with_typo_component.html.haml index 9428e20e1..63c9be415 100644 --- a/app/components/procedure/invitation_with_typo_component/invitation_with_typo_component.html.haml +++ b/app/components/procedure/invitation_with_typo_component/invitation_with_typo_component.html.haml @@ -1,7 +1,7 @@ = render Dsfr::AlertComponent.new(title: "nous pensons avoir identifié une faute de frappe : ", state: :warning, extra_class_names: 'fr-mb-3w') do |c| - c.with_body do %p= @title - %ul + %ul#maybe_typos_errors - @maybe_typos.each do |(actual_email, suggested_email)| %li = "Je confirme " diff --git a/app/controllers/administrateurs/experts_procedures_controller.rb b/app/controllers/administrateurs/experts_procedures_controller.rb index 2580bccea..454b72730 100644 --- a/app/controllers/administrateurs/experts_procedures_controller.rb +++ b/app/controllers/administrateurs/experts_procedures_controller.rb @@ -15,7 +15,7 @@ module Administrateurs .map { |email| [email, EmailChecker.check(email:)[:suggestions]&.first] } .partition { _1[1].present? } errors = if !@maybe_typos.empty? - ["Attention, nous pensons avoir identifié une faute de frappe dans les invitations : #{@maybe_typos.map(&:first).join(', ')}"] + ["Attention, nous pensons avoir identifié une faute de frappe dans les invitations : #{@maybe_typos.map(&:first).join(', ')}. Veuillez, #{view_context.link_to(" verifier l'orthographe", "#maybe_typos_errors")} des invitations."] else [] end