<% content_for :title, t(".major_records", tail_number: @aircraft.tail_number) %> <%= render "shared/aircraft_header", aircraft: @aircraft %>

<%= t(".major_repairs_alterations") %>

<% if owner? %>
<%= link_to t(".repair"), new_aircraft_major_record_path(@aircraft, type: "repair"), class: "btn-secondary" %> <%= link_to t(".alteration"), new_aircraft_major_record_path(@aircraft, type: "alteration"), class: "btn-primary" %>
<% end %>
<% if @records.any? %> <% @records.each do |r| %> <% end %>
<%= t(".date") %><%= t(".type") %><%= t(".title") %><%= t(".performed_by") %><%= t(".stc") %><%= t(".ica") %>
<%= 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 t(".no_major_repairs_or_alterations") %> <% end %>