<% content_for :title, "#{@aircraft.tail_number} Squawks" %> <%= render "shared/aircraft_header", aircraft: @aircraft %>

Open Squawks

<%= link_to "+ Report Squawk", new_aircraft_squawk_path(@aircraft), class: "btn-primary" %>
<% if @active.any? %><%= render "squawks/table", squawks: @active, aircraft: @aircraft %><% else %><%= empty_state "No open squawks." %><% end %>

Resolved

<% if @resolved.any? %> <% @resolved.each do |s| %> <% end %>
PriorityIssueResolutionResolved
<%= squawk_priority_badge(s) %> <%= s.issue_reported %> <%= s.notes %> <%= s.resolved_at&.to_date %> <% if owner? %><%= button_to "Reopen", reopen_aircraft_squawk_path(@aircraft, s), method: :patch, class: "btn-secondary btn-sm" %><% end %>
<% else %> <%= empty_state "No resolved squawks." %> <% end %>