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

Airworthiness

<%= link_to "Status report", aircraft_report_path(@aircraft), class: "btn-secondary btn-sm", title: "Printable maintenance status (91.417)" %> <%= airworthiness_badge(@airworthiness, large: true) %>
<% if @airworthiness.issues.empty? %>

Nothing overdue or due soon. All tracked ADs, inspections, components and squawks are current.

<% else %>
    <% @airworthiness.issues.each do |issue| %>
  • <%= issue.category %>
    <%= issue.title %>
    <%= issue.description %>
  • <% end %>
<% end %> <% if @aircraft.airworthiness_enforcement? %>

Airworthiness enforcement is on: flights and hours updates are blocked while the aircraft shows Grounded.

<% end %>

<%= Airworthiness::DISCLAIMER %>

Active Squawks

<%= link_to "All squawks →", aircraft_squawks_path(@aircraft), class: "link text-sm" %>
<% if @active_squawks.any? %> <%= render "squawks/table", squawks: @active_squawks, aircraft: @aircraft %> <% else %> <%= empty_state "No open squawks." %> <% end %>

Consumption

<%= link_to "Oil & fuel →", aircraft_consumable_records_path(@aircraft), class: "link text-sm" %>
<%= @oil.recent || "—" %>
Oil, hrs/qt (last ~100 hrs)
<%= @fuel.recent || "—" %>
Fuel burn, gal/hr (last ~50 hrs)

Update Hours

<%= form_with url: hours_aircraft_path(@aircraft), method: :patch, class: "card-body space-y-3" do |f| %>
<%= f.label :tach_time, "Tach", class: "label" %> <%= f.number_field :tach_time, value: @aircraft.tach_time, step: 0.1, class: "input", required: true %>
<%= f.label :hobbs_time, "Hobbs", class: "label" %> <%= f.number_field :hobbs_time, value: @aircraft.hobbs_time, step: 0.1, class: "input" %>

Enter the current meter readings. The difference is applied to every in-service component. For a single flight, use <%= link_to "Log Flight", new_aircraft_flight_log_path(@aircraft), class: "link" %>.

<%= f.submit "Update Hours", class: "btn-primary" %> <% end %>
<%= render "aircraft/last_flight", aircraft: @aircraft, last_day: @last_day %>

Details

<% if owner? %><%= link_to "Edit", edit_aircraft_path(@aircraft), class: "btn-secondary btn-sm" %><% end %>
Serial
<%= @aircraft.serial_number.presence || "—" %>
Purchased
<%= fmt_date(@aircraft.purchased) %>
Tach offset
<%= hours(@aircraft.tach_time_offset) %>
Hobbs offset
<%= hours(@aircraft.hobbs_time_offset) %>
<% if @aircraft.description.present? %>

<%= simple_format @aircraft.description %>

<% end %>

Notes

<%= link_to "+ Add", new_aircraft_note_path(@aircraft), class: "btn-secondary btn-sm" %>
<% if @notes.any? %>
    <% @notes.each do |note| %>
  • <%= markdown_excerpt note.text %>
    <%= note.user&.display_name %> · <%= time_ago_in_words(note.created_at) %> ago <%= "· public" if note.public? %>
  • <% end %>
<% else %> <%= empty_state "No notes." %> <% end %>

Recent Activity

<%= link_to "All →", aircraft_events_path(@aircraft), class: "link text-sm" %>
<%= render "events/list", events: @recent_events %>