mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15: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>
46 lines
2.9 KiB
ERB
46 lines
2.9 KiB
ERB
<% content_for :title, "#{@aircraft.tail_number} Logbook Import" %>
|
|
<% if @import.in_progress? %><% content_for :head, tag.meta("http-equiv": "refresh", content: "3") %><% end %>
|
|
<%= render "shared/aircraft_header", aircraft: @aircraft %>
|
|
<section class="card card-body max-w-3xl space-y-4 text-sm">
|
|
<div class="flex flex-wrap items-baseline justify-between gap-2">
|
|
<h2 class="card-title"><%= @import.document&.name || "Logbook pages" %></h2>
|
|
<span class="text-xs text-slate-500"><%= pluralize(@import.pages_total, "page") %><%= " · read by #{@import.model}" if @import.transcribe && @import.model %></span>
|
|
</div>
|
|
|
|
<% if @import.in_progress? %>
|
|
<div>
|
|
<div class="mb-1 flex justify-between text-xs text-slate-500">
|
|
<span><%= @import.transcribe ? "Claude is reading the pages…" : "Saving pages…" %></span>
|
|
<span class="tabular-nums"><%= @import.pages_done %> / <%= @import.pages_total %></span>
|
|
</div>
|
|
<div class="h-2 overflow-hidden rounded-full bg-slate-200" role="progressbar" aria-valuenow="<%= @import.progress_percent %>" aria-valuemin="0" aria-valuemax="100">
|
|
<div class="h-full rounded-full bg-sky-600 transition-all" style="width: <%= @import.progress_percent %>%"></div>
|
|
</div>
|
|
<p class="hint mt-2"><%= pluralize(@import.entries_created, "entry") %> so far. This page updates by itself; a long logbook can take several minutes.</p>
|
|
</div>
|
|
<% elsif @import.done? %>
|
|
<p class="font-medium text-emerald-700">
|
|
<%= @import.transcribe ? "Done: #{pluralize(@import.entries_created, 'logbook entry')} added." : "Pages saved." %>
|
|
</p>
|
|
<% if @import.transcribe && @import.entries_created.positive? %>
|
|
<p class="text-slate-600">The new entries are marked unverified until someone checks them against the scans, since handwriting isn't always read perfectly.
|
|
<%= link_to "Check them now", aircraft_logbook_entries_path(@aircraft, unverified: 1), class: "link" %></p>
|
|
<% end %>
|
|
<% else %>
|
|
<p class="font-medium text-red-700">The import stopped: <%= @import.error %></p>
|
|
<% if @import.entries_created.positive? %><p class="text-slate-600"><%= pluralize(@import.entries_created, "entry") %> were added before it stopped.</p><% end %>
|
|
<% end %>
|
|
|
|
<div class="flex flex-wrap gap-2">
|
|
<%= link_to "Logbook", aircraft_logbook_entries_path(@aircraft), class: "btn-secondary btn-sm" %>
|
|
<% if @import.document %><%= link_to "View scans", aircraft_document_path(@aircraft, @import.document), class: "btn-secondary btn-sm" %><% end %>
|
|
</div>
|
|
|
|
<% if @import.warnings.any? %>
|
|
<div class="border-t border-slate-100 pt-3">
|
|
<p class="mb-1 text-xs font-semibold text-slate-500"><%= pluralize(@import.warnings.size, "note") %></p>
|
|
<ul class="list-disc space-y-0.5 pl-5 text-slate-600"><% @import.warnings.each do |w| %><li><%= w %></li><% end %></ul>
|
|
</div>
|
|
<% end %>
|
|
</section>
|