Workflow polish: setup checklist, next leg, grouped component limits

- Setup checklist on a new aircraft's Overview (owners): components,
  standard inspections, DRS AD import, registration/airworthiness
  certificate, weight and balance; hideable per device
- Log Flight: "Save and log next leg" reopens the form on the same date,
  starting where the leg ended
- Component form: limits in two collapsible groups (replacement and expiry;
  overhaul and TBO), open when in use
- Squawk form warns what "Ground Aircraft" does
- Logbook entry form: inspection result only for inspection entries
  (show-when controller); document names default from the file
- Dates in pickers, the activity log, airworthiness lines, search, audits
  and transcription notes use the app format
- No duplicate Report Squawk button on Squawks; "Record service" label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-14 07:43:03 -05:00
1 parent 3452a35896
commit 03b9ad65cb
34 files changed
+303 -77

No files matched your search

+6 -6
View File
@@ -95,7 +95,7 @@ class Airworthiness
end
@aircraft.squawks.deferred.find_each do |squawk|
add("DEFERRED", INFO, t(:inoperative, issue: squawk.issue_reported.to_s.truncate(80)),
t(:deferred, date: squawk.deferred_at.to_date, name: squawk.deferred_by_name), squawk)
t(:deferred, date: I18n.l(squawk.deferred_at.to_date, format: :app), name: squawk.deferred_by_name), squawk)
end
end
@@ -134,9 +134,9 @@ class Airworthiness
grounds = Document::GROUNDING_EXPIRY_TYPES.include?(doc.doc_type)
if doc.expired?(@today)
add("DOCUMENT", grounds ? RED : ORANGE, t(:expired_title, name: doc.name),
t(grounds ? :document_expired_grounds : :document_expired, type: doc.type_label, date: doc.expires_on), doc)
t(grounds ? :document_expired_grounds : :document_expired, type: doc.type_label, date: I18n.l(doc.expires_on, format: :app)), doc)
elsif @today + doc.expiry_warning_days >= doc.expires_on
add("DOCUMENT", ORANGE, t(:expires_soon_title, name: doc.name), t(:document_expires, type: doc.type_label, date: doc.expires_on), doc)
add("DOCUMENT", ORANGE, t(:expires_soon_title, name: doc.name), t(:document_expires, type: doc.type_label, date: I18n.l(doc.expires_on, format: :app)), doc)
end
end
end
@@ -163,7 +163,7 @@ class Airworthiness
if c.replacement_critical? && (due = c.next_replacement_date)
if @today >= due
overdue = true
desc = t(c.replacement_from_install? ? :replace_every_installed : :replace_every_serviced, interval: c.replacement_interval_label, date: c.replacement_counted_from)
desc = t(c.replacement_from_install? ? :replace_every_installed : :replace_every_serviced, interval: c.replacement_interval_label, date: c.replacement_counted_from && I18n.l(c.replacement_counted_from, format: :app))
elsif @today + DAYS_WARNING >= due
approaching = true
desc = t(:replace_in_days, count: (due - @today).to_i)
@@ -174,11 +174,11 @@ class Airworthiness
if c.expires_on
if c.expired?(@today)
expired = true
desc = t(:component_expired, date: c.expires_on)
desc = t(:component_expired, date: I18n.l(c.expires_on, format: :app))
elsif @today + DAYS_WARNING >= c.expires_on
approaching = true
expiring = true
desc = t(:component_expires, date: c.expires_on)
desc = t(:component_expires, date: I18n.l(c.expires_on, format: :app))
end
end