mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
- Logbook entries record the signer's kind of certificate and number and an inspection's result; maintenance and inspection entries list what 43.9 / 43.11 needs that's missing (flagged, not enforced). Transcription reads the certificate details too - AD compliance records the method (inspection, terminating action, AMOC, not applicable) and the AD revision complied with, filled in from the AD when blank; the method sets the permanent / N/A flags - Maintenance status report (91.417(a)(2)): total times, life-limited parts, time since overhaul, inspection and AD status, major alterations, open discrepancies; print or save as PDF; on maintenance share links too - Archives carry the new fields Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.9 KiB
ERB
31 lines
1.9 KiB
ERB
<%= render "shared/aircraft_header", aircraft: @aircraft %>
|
|
<section class="card max-w-4xl">
|
|
<div class="card-header">
|
|
<h2 class="card-title"><%= LogbookEntry::LOG_TYPES[@entry.log_type] %> log — <%= fmt_date(@entry.date) %></h2>
|
|
<% if owner? %><%= link_to "Edit", edit_aircraft_logbook_entry_path(@aircraft, @entry), class: "btn-secondary btn-sm" %><% end %>
|
|
</div>
|
|
<div class="card-body space-y-3">
|
|
<div class="flex flex-wrap gap-4 text-sm text-slate-600">
|
|
<span>Type: <%= LogbookEntry::ENTRY_TYPES[@entry.entry_type] %></span>
|
|
<span>Aircraft hours: <%= hours(@entry.aircraft_hours_at_entry) %></span>
|
|
</div>
|
|
<div class="whitespace-pre-wrap rounded bg-slate-50 p-3 font-mono text-sm"><%= @entry.text %></div>
|
|
<div class="text-sm text-slate-600">
|
|
Signed off: <%= @entry.signoff_person.presence || "—" %>
|
|
<%= ", #{@entry.certificate_label}" if @entry.certificate_label %><%= " ##{@entry.signoff_certificate_number}" if @entry.signoff_certificate_number %>
|
|
<%= "(#{@entry.signoff_location})" if @entry.signoff_location.present? %>
|
|
</div>
|
|
<% if @entry.inspection_result %><div class="text-sm text-slate-600">Result: <%= @entry.inspection_result_label %></div><% end %>
|
|
<% if (missing = @entry.missing_record_items).any? %>
|
|
<p class="rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-900 ring-1 ring-amber-200">
|
|
Missing for <%= @entry.entry_type == "INSPECTION" ? "43.11" : "43.9" %>: <%= missing.to_sentence %>.
|
|
<%= link_to("Fill in", edit_aircraft_logbook_entry_path(@aircraft, @entry), class: "link") if owner? %>
|
|
(Check against the signed logbook.)
|
|
</p>
|
|
<% end %>
|
|
<% if @entry.document %>
|
|
<p class="text-sm">Scan: <%= link_to @entry.document.name, aircraft_document_path(@aircraft, @entry.document, page: @entry.page_number), class: "link" %><%= " (page #{@entry.page_number})" if @entry.page_number %></p>
|
|
<% end %>
|
|
</div>
|
|
</section>
|