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.
 
 
 
 

45 lines
1.7 KiB

<% item_label = format_label(@pagy.count, "log") %>
<% title = "Update logs" %>
<% content_for :title, title %>
<% if @total_count < 1 %>
<%= render partial: "organisations/headings", locals: { main: "There are no more logs that need updating", sub: "" } %>
<p class="govuk-body">
You’ve completed all the logs that were affected by scheme changes.
</p>
<div>
<%= govuk_button_link_to "Back to all logs", lettings_logs_path %>
</div>
<% else %>
<%= render partial: "organisations/headings", locals: { main: "You need to update #{@total_count} logs", sub: "" } %>
<%= govuk_table do |table| %>
<%= table.with_head do |head| %>
<% head.with_row do |row| %>
<% row.with_cell(header: true, text: "Log ID") %>
<% row.with_cell(header: true, text: "Tenancy code") %>
<% row.with_cell(header: true, text: "Property reference") %>
<% row.with_cell(header: true, text: "Status") %>
<% row.with_cell(header: true, text: "") %>
<% end %>
<% end %>
<% @logs.each do |log| %>
<%= table.with_body do |body| %>
<% body.with_row do |row| %>
<% row.with_cell(text: log.id) %>
<% row.with_cell(text: log.tenancycode) %>
<% row.with_cell(text: log.propcode) %>
<% row.with_cell(text: status_tag(log.status)) %>
<% row.with_cell(html_attributes: {
scope: "row",
class: "govuk-!-text-align-right",
}) do %>
<%= govuk_link_to "Update now", send(log.form.unresolved_log_path, log) %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<%= render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "logs" } %>