mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
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:
1 parent
68a1719db2
commit
761f381679
27 files changed
+668
-10
No files matched your search
@@ -0,0 +1,51 @@
|
||||
<% content_for :title, "Recordkeeping procedures" %>
|
||||
<h1 class="mb-1 text-2xl font-bold">Recordkeeping procedures</h1>
|
||||
<p class="mb-5 max-w-3xl text-sm text-slate-600">The standalone procedures document AC 120-78B asks for (paragraphs 2.2.11 and 3.2.8): how signatures and records work here, who's responsible, who may sign, backups, audits, and how records are produced and transferred. It's generated from the system's setup; fill in what the app can't know, review the draft, and adopt it as a revision. Adopt a new revision whenever users, hosting or procedures change.</p>
|
||||
|
||||
<div class="grid gap-5 lg:grid-cols-2">
|
||||
<%= form_with model: @policy, url: admin_procedures_path, method: :patch, class: "card card-body space-y-4" do |f| %>
|
||||
<h2 class="card-title">Details</h2>
|
||||
<%= f.errors_summary %>
|
||||
<%= f.field :operator_name, label: "Owner / operator", placeholder: "Jane Pilot" %>
|
||||
<div class="grid gap-4 sm:grid-cols-2">
|
||||
<%= f.field :responsible_name, label: "Responsible person", placeholder: "Jane Pilot" %>
|
||||
<%= f.field :responsible_title, label: "Their role", placeholder: "Owner" %>
|
||||
</div>
|
||||
<%= f.field :hosting_description, as: :textarea, rows: 2, label: "Hosting and network",
|
||||
placeholder: "Self-hosted on a server at the owner's home, behind a firewall and an authenticating proxy." %>
|
||||
<%= f.field :offsite_backup_description, as: :textarea, rows: 2, label: "Off-site backup",
|
||||
placeholder: "The storage volume is backed up nightly with restic to an encrypted off-site repository; retention 30 days." %>
|
||||
<div class="grid gap-4 sm:grid-cols-2">
|
||||
<%= f.field :audit_interval_months, as: :number, min: 1, max: 24, label: "Audit every (months)" %>
|
||||
<%= f.field :audit_sample_size, as: :number, min: 1, max: 50, label: "Entries sampled per audit" %>
|
||||
</div>
|
||||
<%= f.field :additional_procedures, as: :textarea, rows: 3, label: "Additional procedures (optional)" %>
|
||||
<%= f.submit "Save" %>
|
||||
<% end %>
|
||||
|
||||
<div class="space-y-5">
|
||||
<section class="card card-body space-y-3">
|
||||
<h2 class="card-title">Current revision</h2>
|
||||
<% current = @revisions.first %>
|
||||
<% if current %>
|
||||
<p class="text-sm">Revision <strong><%= current.number %></strong>, adopted <%= current.adopted_at.to_date %> by <%= current.adopted_by&.display_name %>. <%= link_to "View / print", revision_admin_procedures_path(current), class: "link", target: "_blank" %></p>
|
||||
<% else %>
|
||||
<p class="text-sm text-amber-800">No revision adopted yet.</p>
|
||||
<% end %>
|
||||
<p class="text-sm"><%= link_to "Preview the draft", draft_admin_procedures_path, class: "link", target: "_blank" %> (generated from the current setup).</p>
|
||||
<%= form_with url: adopt_admin_procedures_path, class: "flex flex-wrap items-end gap-2" do %>
|
||||
<div class="min-w-0 flex-1"><%= label_tag :summary, "What changed", class: "label" %><%= text_field_tag :summary, nil, class: "input", placeholder: current ? "e.g. new mechanic added" : "Initial issue" %></div>
|
||||
<%= submit_tag "Adopt as revision #{(current&.number || 0) + 1}", class: "btn-primary", disabled: !@policy.complete?,
|
||||
title: (@policy.complete? ? nil : "Fill in the operator, responsible person, hosting and off-site backup first") %>
|
||||
<% end %>
|
||||
</section>
|
||||
<section class="card">
|
||||
<div class="card-header"><h2 class="card-title">Earlier revisions</h2></div>
|
||||
<% if @revisions.size > 1 %>
|
||||
<ul class="divide-y divide-slate-100 text-sm">
|
||||
<% @revisions.drop(1).each do |r| %><li class="flex justify-between px-4 py-2"><span>Revision <%= r.number %> · <%= r.adopted_at.to_date %> · <%= r.summary %></span><%= link_to "View", revision_admin_procedures_path(r), class: "link", target: "_blank" %></li><% end %>
|
||||
</ul>
|
||||
<% else %><%= empty_state "None." %><% end %>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user