2026.11.1: offline flight logging fixed, inspections from logbook entries, life limits from installation, component inspections moved to inspection types

- Service worker keeps the Log Flight form when opened via Turbo, serves the offline page's script and icon, and treats 502/503/504 as offline; the offline page only links forms actually kept
- Serviced sub-components restart from the airframe time flown since the entry
- New logbook entries can complete inspections (recorded and linked to the entry)
- Components: replacement limit can count from installation (life limit)
- Component-level "Inspect every" / "Inspection critical" removed; a migration converts any unlinked settings into inspection types with a first record; component page lists its inspections

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-12 07:30:59 -05:00
1 parent 7552e4a8a3
commit 352a38c7fb
28 files changed
+289 -69

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ class CalendarFeedTest < ActionDispatch::IntegrationTest
@oil = create_component(@a, component_type: component_type("Oil"), manufacturer: "Phillips", model: "20W50",
replacement_hours: 50, replacement_days: 120, hours_since_overhaul: 45, overhaul_date: Date.current - 30)
@mag = create_component(@a, component_type: component_type("Magneto"), manufacturer: "Bendix", model: "S4LN-21",
inspection_hours: 500, hours_since_overhaul: 450, overhaul_date: Date.current - 400)
tbo_hours: 500, hours_since_overhaul: 450, overhaul_date: Date.current - 400)
@a.documents.create!(name: "Registration", doc_type: "REGISTRATION", expires_on: Date.current + 200)
end
@@ -20,7 +20,7 @@ class CalendarFeedTest < ActionDispatch::IntegrationTest
assert_equal Date.current + 50, oil.date # 5 hrs at 0.1/day, before the 120-day limit (90 days left)
assert oil.projected
assert_equal 1005.0, oil.due_hours.to_f
assert_equal Date.current + 500, items["inspect-#{@mag.id}"].date # 50 hrs / 0.1 a day
assert_equal Date.current + 500, items["tbo-#{@mag.id}"].date # 50 hrs / 0.1 a day
assert_equal Date.current + 200, items["document-#{@a.documents.first.id}"].date
refute items["document-#{@a.documents.first.id}"].projected
end