|
|
|
<article class="app-log-summary">
|
|
|
|
<div class="govuk-grid-row">
|
|
|
|
<div class="govuk-grid-column-one-half">
|
|
|
|
<header class="app-log-summary__header">
|
|
|
|
<h2 class="app-log-summary__title">
|
|
|
|
<%= govuk_link_to sales_log_path(log) do %>
|
|
|
|
Log <%= log.id %>
|
|
|
|
<% end %>
|
|
|
|
</h2>
|
|
|
|
<dl class="app-metadata app-metadata--inline">
|
|
|
|
<% if log.purchaser_code %>
|
|
|
|
<div class="app-metadata__item">
|
|
|
|
<dt class="app-metadata__term">Purchaser</dt>
|
|
|
|
<dd class="app-metadata__definition"><%= log.purchaser_code %></dd>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</dl>
|
|
|
|
</header>
|
|
|
|
<p class="govuk-body govuk-!-margin-bottom-2">
|
|
|
|
<% if log.ownership_scheme %>
|
|
|
|
<%= log.ownership_scheme(uppercase: true) %><br>
|
|
|
|
<% end %>
|
|
|
|
<% if log.saledate %>
|
|
|
|
Sale completed <time datetime="<%= log.saledate.iso8601 %>"><%= log.saledate.to_formatted_s(:govuk_date) %></time>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<% if current_user.support? || current_user.organisation.has_managing_agents? || current_user.organisation.has_recent_absorbed_organisations? %>
|
|
|
|
<dl class="app-metadata">
|
|
|
|
<% if log.owning_organisation %>
|
|
|
|
<div class="app-metadata__item">
|
|
|
|
<dt class="app-metadata__term">Owned by</dt>
|
|
|
|
<dd class="app-metadata__definition"><%= log.owning_organisation&.name %></dd>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% if log.managing_organisation && FeatureToggle.sales_managing_organisation_enabled? %>
|
|
|
|
<div class="app-metadata__item">
|
|
|
|
<dt class="app-metadata__term">Reported by</dt>
|
|
|
|
<dd class="app-metadata__definition"><%= log.managing_organisation&.name %></dd>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</dl>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<footer class="govuk-grid-column-one-half app-log-summary__footer">
|
|
|
|
<p class="govuk-body govuk-!-margin-bottom-2">
|
|
|
|
<%= log_status %>
|
|
|
|
</p>
|
|
|
|
<p class="govuk-body">
|
|
|
|
Created <time datetime="<%= log.created_at.iso8601 %>"><%= log.created_at.to_formatted_s(:govuk_date) %></time>
|
|
|
|
<% if log.created_by %>
|
|
|
|
<span class="app-log-summary__footer--actor">Assigned to <%= log.created_by.name || log.created_by.email %></span>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</article>
|