mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Rails 8.1 + SQLite rewrite of marbindrakon/simple-aircraft-manager, designed to self-host as a single container (Solid Queue/Cache/Cable, Active Storage on disk, Hotwire + importmap, Tailwind). - Airworthiness engine ported from health/services.py (ADs, grounding squawks, inspection recurrency, component replacement) - Hours updates and flight logs cascading to in-service components, optional airworthiness enforcement - Components, squawks, ADs, inspections, logbook, documents, major records, oil/fuel consumption stats and charts, activity log - Admin/owner/pilot RBAC and public share links (status/maintenance) - Docker Compose and Kamal deployment, env-driven production config - Service and integration tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
1.9 KiB
ERB
20 lines
1.9 KiB
ERB
<%= render "shared/aircraft_header", aircraft: @aircraft %>
|
|
<section class="card max-w-4xl">
|
|
<div class="card-header"><h2 class="card-title"><%= @record.type_label %>: <%= @record.title %></h2>
|
|
<% if owner? %><%= link_to "Edit", edit_aircraft_major_record_path(@aircraft, @record), class: "btn-secondary btn-sm" %><% end %></div>
|
|
<dl class="card-body grid grid-cols-2 gap-x-4 gap-y-2 text-sm sm:grid-cols-4">
|
|
<dt class="text-slate-500">Date</dt><dd><%= fmt_date(@record.date_performed) %></dd>
|
|
<dt class="text-slate-500">Aircraft hours</dt><dd><%= hours(@record.aircraft_hours) %></dd>
|
|
<dt class="text-slate-500">Performed by</dt><dd><%= @record.performed_by.presence || "—" %></dd>
|
|
<dt class="text-slate-500">Component</dt><dd><%= @record.component || "—" %></dd>
|
|
<dt class="text-slate-500">Form 337</dt><dd><%= @record.form_337_document ? link_to(@record.form_337_document.name, aircraft_document_path(@aircraft, @record.form_337_document), class: "link") : "—" %></dd>
|
|
<dt class="text-slate-500">STC</dt><dd><%= [@record.stc_number, @record.stc_holder].compact_blank.join(" · ").presence || "—" %>
|
|
<%= link_to("(docs)", aircraft_document_path(@aircraft, @record.stc_document), class: "link") if @record.stc_document %></dd>
|
|
<dt class="text-slate-500">Logbook</dt><dd><%= @record.logbook_entry ? link_to(@record.logbook_entry.date, aircraft_logbook_entry_path(@aircraft, @record.logbook_entry), class: "link") : "—" %></dd>
|
|
<dt class="text-slate-500">ICAs</dt><dd><%= @record.has_ica? ? "Yes" : "No" %></dd>
|
|
</dl>
|
|
<% [["Description", @record.description], ["ICA notes", @record.ica_notes], ["Notes", @record.notes]].each do |title, text| %>
|
|
<% if text.present? %><div class="border-t border-slate-100 px-4 py-3 text-sm"><h3 class="mb-1 font-medium"><%= title %></h3><%= simple_format text %></div><% end %>
|
|
<% end %>
|
|
</section>
|