chore(mailer): services publics + only for Termine "states"
This commit is contained in:
parent
82ad6346cc
commit
d78c75620a
3 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,7 @@ class NotificationMailer < ApplicationMailer
|
|||
include ActionView::Helpers::SanitizeHelper
|
||||
|
||||
before_action :set_dossier
|
||||
before_action :set_services_publics_plus, only: :send_notification
|
||||
after_action :create_commentaire_for_notification
|
||||
|
||||
helper ServiceHelper
|
||||
|
@ -50,6 +51,12 @@ class NotificationMailer < ApplicationMailer
|
|||
|
||||
private
|
||||
|
||||
def set_services_publics_plus
|
||||
return unless Dossier::TERMINE.include?(params[:state])
|
||||
|
||||
@with_services_publics_plus = true
|
||||
end
|
||||
|
||||
def set_dossier
|
||||
@dossier = params[:dossier]
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
- if @actions.present?
|
||||
= render 'notification_mailer/actions', actions: @actions, dossier: @dossier
|
||||
|
||||
= render 'layouts/mailers/service_plus'
|
||||
- if @with_services_publics_plus
|
||||
= render 'layouts/mailers/services_publics_plus'
|
||||
|
||||
- content_for :footer do
|
||||
= render 'layouts/mailers/service_footer', service: @service, dossier: @dossier
|
||||
|
|
Loading…
Reference in a new issue