<% a = @report.aircraft %> <% clock = a.time_basis_label.downcase %> <% content_for :title, "#{a.tail_number} Maintenance Status" %> <% section = "mt-6 break-inside-avoid-page" %> <% th = "border-b border-slate-300 py-1 pr-3 text-left text-[11px] font-semibold uppercase tracking-wide text-slate-500" %> <% td = "border-b border-slate-100 py-1 pr-3 align-top" %>
<% back = @share ? shared_path(@share.token) : aircraft_path(a) %> <%= link_to "← Back", back, class: "link text-sm" %>

Maintenance status · 14 CFR 91.417(a)(2)

<%= a.tail_number %> <%= [ a.make, a.model ].compact_blank.join(" ") %>

Serial number <%= a.serial_number.presence || "—" %>

Prepared
<%= l(@report.generated_at.to_date, format: :long) %>
Airframe time in service
<%= hours(@report.time_in_service) %> hrs (<%= clock %>)
Tach / Hobbs
<%= hours(a.tach_time) %> / <%= hours(a.hobbs_time) %>
Status
<%= airworthiness_badge(@report.airworthiness) %>

Total time in service: engines and propellers

<% majors = @report.engines + @report.propellers %> <% if majors.any? %> <% majors.each do |c| %> <% end %>
ItemMake / modelSerialTotal timeSince overhaulOverhauled
<%= c %><%= [ c.manufacturer, c.model ].compact_blank.join(" ") %><%= c.serial_number.presence || "—" %> <%= hours(c.hours_in_service) %><%= hours(c.hours_since_overhaul) %><%= c.overhaul_date || "—" %>
<% else %>

No engines or propellers recorded as components.

<% end %>

Life-limited parts

<% if @report.life_limited.any? %> <% @report.life_limited.each do |c| %> <% end %>
PartSerialLimitUsedRemainingStatus
<%= c %> <%= c.model %><%= c.serial_number.presence || "—" %> <%= [ (c.replacement_hours && "#{hours(c.replacement_hours)} hrs"), (c.replacement_days && "#{c.replacement_days} days") ].compact.join(" / ") %> <%= hours(c.hours_since_overhaul) %> hrs <%= [ (c.hours_to_replacement && "#{hours(c.hours_to_replacement)} hrs"), (c.next_replacement_date && "by #{c.next_replacement_date}") ].compact.join(", ") %> <%= life_badge(c.life_status) %>
<% else %>

None recorded.

<% end %>

Time since overhaul

<% if @report.overhaul_items.any? %> <% @report.overhaul_items.each do |c| %> <% end %>
ItemSerialOverhaul intervalSince overhaulRemainingTracked as
<%= c %> <%= c.model %><%= c.serial_number.presence || "—" %> <%= [ (c.tbo_hours && "#{hours(c.tbo_hours)} hrs"), (c.tbo_days && "#{c.tbo_days} days") ].compact.join(" / ") %> <%= hours(c.hours_since_overhaul) %> hrs <%= c.on_condition? ? "On condition" : (c.hours_to_tbo ? "#{hours(c.hours_to_tbo)} hrs" : "—") %> <%= c.tbo_critical? ? "Hard limit" : "Recommended" %>
<% else %>

None recorded.

<% end %>

Inspection status

<% if @report.inspections.any? %> <% @report.inspections.each do |row| %> <% last = row.latest %> <% end %>
InspectionIntervalLast doneSinceNext dueStatus
<%= row.type.name %><% if row.type.satisfies %>
Also counts as <%= row.type.satisfies.name %>
<% end %>
<%= row.type.interval_description %> <%= last ? "#{last.date}#{" @ #{hours(last.hours_at_inspection)}" if last.hours_at_inspection}" : "Never" %><%= " (#{last.inspection_type.name})" if last && last.inspection_type != row.type %> <%= last&.hours_at_inspection ? "#{hours(@report.time_in_service - last.hours_at_inspection)} hrs" : "—" %> <%= [ row.next_due_date&.to_s, row.next_due_hours && "#{hours(row.next_due_hours)} hrs" ].compact.join(" / ").presence || "—" %> <%= compliance_badge(row.status) %>
<% else %>

No inspections tracked.

<% end %>

Airworthiness directives

<% if @report.ads.any? %> <% @report.ads.each do |row| %> <% c = row.latest %> <% end %>
ADRevision complied withMethod of complianceCompliedRecurring / next dueStatus
<%= row.ad.name %>
<%= row.ad.short_description.to_s.truncate(70) %>
<%= c&.ad_revision.presence || "—" %> <%= c ? c.method_label : "—" %><% if c&.compliance_notes.present? %>
<%= c.compliance_notes.truncate(90) %>
<% end %>
<%= c ? "#{c.date_complied}#{" @ #{hours(c.aircraft_hours_at_compliance)}" if c.aircraft_hours_at_compliance}" : "—" %> <%= if c&.closed? then "No further action" elsif row.ad.recurring? then [ row.next_due_date&.to_s, row.next_due_hours && "#{hours(row.next_due_hours)} hrs" ].compact.join(" / ").presence || "Recurring" else "One-time" end %> <%= compliance_badge(row.status) %>
<% else %>

No ADs tracked.

<% end %>

Major repairs and alterations

<% if (majors = @report.major_records.to_a).any? %> <% majors.each do |m| %> <% end %>
DateTypeDescriptionSTCForm 337
<%= m.date_performed %><%= m.type_label %> <%= m.title %><%= " · #{m.component}" if m.component %> <%= [ m.stc_number, m.stc_holder ].compact_blank.join(", ").presence || "—" %> <%= m.form_337_document ? "On file" : "—" %>
<% else %>

None recorded.

<% end %>

Open discrepancies

<% if (squawks = @report.open_squawks.to_a).any? %> <% else %>

None open.

<% end %>