From a1d6d9388b0f0d3f96f0bc89c9fef83cc921a0ab Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:10:50 +0000 Subject: [PATCH] Clear filters on completed bulk upload link (#2075) --- app/mailers/bulk_upload_mailer.rb | 4 ++-- spec/mailers/bulk_upload_mailer_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/mailers/bulk_upload_mailer.rb b/app/mailers/bulk_upload_mailer.rb index 4821594a7..e0115abb0 100644 --- a/app/mailers/bulk_upload_mailer.rb +++ b/app/mailers/bulk_upload_mailer.rb @@ -50,9 +50,9 @@ class BulkUploadMailer < NotifyMailer def send_bulk_upload_complete_mail(user:, bulk_upload:) url = if bulk_upload.lettings? - lettings_logs_url("[years][]" => "", "[status][]" => "", user: :all, organisation_select: :all) + clear_filters_url(filter_type: "lettings_logs") else - sales_logs_url("[years][]" => "", "[status][]" => "", user: :all) + clear_filters_url(filter_type: "sales_logs") end n_logs = pluralize(bulk_upload.logs.count, "log") diff --git a/spec/mailers/bulk_upload_mailer_spec.rb b/spec/mailers/bulk_upload_mailer_spec.rb index 8ac076794..39bc54866 100644 --- a/spec/mailers/bulk_upload_mailer_spec.rb +++ b/spec/mailers/bulk_upload_mailer_spec.rb @@ -47,7 +47,7 @@ RSpec.describe BulkUploadMailer do log_type: "lettings", upload_timestamp: bulk_upload.created_at.to_fs(:govuk_date_and_time), success_description: "The lettings 2022/23 data you uploaded has been checked. The 0 logs you uploaded are now complete.", - logs_link: lettings_logs_url("[years][]" => "", "[status][]" => "", user: :all, organisation_select: :all), + logs_link: clear_filters_url(filter_type: "lettings_logs"), }, )