Record keeping: 43.9/43.11 sign-off fields, AD method, status report

- 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>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-07 10:14:21 -05:00
1 parent a4b72cf2c1
commit a4ec7a691e
30 files changed
+515 -26

No files matched your search

+4 -1
View File
@@ -66,6 +66,7 @@ module AircraftArchive
ads: ads.map { ad_hash(_1, component_ids) },
ad_compliances: a.ad_compliances.map do |c|
{ id: id(c), ad_id: id(c.airworthiness_directive_id), date_complied: c.date_complied&.iso8601, compliance_notes: c.compliance_notes,
compliance_method: c.compliance_method, ad_revision: c.ad_revision,
permanent: c.permanent, next_due_at_time: dec(c.next_due_at_time), aircraft_hours_at_compliance: dec(c.aircraft_hours_at_compliance),
logbook_entry_id: id(c.logbook_entry_id), inspection_record_id: id(c.inspection_record_id), aircraft_id: id(a),
component_id: id(c.component_id), not_applicable: c.not_applicable }
@@ -136,7 +137,9 @@ module AircraftArchive
def logbook_hash(e)
{ id: id(e), aircraft_id: id(e.aircraft_id), log_type: e.log_type, date: e.date&.iso8601, text: e.text,
signoff_person: e.signoff_person, signoff_location: e.signoff_location, log_image_id: id(e.document_id),
signoff_person: e.signoff_person, signoff_location: e.signoff_location,
signoff_certificate_type: e.signoff_certificate_type, signoff_certificate_number: e.signoff_certificate_number,
inspection_result: e.inspection_result, log_image_id: id(e.document_id),
aircraft_hours_at_entry: dec(e.aircraft_hours_at_entry), component_hours: {}, entry_type: e.entry_type,
page_number: e.page_number, components: [], related_documents: [] }
end
@@ -223,6 +223,9 @@ module AircraftArchive
entry_type: LogbookEntry::ENTRY_TYPES.key?(data["entry_type"]) ? data["entry_type"] : LogbookEntry::ENTRY_TYPES.keys.first,
date: date(data["date"]) || Date.new(1900, 1, 1), text: data["text"].to_s.presence || "—",
signoff_person: data["signoff_person"], signoff_location: data["signoff_location"],
signoff_certificate_type: LogbookEntry::CERTIFICATE_TYPES.key?(data["signoff_certificate_type"]) ? data["signoff_certificate_type"] : nil,
signoff_certificate_number: data["signoff_certificate_number"].to_s.presence,
inspection_result: LogbookEntry::INSPECTION_RESULTS.key?(data["inspection_result"]) ? data["inspection_result"] : nil,
aircraft_hours_at_entry: num(data["aircraft_hours_at_entry"]), page_number: data["page_number"],
document_id: @map[:document][data["log_image_id"].to_s]
)
@@ -318,11 +321,14 @@ module AircraftArchive
c = @aircraft.ad_compliances.new(
airworthiness_directive_id: ad_id, date_complied: date(data["date_complied"]) || Date.new(1900, 1, 1),
compliance_notes: data["compliance_notes"].to_s, permanent: data["permanent"] == true,
compliance_method: AdCompliance::METHODS.key?(data["compliance_method"]) ? data["compliance_method"] : nil,
ad_revision: data["ad_revision"].to_s.presence,
next_due_at_time: num(data["next_due_at_time"]) || 0, aircraft_hours_at_compliance: num(data["aircraft_hours_at_compliance"]),
logbook_entry_id: @map[:logbook][data["logbook_entry_id"].to_s],
inspection_record_id: @map[:inspection_record][data["inspection_record_id"].to_s],
component_id: @map[:component][data["component_id"].to_s], not_applicable: data["not_applicable"] == true
)
c.apply_method # older archives have only the permanent / not-applicable flags
c.save!(validate: false)
tick("ad_compliances")
end