mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
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:
1 parent
7552e4a8a3
commit
352a38c7fb
28 files changed
+289
-69
No files matched your search
@@ -145,10 +145,11 @@ module AircraftArchive
|
||||
manufacturer: c.manufacturer, model: c.model, serial_number: c.serial_number, install_location: c.install_location,
|
||||
expires_on: c.expires_on&.iso8601, notes: c.notes, status: c.status, date_in_service: c.date_in_service&.iso8601, hours_in_service: dec(c.hours_in_service),
|
||||
hours_since_overhaul: dec(c.hours_since_overhaul), overhaul_date: c.overhaul_date&.iso8601, tbo_hours: c.tbo_hours,
|
||||
tbo_days: c.tbo_days, inspection_hours: c.inspection_hours, inspection_days: c.inspection_days,
|
||||
tbo_days: c.tbo_days,
|
||||
replacement_hours: c.replacement_hours, replacement_days: c.replacement_days,
|
||||
replacement_months: c.replacement_months, tbo_months: c.tbo_months, inspection_months: c.inspection_months, tbo_critical: c.tbo_critical,
|
||||
on_condition: c.on_condition, inspection_critical: c.inspection_critical, replacement_critical: c.replacement_critical }
|
||||
replacement_months: c.replacement_months, tbo_months: c.tbo_months, tbo_critical: c.tbo_critical,
|
||||
on_condition: c.on_condition, replacement_critical: c.replacement_critical,
|
||||
replacement_from_install: c.replacement_from_install }
|
||||
end
|
||||
|
||||
def logbook_hash(e)
|
||||
|
||||
@@ -215,9 +215,9 @@ module AircraftArchive
|
||||
status: Component::STATUSES.key?(data["status"]) ? data["status"] : "SPARE",
|
||||
date_in_service: date(data["date_in_service"]) || Date.new(1900, 1, 1), hours_in_service: num(data["hours_in_service"]) || 0,
|
||||
hours_since_overhaul: num(data["hours_since_overhaul"]) || 0, overhaul_date: date(data["overhaul_date"]),
|
||||
**data.slice(*%w[tbo_hours tbo_days inspection_hours inspection_days replacement_hours replacement_days
|
||||
tbo_months inspection_months replacement_months]).symbolize_keys,
|
||||
**data.slice(*%w[tbo_critical on_condition inspection_critical replacement_critical]).transform_values { _1 == true }.symbolize_keys
|
||||
**data.slice(*%w[tbo_hours tbo_days replacement_hours replacement_days
|
||||
tbo_months replacement_months]).symbolize_keys,
|
||||
**data.slice(*%w[tbo_critical on_condition replacement_critical replacement_from_install]).transform_values { _1 == true }.symbolize_keys
|
||||
)
|
||||
c.save!(validate: false)
|
||||
@map[:component][data["id"].to_s] = c.id
|
||||
|
||||
Reference in new issue
Block a user