diff --git a/app/components/bulk_upload_error_row_component.html.erb b/app/components/bulk_upload_error_row_component.html.erb index 7c3cfcc17..8cfdb674e 100644 --- a/app/components/bulk_upload_error_row_component.html.erb +++ b/app/components/bulk_upload_error_row_component.html.erb @@ -38,7 +38,7 @@ <% if potential_errors.any? %>

Confirmation needed

-

The following groups of cells might have conflicting data. Check the answers and fix any incorrect data.

If the answers are correct, fix the critical errors and upload the file again. You'll need to confirm that the following data is correct when the file only contains data that needs confirmation.

+

Potential data discrepancies exist in the following cells.

Please resolve all critical errors and review the cells with data discrepancies before re-uploading the file. Bulk confirmation of potential discrepancies is accessible only after all critical errors have been resolved.

<%= govuk_table(html_attributes: { class: "no-bottom-border" }) do |table| %> <%= table.with_head do |head| %> <% head.with_row do |row| %> diff --git a/app/mailers/bulk_upload_mailer.rb b/app/mailers/bulk_upload_mailer.rb index e38f7f745..3029a7998 100644 --- a/app/mailers/bulk_upload_mailer.rb +++ b/app/mailers/bulk_upload_mailer.rb @@ -29,7 +29,7 @@ class BulkUploadMailer < NotifyMailer def send_check_soft_validations_mail(bulk_upload:) title = "Check your file data" - description = "Some of your #{bulk_upload.year_combo} #{bulk_upload.log_type} data might not be right. Click the link below to review the data that needs confirmation, and check your file to see if the data is correct." + description = "We’ve identified potential discrepancies in your #{bulk_upload.year_combo} #{bulk_upload.log_type} data. Please review the flagged information via the link below and cross-reference it with your records to confirm data accuracy." cta_link = if bulk_upload.lettings? bulk_upload_lettings_soft_validations_check_url(bulk_upload, page: "confirm-soft-errors") else diff --git a/app/models/bulk_upload_error.rb b/app/models/bulk_upload_error.rb index 154fca2fc..85c362e7c 100644 --- a/app/models/bulk_upload_error.rb +++ b/app/models/bulk_upload_error.rb @@ -6,6 +6,7 @@ class BulkUploadError < ApplicationRecord scope :order_by_col, -> { order(Arel.sql("LPAD(col, 10, '0')")) } scope :important, -> { where(category: "setup") } scope :potential, -> { where(category: "soft_validation") } + scope :not_potential, -> { where.not(category: "soft_validation").or(where(category: nil)) } scope :critical, -> { where(category: nil).or(where.not(category: %w[setup soft_validation])) } scope :critical_or_important, -> { critical.or(important) } end diff --git a/app/views/bulk_upload_lettings_results/show.html.erb b/app/views/bulk_upload_lettings_results/show.html.erb index 8aba5eaf7..5eedefe49 100644 --- a/app/views/bulk_upload_lettings_results/show.html.erb +++ b/app/views/bulk_upload_lettings_results/show.html.erb @@ -7,7 +7,8 @@
Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>) -

We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> in your file

+ <% error_word = @bulk_upload.bulk_upload_errors.not_potential.any? ? "error" : "discrepancy" %> +

We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, error_word) %> in your file

Here’s a list of everything that you need to fix your spreadsheet. You can download the <%= govuk_link_to "specification", Forms::BulkUploadForm::PrepareYourFile.new(year: @bulk_upload.year, log_type: "lettings").specification_path, target: "_blank" %> to help you fix the cells in your CSV file. diff --git a/app/views/bulk_upload_sales_results/show.html.erb b/app/views/bulk_upload_sales_results/show.html.erb index f455ad849..2276285fe 100644 --- a/app/views/bulk_upload_sales_results/show.html.erb +++ b/app/views/bulk_upload_sales_results/show.html.erb @@ -7,7 +7,8 @@
Upload sales logs in bulk (<%= @bulk_upload.year_combo %>) -

We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> in your file

+ <% error_word = @bulk_upload.bulk_upload_errors.not_potential.any? ? "error" : "discrepancy" %> +

We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, error_word) %> in your file

Here’s a list of everything that you need to fix your spreadsheet. You can download the <%= govuk_link_to "specification", Forms::BulkUploadForm::PrepareYourFile.new(year: @bulk_upload.year, log_type: "sales").specification_path, target: "_blank" %> to help you fix the cells in your CSV file.