mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
- Entries transcribed by Claude are unverified (with Claude's confidence) until an owner checks them against the scan: badge, filter, "mark verified" stepping through the rest - Preventive maintenance templates on new logbook entries, keyed to Part 43 Appendix A(c), setting the entry type and pilot certificate (43.3(g)) - An STC's ICA can become a tracked recurring inspection, linked from its major record - Weight & balance: history of empty weight/CG (linked to the 337 that changed them), loading stations and CG envelope from the POH, and a live calculator for takeoff and landing weight/CG; shown on the status report - New ADs: weekly Federal Register search per aircraft (aircraft, engine and propeller models, or custom terms); track or dismiss each; included in the weekly reminder - Archives carry the new records; brakeman: explicit params, reviewed About-page links Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
2.6 KiB
ERB
37 lines
2.6 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">
|
|
<% unless @entry.verified? %>
|
|
<div class="flex flex-wrap items-center justify-between gap-2 rounded-md bg-amber-50 px-3 py-2 text-sm text-amber-900 ring-1 ring-amber-200">
|
|
<span>Transcribed by Claude<%= " (#{@entry.transcription_confidence} confidence)" if @entry.transcription_confidence %> and not yet checked. Compare it with the scan<%= @entry.document ? "" : " or the paper logbook" %> before relying on it.</span>
|
|
<% if owner? %><%= button_to "Matches the scan: mark verified", verify_aircraft_logbook_entry_path(@aircraft, @entry), method: :patch, class: "btn-secondary btn-sm" %><% end %>
|
|
</div>
|
|
<% end %>
|
|
<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>
|