mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Unverified transcriptions, PM templates, ICA inspections, W&B, AD watch
- 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>
This commit is contained in:
1 parent
bed07386ef
commit
6cab81332e
49 files changed
+1197
-35
No files matched your search
@@ -51,6 +51,48 @@
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
<section class="card mt-5" id="new-ads">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<h2 class="card-title">Newly published ADs that may apply</h2>
|
||||
<p class="text-xs text-slate-500">Searched weekly in the Federal Register for <%= AdWatch.new(@aircraft).terms.to_sentence.presence || "the aircraft, engine and propeller models" %><%= " · last checked #{time_ago_in_words(@aircraft.ad_watch_checked_at)} ago" if @aircraft.ad_watch_checked_at %>.</p>
|
||||
</div>
|
||||
<% if owner? %><%= button_to "Check now", check_aircraft_ad_alerts_path(@aircraft), class: "btn-secondary btn-sm", data: { turbo_submits_with: "Checking…" } %><% end %>
|
||||
</div>
|
||||
<% if @alerts.any? %>
|
||||
<ul class="divide-y divide-slate-100">
|
||||
<% @alerts.each do |alert| %>
|
||||
<li class="flex flex-wrap items-start justify-between gap-3 px-4 py-3">
|
||||
<div class="min-w-0 flex-1 text-sm">
|
||||
<div class="font-medium"><%= alert.ad_number ? "AD #{alert.ad_number}" : alert.fr_document_number %> · <%= alert.title.to_s.delete_prefix("Airworthiness Directives; ") %></div>
|
||||
<div class="text-xs text-slate-500"><%= [ (alert.effective_on && "Effective #{alert.effective_on}"), "published #{alert.publication_date}", "matched “#{alert.matched_term}”" ].compact.join(" · ") %></div>
|
||||
<p class="mt-1 text-xs text-slate-600"><%= alert.abstract.to_s.truncate(400) %></p>
|
||||
<%= link_to "Read it in the Federal Register", alert.html_url, class: "link text-xs", target: "_blank", rel: "noopener" %>
|
||||
</div>
|
||||
<% if owner? %>
|
||||
<div class="flex gap-2">
|
||||
<%= button_to "Track", track_aircraft_ad_alert_path(@aircraft, alert), class: "btn-primary btn-sm", title: "Add it to this aircraft's ADs" %>
|
||||
<%= button_to "Dismiss", dismiss_aircraft_ad_alert_path(@aircraft, alert), class: "btn-secondary btn-sm", title: "Doesn't apply" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<%= empty_state "Nothing new to review." %>
|
||||
<% end %>
|
||||
<% if owner? %>
|
||||
<%= form_with url: terms_aircraft_ad_alerts_path(@aircraft), method: :patch, class: "flex flex-wrap items-end gap-2 border-t border-slate-100 px-4 py-3" do %>
|
||||
<div class="min-w-0 flex-1">
|
||||
<%= label_tag :ad_watch_terms, "Search terms", class: "label" %>
|
||||
<%= text_field_tag :ad_watch_terms, @aircraft.ad_watch_terms, class: "input", placeholder: AdWatch.default_terms(@aircraft).join(", ").presence || "e.g. 172N, O-320, 1C160" %>
|
||||
</div>
|
||||
<%= submit_tag "Save", class: "btn-secondary" %>
|
||||
<p class="hint w-full">Comma-separated model names. Left blank, the aircraft, engine and propeller models are used. Matches are only possibly applicable: check each AD's applicability (and serial number ranges) before tracking it.</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
<section class="card mt-5">
|
||||
<div class="card-header"><h2 class="card-title">Compliance History</h2></div>
|
||||
<% if @history.any? %>
|
||||
|
||||
Reference in new issue
Block a user