Logbook entries link a component and its times; boxed page printouts

- An entry can link a component (engine, propeller…) and records its total
  time and time since overhaul at the entry; picking the engine or prop log
  selects that component and fills its current times (editable). Squawk
  fixes carry the squawk's component
- Components have an overhaul type (major, factory overhaul, factory new),
  shown as SMOH / SFOH / SNEW
- Printouts: engine and propeller entries add the serial number, total
  time and SMOH/SFOH (blanks when no component is linked); airframe total
  time is labelled as such; full-page layouts draw a box around each entry
- Archives carry the entry's component and times (the original format's
  components / component_hours), no longer dropped on import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-07 11:19:44 -05:00
1 parent aa262065b2
commit a51f78ebf3
21 files changed
+265 -83

No files matched your search

+3 -2
View File
@@ -157,13 +157,14 @@ class AircraftArchiveTest < ActiveSupport::TestCase
assert_equal [ "N0000X", "Piper", 1234.5 ], [ a.tail_number, a.make, a.tach_time.to_f ]
assert_equal engine_type, a.components.sole.component_type, "matched case-insensitively"
assert_equal 2000, a.components.sole.tbo_hours
assert_equal "INSPECTION", a.logbook_entries.sole.entry_type
entry = a.logbook_entries.sole
assert_equal [ "INSPECTION", a.components.sole, 500 ], [ entry.entry_type, entry.component, entry.component_hours_at_entry.to_i ]
squawk = a.squawks.sole
assert_equal [ 0, "abc123.png" ], [ squawk.priority, squawk.attachments.sole.filename.to_s ]
analysis = a.oil_analyses.sole
assert_equal [ "monitor", 12.5, nil, a.components.sole ], [ analysis.status, analysis.value("iron"), analysis.sample_number, analysis.component ]
assert a.flight_logs.sole.track_log.attached?
assert_equal [ "1 logbook entry was linked to components; those links aren't kept here." ], result[:warnings]
assert_empty result[:warnings] # the entry's component and its hours are kept
end
test "a file whose contents don't match its name is skipped with a note" do