Files
simple-aircraft-manager-rails/app/views/squawks/index.html.erb
T
rickyandClaude Opus 5.5 03b9ad65cb Workflow polish: setup checklist, next leg, grouped component limits
- Setup checklist on a new aircraft's Overview (owners): components,
  standard inspections, DRS AD import, registration/airworthiness
  certificate, weight and balance; hideable per device
- Log Flight: "Save and log next leg" reopens the form on the same date,
  starting where the leg ended
- Component form: limits in two collapsible groups (replacement and expiry;
  overhaul and TBO), open when in use
- Squawk form warns what "Ground Aircraft" does
- Logbook entry form: inspection result only for inspection entries
  (show-when controller); document names default from the file
- Dates in pickers, the activity log, airworthiness lines, search, audits
  and transcription notes use the app format
- No duplicate Report Squawk button on Squawks; "Record service" label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:43:03 -05:00

31 lines
1.6 KiB
ERB

<% content_for :title, t(".squawks", tail_number: @aircraft.tail_number) %>
<%= render "shared/aircraft_header", aircraft: @aircraft %>
<section class="card">
<div class="card-header">
<h2 class="card-title"><%= t(".open_squawks") %></h2>
</div>
<% if @active.any? %><%= render "squawks/table", squawks: @active, aircraft: @aircraft %><% else %><%= empty_state t(".no_open_squawks") %><% end %>
</section>
<section class="card mt-5">
<div class="card-header"><h2 class="card-title"><%= t(".resolved") %></h2></div>
<% if @resolved.any? %>
<table class="table">
<thead><tr><th><%= t(".priority") %></th><th><%= t(".issue") %></th><th><%= t(".resolution") %></th><th><%= t(".resolved") %></th><th></th></tr></thead>
<tbody>
<% @resolved.each do |s| %>
<tr>
<td><%= squawk_priority_badge(s) %></td>
<td><%= s.issue_reported %><%= render "squawks/attachments", squawk: s %></td>
<td class="text-xs text-slate-600"><%= s.notes %><% if s.logbook_entry %><div><%= link_to t(".logbook", date: fmt_date(s.logbook_entry.date)), aircraft_logbook_entry_path(@aircraft, s.logbook_entry), class: "link" %></div><% end %></td>
<td class="text-xs text-slate-500"><%= fmt_date(s.resolved_at&.to_date) %></td>
<td class="text-right"><% if owner? %><%= button_to t(".reopen"), reopen_aircraft_squawk_path(@aircraft, s), method: :patch, class: "btn-secondary btn-sm" %><% end %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<%= empty_state t(".no_resolved_squawks") %>
<% end %>
</section>