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

Major Repairs & Alterations

<% if owner? %>
<%= link_to "+ Repair", new_aircraft_major_record_path(@aircraft, type: "repair"), class: "btn-secondary" %> <%= link_to "+ Alteration", new_aircraft_major_record_path(@aircraft, type: "alteration"), class: "btn-primary" %>
<% end %>
<% if @records.any? %> <% @records.each do |r| %> <% end %>
DateTypeTitlePerformed bySTCICA
<%= fmt_date(r.date_performed) %> <%= tag.span r.type_label, class: r.record_type == "repair" ? "badge-orange" : "badge-blue" %> <%= link_to r.title, aircraft_major_record_path(@aircraft, r), class: "link" %><%= tag.div(r.component, class: "text-xs text-slate-500") if r.component %> <%= r.performed_by %> <%= r.stc_number %> <%= "✓" if r.has_ica? %>
<% else %> <%= empty_state "No major repairs or alterations recorded." %> <% end %>