Merge pull request #8577 from demarches-simplifiees/add-services-public-plus-in-emails

ETQ usager, je peux donner mon avis sur "services publics +" depuis un mail reçu une fois mon dossier traité
This commit is contained in:
Colin Darie 2023-02-09 10:59:32 +01:00 committed by GitHub
commit 4b480de9b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -9,6 +9,7 @@ class NotificationMailer < ApplicationMailer
include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::SanitizeHelper
before_action :set_dossier before_action :set_dossier
before_action :set_services_publics_plus, only: :send_notification
after_action :create_commentaire_for_notification after_action :create_commentaire_for_notification
helper ServiceHelper helper ServiceHelper
@ -50,6 +51,12 @@ class NotificationMailer < ApplicationMailer
private private
def set_services_publics_plus
return unless Dossier::TERMINE.include?(params[:state])
@services_publics_plus_url = ENV['SERVICES_PUBLICS_PLUS_URL'].presence
end
def set_dossier def set_dossier
@dossier = params[:dossier] @dossier = params[:dossier]

View file

@ -0,0 +1,16 @@
= vertical_margin(20)
%div{ style: 'background-color: #F5F5FE; padding: 20px;' }
%table{ width: "100%", border: "0", cellspacing: "0", cellpadding: "0" }
%tr
%td{ width: "70%", valign: "top", align: "center" }
%p{ style: 'margin: 0' }
Jaide les services publics à saméliorer :
%br
= link_to 'Je donne mon avis avec Services Publics +', @services_publics_plus_url, target: '_blank', rel: 'noopener noreferrer'
%td{ width: "30%" }
= link_to @services_publics_plus_url, target: '_blank', rel: 'noopener noreferrer' do
= image_tag('mailer/logo-services-plus.png', height: 39, width: 121, style: 'display:block; vertical-align: middle', alt: "Services Publics +")
= vertical_margin(20)

View file

@ -6,5 +6,8 @@
- if @actions.present? - if @actions.present?
= render 'notification_mailer/actions', actions: @actions, dossier: @dossier = render 'notification_mailer/actions', actions: @actions, dossier: @dossier
- if @services_publics_plus_url.present?
= render 'layouts/mailers/services_publics_plus'
- content_for :footer do - content_for :footer do
= render 'layouts/mailers/service_footer', service: @service, dossier: @dossier = render 'layouts/mailers/service_footer', service: @service, dossier: @dossier

View file

@ -163,3 +163,6 @@ DOLIST_LOGIN_URL="https://clientpreprod.dolist.net"
SUPPORT_WEBHOOK_URL="" SUPPORT_WEBHOOK_URL=""
# rappel web de sendinblue # rappel web de sendinblue
SIB_WEBHOOK_URL="" SIB_WEBHOOK_URL=""
# ServicesPublics+ tracking url shown to user when dossier is terminated.
SERVICES_PUBLICS_PLUS_URL=""