Skip to content

Commit

Permalink
Ajoute un email spécifique pour la sandbox DGFIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jbfeldis committed Dec 13, 2024
1 parent 8a585cc commit 2e9c796
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<%= render partial: 'mailer/shared/applicant/header', locals: { entity_name: @authorization_request.applicant.full_name } %>

<%=
t(
'.description',
authorization_request_id: @authorization_request.id,
authorization_request_name: @authorization_request.name,
authorization_request_url: authorization_request_url(@authorization_request),
authorization_request_next_stage_url: next_authorization_request_stage_url(@authorization_request)
)
%>

<%= render partial: 'mailer/shared/applicant/footer', locals: { authorization_definition_name: @authorization_request.definition.name } %>
8 changes: 8 additions & 0 deletions config/locales/mailer.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ fr:
text: L'équipe DataPass

authorization_request_mailer:
api_impot_particulier_sandbox:
approve:
description: |
Votre habilitation "%{authorization_request_name}" (numéro %{authorization_request_id}) a été validée par nos équipes.
Vous pouvez consulter votre habilitation en suivant le lien suivant: %{authorization_request_url}
Vous pouvez dès à présent poursuivre votre demande pour demander l’accès en production via ce lien : %{authorization_request_next_stage_url}
approve:
subject: Votre habilitation numéro %{authorization_request_id} vient d'être validée
description: |
Expand Down
6 changes: 6 additions & 0 deletions spec/mailers/previews/authorization_request_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class AuthorizationRequestPreview < ActionMailer::Preview
end
end

def approve_dgfip_sandbox
AuthorizationRequestMailer.with(
authorization_request: AuthorizationRequest::APIImpotParticulierSandbox.where(state: :validated).first
).approve
end

private

def authorization_request_mailer_method(state, mth)
Expand Down

0 comments on commit 2e9c796

Please sign in to comment.