% content_for :title, "Records audit" %>
Records audit, <%= fmt_date(@audit.performed_at.to_date) %>
By <%= @audit.performed_by&.display_name %> ยท <%= @audit.passed ? "Passed" : "Items not passed" %>
<% @audit.results.each do |r| %>
- <%= r["passed"] ? "Pass" : "Fail" %>
<%= r["title"] %><%= tag.span(" (checked by the app)", class: "text-xs text-slate-500") if r["auto"] %>
<% if r["detail"].present? %><%= r["detail"] %><% end %>
<% end %>
<% if @audit.notes.present? %><%= @audit.notes %>
<% end %>
<%= link_to "All audits", admin_audits_path, class: "link" %>