Overview shows coming due and the last flight; intervals in days, months or years

- Overview: "Coming due" (next 30 days or 10 hours) and "Last flight" (the
  most recent day's legs, meters at the end, fuel and oil left).
- Component replace / TBO / inspect intervals, inspection types and ADs take
  a number and a days / months / years choice (CalendarInterval). Components
  gain month columns (years stored as 12 months; months land on the same
  date); inspection types and ADs keep end-of-month. ADs now honour days.
- Due list: hours already run out count as overdue; a component covered by
  an inspection type no longer gets its own "Inspect every" item.
- Loading calculator moved to a partial; no limit warnings until a load is
  entered. Header buttons don't wrap on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-11 21:40:14 -05:00
1 parent 215efe6814
commit 31ac991bab
37 files changed
+385 -75

No files matched your search

@@ -0,0 +1,9 @@
# Component limits can be set in months or years (stored as months), not
# only days: "replace every 12 months" lands on the same date next year.
class AddMonthIntervalsToComponents < ActiveRecord::Migration[8.1]
def change
add_column :components, :replacement_months, :integer
add_column :components, :tbo_months, :integer
add_column :components, :inspection_months, :integer
end
end
Generated
+4 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.1].define(version: 2026_11_11_050000) do
ActiveRecord::Schema[8.1].define(version: 2026_11_12_010000) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -353,6 +353,9 @@ ActiveRecord::Schema[8.1].define(version: 2026_11_11_050000) do
t.datetime "updated_at", null: false
t.date "expires_on"
t.string "overhaul_kind"
t.integer "replacement_months"
t.integer "tbo_months"
t.integer "inspection_months"
t.index ["aircraft_id"], name: "index_components_on_aircraft_id"
t.index ["component_type_id"], name: "index_components_on_component_type_id"
t.index ["parent_component_id"], name: "index_components_on_parent_component_id"