diff --git a/app/views/logs/index.html.erb b/app/views/logs/index.html.erb index 234d60ccf..7fa3578c7 100644 --- a/app/views/logs/index.html.erb +++ b/app/views/logs/index.html.erb @@ -21,6 +21,24 @@ <%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Sales logs", sub: nil } : { main: "Sales logs", sub: current_user.organisation.name } %> <% end %> +<% if @bulk_upload %> +
+
+
+

+ The following logs are from your recent bulk upload. They have some incorrect or incomplete data. You’ll need to answer a few more questions for each one to mark them as complete. +

+ +

+ Bulk Upload details:
+ <%= @bulk_upload.filename %>
+ Uploaded on <%= @bulk_upload.created_at.to_fs(:govuk_date_and_time) %>
+

+
+
+
+<% end %> +
<% unless @bulk_upload %>
diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index 56b26ca8e..ac3df8a9a 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -427,6 +427,17 @@ RSpec.describe LettingsLogsController, type: :request do get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}" expect(page).not_to have_content("Create a new lettings log") end + + it "displays card with help info" do + get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}" + expect(page).to have_content("The following logs are from your recent bulk upload") + end + + it "displays meta info about the bulk upload" do + get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}" + expect(page).to have_content(bulk_upload.filename) + expect(page).to have_content(bulk_upload.created_at.to_fs(:govuk_date_and_time)) + end end context "with bulk upload that belongs to another user" do @@ -458,6 +469,11 @@ RSpec.describe LettingsLogsController, type: :request do get "/lettings-logs" expect(page).to have_content("Create a new lettings log") end + + it "does not display card with help info" do + get "/lettings-logs" + expect(page).not_to have_content("The following logs are from your recent bulk upload") + end end end end