Add flying stats to the Flights tab; drop the DRS search link setting

Flights tab:
- Summary cards for the past 30 days, this year, past 12 months and
  since the first flight (flight hours, flights, tach, fuel).
- Flight hours by month (last 24 months) with the past-year monthly
  average, totals (flights, flight/tach time, average and longest
  flight, fuel, gal/hr, airports visited, most visited) and a by-year
  table.
- Flight time is Hobbs time where recorded, otherwise tach time.

Removed the per-aircraft DRS search link and its "Open in DRS" button:
each AD's DRS link already comes from the Excel import. A guarded
migration drops the column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-05 18:52:00 -05:00
1 parent b75fd7cf62
commit 0c4803d717
15 files changed
+221 -23

No files matched your search

-2
View File
@@ -28,8 +28,6 @@ class Aircraft < ApplicationRecord
validates :tail_number, presence: true
validates :status, inclusion: { in: STATUSES.keys }
validates :drs_search_url, format: { with: %r{\Ahttps://drs\.faa\.gov/\S*\z}, message: "must be a https://drs.faa.gov/ link" }, allow_blank: true
normalizes :drs_search_url, with: ->(url) { url.strip.sub(/#.*\z/, "").presence }
validate :picture_is_image
scope :ordered, -> { order(:tail_number) }