No aircraft yet.
<%= link_to "Add your first aircraft", new_aircraft_path, class: "btn-primary" %>
<% else %>
<% @aircraft_list.each do |aircraft| %>
<% aw = aircraft.airworthiness %>
<%= link_to aircraft_path(aircraft), class: "card block overflow-hidden transition hover:shadow-md" do %>
<% if aircraft.picture.attached? %>
<%= image_tag aircraft.picture, class: "h-full w-full object-cover" %>
<% else %>
✈
<% end %>
<%= aircraft.tail_number %>
<%= [aircraft.make, aircraft.model].compact_blank.join(" ").presence || "—" %>
<%= airworthiness_badge(aw) %>
Tach <%= hours(aircraft.tach_time) %>
<%= aircraft_status_badge(aircraft) %>
<% if aw.issues.any? %>
<% aw.issues.first(3).each do |issue| %>
- • <%= issue.title %>
<% end %>
<% if aw.issues.size > 3 %>- + <%= aw.issues.size - 3 %> more
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>