Recordkeeping procedures, QC audits and user instructions (AC 120-78B)

- Admin → Recordkeeping Procedures: generated procedures document
  (2.2.11 / 3.2.8) from the system setup plus owner-entered details;
  adopted as numbered, immutable revisions; included in the records package
- Admin → Records Audits: periodic QC checklist (3.2.8.5) combining app
  checks with a restore test, sampled entries vs. source documents and a
  user review; next due date on About and in admins' weekly reminder
- User instructions at /help/records, linked from the logbook and signing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-07 13:30:46 -05:00
1 parent 68a1719db2
commit 761f381679
27 files changed
+668 -10

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
<% content_for :title, "Records audit" %>
<h1 class="mb-1 text-2xl font-bold">Records audit</h1>
<p class="mb-5 text-sm text-slate-600">Work through each item; the app has checked the first ones itself.</p>
<%= form_with url: admin_audits_path, class: "space-y-5" do %>
<section class="card">
<div class="card-header"><h2 class="card-title">Checked by the app</h2></div>
<ul class="divide-y divide-slate-100 text-sm">
<% @audit.auto_items.each do |item| %>
<li class="flex items-start gap-3 px-4 py-2"><span class="<%= item.passed ? 'badge-green' : 'badge-red' %>"><%= item.passed ? "Pass" : "Fail" %></span>
<span><span class="font-medium"><%= item.title %></span><span class="block text-xs text-slate-500"><%= item.detail %></span></span></li>
<% end %>
</ul>
</section>
<% sample = @audit.sample %>
<section class="card">
<div class="card-header"><h2 class="card-title">Confirmed by you</h2></div>
<div class="space-y-4 p-4">
<% RecordsAudit::MANUAL.each do |key, title| %>
<div class="space-y-2 rounded-md p-3 ring-1 ring-slate-200">
<label class="flex items-start gap-2 text-sm font-medium"><%= check_box_tag "answers[#{key}][passed]", "1", false, class: "mt-0.5 h-4 w-4 shrink-0 rounded border-slate-300" %><span><%= title %></span></label>
<% if key == "sample" %>
<ul class="ml-6 list-disc text-xs text-slate-600">
<% sample.each do |e| %><li><%= hidden_field_tag "sample_ids[]", e.id, id: nil %><%= link_to "#{e.aircraft.tail_number} · #{e.date} · #{e.text.truncate(80)}", aircraft_logbook_entry_path(e.aircraft, e), class: "link", target: "_blank" %><%= " (signed)" if e.signature %></li><% end %>
<% if sample.empty? %><li>No entries since the last audit.</li><% end %>
</ul>
<% elsif key == "users" %>
<ul class="ml-6 list-disc text-xs text-slate-600">
<% @audit.users.each do |u| %><li><%= u.display_name %> (<%= u.email_address %>)<%= " · admin" if u.admin? %><%= " · #{u.aircraft_roles.map { "#{_1.role} #{_1.aircraft.tail_number}" }.join(', ')}" if u.aircraft_roles.any? %> · last sign-in <%= u.last_signed_in_at ? time_ago_in_words(u.last_signed_in_at) + " ago" : "never" %><%= " · DISABLED" if u.disabled? %></li><% end %>
</ul>
<% end %>
<%= text_field_tag "answers[#{key}][note]", nil, class: "input", placeholder: "Note (what was checked, or what's being done)" %>
</div>
<% end %>
<div><%= label_tag :notes, "Overall notes", class: "label" %><%= text_area_tag :notes, nil, rows: 3, class: "input" %></div>
<%= submit_tag "Record audit", class: "btn-primary" %>
</div>
</section>
<% end %>