Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.7 KiB

<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| %>
<% row.cell header: true, text: "Type of logs" %>
<% row.cell header: true, text: "Log IDs" %>
<% row.cell header: true %>
<% end %>
<% end %>
<%= table.body do |body| %>
<% @duplicates[:lettings].each do |duplicate_set| %>
<% body.row do |row| %>
<% row.cell text: "Lettings" %>
<% row.cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %>
<% row.cell do %>
<%= govuk_link_to "Review logs", lettings_log_duplicate_logs_path(duplicate_set.first, original_log_id: duplicate_set.first, referrer: params[:referrer], organisation_id: params[:organisation_id]) %>
<% end %>
<% end %>
<% end %>
<% @duplicates[:sales].each do |duplicate_set| %>
<% body.row do |row| %>
<% row.cell text: "Sales" %>
<% row.cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %>
<% row.cell do %>
<%= govuk_link_to "Review logs", sales_log_duplicate_logs_path(duplicate_set.first, original_log_id: duplicate_set.first, referrer: params[:referrer], organisation_id: params[:organisation_id]) %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>