Records package: intact status-report styles, no in-app controls; on-condition TSO

- Inlining CSS used String#sub with a replacement string, so "\&" in
  escaped selectors became "</head>"; use block replacements
- Packaged status report and procedures omit the Back link, the print
  button and the favicon link (they don't work outside the app)
- Status report: "On condition (Part 91)" as Tracked as, with remaining
  hours shown for reference; on condition clears the hard-limit flag

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-07 17:21:58 -05:00
1 parent 2fe2f464c1
commit 5471b9317f
6 files changed
+31 -7

No files matched your search

+2 -1
View File
@@ -37,7 +37,8 @@
<div class="space-y-2">
<%= f.field :tbo_critical, as: :checkbox, label: "Treat TBO as a hard limit",
hint: "Under Part 91, TBO is usually the manufacturer's recommendation, unless an AD or the Airworthiness Limitations make it mandatory." %>
<%= f.field :on_condition, as: :checkbox, label: "On condition (Part 91)" %>
<%= f.field :on_condition, as: :checkbox, label: "On condition (Part 91)",
hint: "Run past TBO based on condition: TBO is shown for reference, never as a limit (this overrides the hard limit)." %>
</div>
<%= f.field :inspection_hours, as: :number, label: "Inspect every (hrs)" %>
<%= f.field :inspection_days, as: :number, label: "Inspect every (days)" %>
+1 -1
View File
@@ -6,7 +6,7 @@
<meta name="robots" content="noindex, nofollow">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<% unless @standalone %><link rel="icon" href="/favicon.svg" type="image/svg+xml"><% end %>
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %>
<style>
+4 -2
View File
@@ -5,11 +5,13 @@
<% th = "border-b border-slate-300 py-1 pr-3 text-left text-[11px] font-semibold uppercase tracking-wide text-slate-500" %>
<% td = "border-b border-slate-100 py-1 pr-3 align-top" %>
<% unless @standalone %>
<div class="mb-4 flex flex-wrap items-center justify-between gap-2 print:hidden">
<% back = @share ? shared_path(@share.token) : aircraft_path(a) %>
<%= link_to "← Back", back, class: "link text-sm" %>
<button type="button" class="btn-primary" data-print>Print or save as PDF</button>
</div>
<% end %>
<header class="flex flex-wrap items-end justify-between gap-4 border-b-2 border-slate-800 pb-3">
<div>
@@ -70,8 +72,8 @@
<tr><td class="<%= td %>"><%= c %> <span class="text-slate-500"><%= c.model %></span></td><td class="<%= td %>"><%= c.serial_number.presence || "—" %></td>
<td class="<%= td %>"><%= [ (c.tbo_hours && "#{hours(c.tbo_hours)} hrs"), (c.tbo_days && "#{c.tbo_days} days") ].compact.join(" / ") %></td>
<td class="<%= td %> text-right tabular-nums"><%= hours(c.hours_since_overhaul) %> hrs</td>
<td class="<%= td %>"><%= c.on_condition? ? "On condition" : (c.hours_to_tbo ? "#{hours(c.hours_to_tbo)} hrs" : "—") %></td>
<td class="<%= td %> text-xs"><%= c.tbo_critical? ? "Hard limit" : "Recommended" %></td></tr>
<td class="<%= td %>"><%= c.hours_to_tbo ? "#{hours(c.hours_to_tbo)} hrs" : "—" %></td>
<td class="<%= td %> text-xs"><%= c.on_condition? ? "On condition (Part 91)" : (c.tbo_critical? ? "Hard limit" : "Recommended") %></td></tr>
<% end %>
</tbody>
</table>