mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Track oil analysis reports; import AvLab PDFs
New Oil Analysis tab: one record per oil sample with dates, hours, the lab's verdict and comments, ppm results for 12 wear metals with the lab's averages, and the report PDF. Shows wear-metal trends, a side-by-side history table, and flags readings 1.5x or more above the lab average. AvLab report PDFs can be imported: every sample on the report (current and previous) is added unless already recorded, the engine is matched by serial number, and reports for another tail number are refused. The parser reads positioned text and drops the hidden color-code layer that overlaps results. Adds the pdf-reader gem. Test fixture is a rebuilt report with a dummy header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6c6e7af8e6
commit
d519aa9aae
24 files changed
+3456
-2
No files matched your search
@@ -24,6 +24,7 @@ class PagesTest < ActionDispatch::IntegrationTest
|
||||
@major = @a.major_records.create!(record_type: "alteration", title: "LED lights", date_performed: Date.current)
|
||||
@flight = @a.flight_logs.create!(date: Date.current, tach_time: 1.2)
|
||||
@cr = @a.consumable_records.create!(record_type: "oil", date: Date.current, quantity_added: 1, flight_hours: 1000)
|
||||
@oa = @a.oil_analyses.create!(sample_date: Date.current, iron: 30, iron_avg: 35)
|
||||
@token = @a.share_tokens.create!(privilege: "maintenance", label: "Mechanic")
|
||||
@a.log_event!("aircraft", "Created", user: @owner)
|
||||
sign_in @owner
|
||||
@@ -39,6 +40,7 @@ class PagesTest < ActionDispatch::IntegrationTest
|
||||
aircraft_notes_path(a), new_aircraft_note_path(a), edit_aircraft_note_path(a, @note),
|
||||
aircraft_flight_logs_path(a), new_aircraft_flight_log_path(a), aircraft_flight_log_path(a, @flight),
|
||||
aircraft_consumable_records_path(a), new_aircraft_consumable_record_path(a, type: "fuel"), edit_aircraft_consumable_record_path(a, @cr),
|
||||
aircraft_oil_analyses_path(a), new_aircraft_oil_analysis_path(a), aircraft_oil_analysis_path(a, @oa), edit_aircraft_oil_analysis_path(a, @oa),
|
||||
aircraft_logbook_entries_path(a), aircraft_logbook_entries_path(a, q: "oil", log_type: "AC"),
|
||||
new_aircraft_logbook_entry_path(a), aircraft_logbook_entry_path(a, @entry), edit_aircraft_logbook_entry_path(a, @entry),
|
||||
aircraft_documents_path(a), new_aircraft_document_path(a), aircraft_document_path(a, @doc), edit_aircraft_document_path(a, @doc),
|
||||
|
||||
Reference in new issue
Block a user