mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
- Sign an entry: review exactly what's certified, choose a current certificate (eligibility checked: pilot only for preventive maintenance, inspections need their result and time), re-enter the password or sign in again with SSO (prompt=login, within 5 minutes), and confirm the "Certified by" statement (43.9 return to service, 43.11(a)(5) for inspections, preventive maintenance for pilots) - The signature stores signer, certificate, statement, UTC time, how they authenticated, IP/browser, a SHA-256 fingerprint of the entry's content and a readable snapshot; an HMAC seal covers the signature record. Status shows Valid / Superseded / Altered since signing. The signer is emailed - Signed entries (and their sub-components) can't be edited or deleted; a correction entry, once signed, supersedes the original (kept) - Owners invite an outside mechanic by email to sign one entry: one-time, 14-day link; they create or use their own account and certificate and see only that entry - Admins can disable accounts (signed out, can't sign in or sign; past signatures kept); users with signatures can't be deleted - Printouts show the electronic signature and fingerprint; archives carry signatures (marked imported, with their origin) and corrections Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
2.0 KiB
ERB
20 lines
2.0 KiB
ERB
<%# Everything a signature covers, as the signer reviews it (AC 120-78B 2.2.4). %>
|
|
<dl class="grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[10rem_1fr]">
|
|
<dt class="text-slate-500">Aircraft</dt><dd><%= entry.aircraft.tail_number %> <%= [ entry.aircraft.make, entry.aircraft.model ].compact_blank.join(" ") %><%= " · S/N #{entry.aircraft.serial_number}" if entry.aircraft.serial_number.present? %></dd>
|
|
<dt class="text-slate-500">Date</dt><dd><%= fmt_date(entry.date) %></dd>
|
|
<dt class="text-slate-500">Logbook</dt><dd><%= LogbookEntry::LOG_TYPES[entry.log_type] %> · <%= LogbookEntry::ENTRY_TYPES[entry.entry_type] %></dd>
|
|
<dt class="text-slate-500">Airframe total time</dt><dd><%= hours(entry.aircraft_hours_at_entry) %> (<%= entry.aircraft.time_basis %>)</dd>
|
|
<% if (c = entry.component) %>
|
|
<dt class="text-slate-500"><%= c.component_type&.name %></dt>
|
|
<dd><%= c.manufacturer %> <%= c.model %><%= " · S/N #{c.serial_number}" if c.serial_number.present? %> · <%= hours(entry.component_hours_at_entry) %> total, <%= hours(entry.component_since_overhaul_at_entry) %> <%= c.since_overhaul_abbreviation %></dd>
|
|
<% end %>
|
|
<% entry.parts.each do |part| %>
|
|
<dt class="text-slate-500"><%= part.component.component_type&.name %></dt>
|
|
<dd><%= part.component.manufacturer %> <%= part.component.model %><%= " · S/N #{part.component.serial_number}" if part.component.serial_number.present? %> · <%= hours(part.hours_at_entry) %> total, <%= hours(part.since_overhaul_at_entry) %> <%= part.component.since_overhaul_abbreviation.downcase %></dd>
|
|
<% end %>
|
|
<% if entry.inspection_result %><dt class="text-slate-500">Result</dt><dd><%= entry.inspection_result_label %></dd><% end %>
|
|
<% if entry.signoff_location.present? %><dt class="text-slate-500">Location</dt><dd><%= entry.signoff_location %></dd><% end %>
|
|
<% if entry.supersedes %><dt class="text-slate-500">Corrects</dt><dd>The <%= entry.supersedes.date %> entry</dd><% end %>
|
|
</dl>
|
|
<div class="mt-3 whitespace-pre-wrap rounded bg-slate-50 p-3 font-mono text-sm"><%= entry.text %></div>
|