Browse Source

Clear filters on completed bulk upload link (#2075)

pull/2031/head^2
kosiakkatrina 1 year ago committed by GitHub
parent
commit
a1d6d9388b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/mailers/bulk_upload_mailer.rb
  2. 2
      spec/mailers/bulk_upload_mailer_spec.rb

4
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")

2
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"),
},
)

Loading…
Cancel
Save