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

+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>