feat: Export contact improvements (#8895)
This pull request enhances the export contacts feature by adding a confirmation step before exporting. Previously, clicking the export button would trigger the export action without confirmation. Additionally, it ensures that only the intended recipient receives the export email, addressing the previous behaviour where all administrators received it. Fixes: #8504 Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -60,12 +60,13 @@ class AdministratorNotifications::ChannelNotificationsMailer < ApplicationMailer
|
||||
send_mail_with_liquid(to: admin_emails, subject: subject) and return
|
||||
end
|
||||
|
||||
def contact_export_complete(file_url)
|
||||
def contact_export_complete(file_url, email_to)
|
||||
return unless smtp_config_set_or_development?
|
||||
|
||||
@action_url = file_url
|
||||
subject = "Your contact's export file is available to download."
|
||||
send_mail_with_liquid(to: admin_emails, subject: subject) and return
|
||||
|
||||
send_mail_with_liquid(to: email_to, subject: subject) and return
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user