mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Editable logbook templates; component times follow the airframe time
- Templates move to the database (Admin -> Logbook templates: add, edit, delete, restore the built-in ones). The built-in preventive maintenance set is added once on first use; deletions stick. A template can set the entry type, logbook (picking the matching component) and certificate - Template list shows "Name — Part 43 App. A (c)(6), (c)(23)" instead of the doubled parentheses - Component total time and time since overhaul are worked out from the entry's airframe total time (current times shifted by the difference); blank when the entry predates the overhaul; typing them stops the automatic updates Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a51f78ebf3
commit
72e1d7760f
22 files changed
+366
-74
No files matched your search
@@ -6,7 +6,8 @@
|
||||
# Setting.max_upload_bytes # => 52428800
|
||||
class Setting < ApplicationRecord
|
||||
INTEGERS = {
|
||||
"max_upload_mb" => { default: 50, in: 1..1024, label: "Maximum upload size (MB)" }
|
||||
"max_upload_mb" => { default: 50, in: 1..1024, label: "Maximum upload size (MB)" },
|
||||
"logbook_templates_seeded" => { default: 0, in: 0..1, label: "Built-in logbook templates added" } # internal flag
|
||||
}.freeze
|
||||
|
||||
validates :key, presence: true, uniqueness: true, inclusion: { in: INTEGERS.keys }
|
||||
|
||||
Reference in new issue
Block a user