diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index 276c48911..9b0d94493 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -92,7 +92,7 @@ class NotificationMailer < ApplicationMailer def set_jdma return unless params[:state] == Dossier.states.fetch(:en_construction) - @jdma_html = @dossier.procedure.monavis_embed.presence + @jdma_html = @dossier.procedure.monavis_embed_html_source("email").presence end def set_dossier diff --git a/app/models/procedure.rb b/app/models/procedure.rb index 11cec13d8..337970e89 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -1008,6 +1008,10 @@ class Procedure < ApplicationRecord update!(closing_reason: nil, closing_details: nil, replaced_by_procedure_id: nil, closing_notification_brouillon: false, closing_notification_en_cours: false) end + def monavis_embed_html_source(source) + monavis_embed.gsub('nd_source=button', "nd_source=#{source}").gsub('