Browse Source

Add duplicate index page content

pull/1776/head
Kat 3 years ago
parent
commit
f91e915478
  1. 4
      app/helpers/duplicate_logs_helper.rb
  2. 12
      app/views/duplicate_logs/index.html.erb

4
app/helpers/duplicate_logs_helper.rb

@ -46,4 +46,8 @@ module DuplicateLogsHelper
duplicates = user.data_provider? ? duplicates_for_user(user) : duplicates_for_organisation(organisation)
duplicates[:lettings].count + duplicates[:sales].count
end
def duplicate_list_header(duplicate_sets_count)
duplicate_sets_count > 1 ? "Review these #{duplicate_sets_count} sets of logs" : "Review this #{duplicate_sets_count} set of logs"
end
end

12
app/views/duplicate_logs/index.html.erb

@ -1,3 +1,15 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l"><%= duplicate_list_header(@duplicates[:lettings].count + @duplicates[:sales].count) %></h1>
<p class="govuk-body">
These logs are duplicates because they have the same answers for certain fields.
</p>
<p class="govuk-body">
Review each set of logs and either delete any duplicates or change any incorrect answers.
</p>
</div>
</div>
<%= govuk_table do |table| %>
<%= table.head do |head| %>
<%= head.row do |row| %>

Loading…
Cancel
Save