mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
- Logbook entries record the signer's kind of certificate and number and an inspection's result; maintenance and inspection entries list what 43.9 / 43.11 needs that's missing (flagged, not enforced). Transcription reads the certificate details too - AD compliance records the method (inspection, terminating action, AMOC, not applicable) and the AD revision complied with, filled in from the AD when blank; the method sets the permanent / N/A flags - Maintenance status report (91.417(a)(2)): total times, life-limited parts, time since overhaul, inspection and AD status, major alterations, open discrepancies; print or save as PDF; on maintenance share links too - Archives carry the new fields Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
2.1 KiB
ERB
27 lines
2.1 KiB
ERB
<%= form_with model: [aircraft, entry], class: "card card-body space-y-4 max-w-3xl" do |f| %>
|
|
<%= f.errors_summary %>
|
|
<div class="grid gap-4 sm:grid-cols-4">
|
|
<%= f.field :date, as: :date %>
|
|
<%= f.field :log_type, as: :select, label: "Logbook", collection: LogbookEntry::LOG_TYPES.invert %>
|
|
<%= f.field :entry_type, as: :select, label: "Entry type", collection: LogbookEntry::ENTRY_TYPES.invert %>
|
|
<%= f.field :aircraft_hours_at_entry, as: :number, step: 0.1, label: "Aircraft hours" %>
|
|
</div>
|
|
<%= f.field :text, as: :textarea, label: "Entry text", rows: 8 %>
|
|
<p class="hint !mt-1">A maintenance entry needs a description of the work, the date, and the name, signature, certificate number and kind of certificate of whoever approved the return to service (14 CFR 43.9). An inspection entry also needs the type and extent of the inspection, the aircraft's time in service, and the result (43.11).</p>
|
|
<div class="grid gap-4 sm:grid-cols-3">
|
|
<%= f.field :signoff_person, label: "Signed off by", placeholder: "Name" %>
|
|
<%= f.field :signoff_certificate_type, as: :select, label: "Kind of certificate", include_blank: "—",
|
|
collection: LogbookEntry::CERTIFICATE_TYPES.invert %>
|
|
<%= f.field :signoff_certificate_number, label: "Certificate number", placeholder: "e.g. 1234567" %>
|
|
</div>
|
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
<%= f.field :inspection_result, as: :select, label: "Inspection result", include_blank: "— Not an inspection —",
|
|
collection: LogbookEntry::INSPECTION_RESULTS.invert, hint: "For inspection entries (43.11)." %>
|
|
<%= f.field :signoff_location, label: "Location / shop" %>
|
|
<%= f.field :document_id, as: :select, label: "Scanned page document", collection: document_options(aircraft) %>
|
|
<%= f.field :page_number, as: :number, label: "Page # in document" %>
|
|
</div>
|
|
<div class="flex gap-2"><%= f.submit "Save Entry" %><%= link_to "Cancel", aircraft_logbook_entries_path(aircraft), class: "btn-secondary" %></div>
|
|
<% end %>
|
|
<% if entry.persisted? %><div class="mt-4"><%= delete_button "Delete entry", aircraft_logbook_entry_path(aircraft, entry) %></div><% end %>
|