mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Unverified transcriptions, PM templates, ICA inspections, W&B, AD watch
- Entries transcribed by Claude are unverified (with Claude's confidence) until an owner checks them against the scan: badge, filter, "mark verified" stepping through the rest - Preventive maintenance templates on new logbook entries, keyed to Part 43 Appendix A(c), setting the entry type and pilot certificate (43.3(g)) - An STC's ICA can become a tracked recurring inspection, linked from its major record - Weight & balance: history of empty weight/CG (linked to the 337 that changed them), loading stations and CG envelope from the POH, and a live calculator for takeoff and landing weight/CG; shown on the status report - New ADs: weekly Federal Register search per aircraft (aircraft, engine and propeller models, or custom terms); track or dismiss each; included in the weekly reminder - Archives carry the new records; brakeman: explicit params, reviewed About-page links Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bed07386ef
commit
6cab81332e
49 files changed
+1197
-35
No files matched your search
@@ -1,16 +1,28 @@
|
||||
class LogbookEntriesController < ApplicationController
|
||||
include AircraftScoped
|
||||
before_action :require_owner!, except: %i[index show]
|
||||
before_action :set_entry, only: %i[show edit update destroy]
|
||||
before_action :set_entry, only: %i[show edit update destroy verify]
|
||||
|
||||
def index
|
||||
@query = params[:q]
|
||||
@log_type = params[:log_type].presence
|
||||
scope = @aircraft.logbook_entries.search(@query).recent_first.includes(:document)
|
||||
scope = scope.where(log_type: @log_type) if @log_type
|
||||
@unverified_only = params[:unverified] == "1"
|
||||
scope = scope.unverified if @unverified_only
|
||||
@unverified_count = @aircraft.logbook_entries.unverified.count
|
||||
@entries = scope.limit(500)
|
||||
end
|
||||
|
||||
# Someone has checked a transcribed entry against the scan.
|
||||
def verify
|
||||
@entry.update!(verified: true)
|
||||
log_event("logbook", "Transcribed logbook entry verified: #{@entry.date}")
|
||||
next_entry = @aircraft.logbook_entries.unverified.order(:date, :id).first
|
||||
redirect_to next_entry ? aircraft_logbook_entry_path(@aircraft, next_entry) : aircraft_logbook_entries_path(@aircraft),
|
||||
notice: next_entry ? "Verified. Here's the next one to check." : "Verified. All transcribed entries are checked."
|
||||
end
|
||||
|
||||
def show; end
|
||||
|
||||
def new
|
||||
@@ -51,7 +63,7 @@ class LogbookEntriesController < ApplicationController
|
||||
def entry_params
|
||||
p = params.require(:logbook_entry).permit(:log_type, :entry_type, :date, :text, :signoff_person,
|
||||
:signoff_location, :aircraft_hours_at_entry, :document_id, :page_number,
|
||||
:signoff_certificate_type, :signoff_certificate_number, :inspection_result)
|
||||
:signoff_certificate_type, :signoff_certificate_number, :inspection_result, :verified)
|
||||
p[:document_id] = scoped_id(@aircraft.documents, p[:document_id])
|
||||
p
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user