diff --git a/README.md b/README.md
index 89d27c1..9629e9f 100644
--- a/README.md
+++ b/README.md
@@ -110,6 +110,7 @@ To back up or move a single aircraft with all its files, use **Access & Sharing
| Documents | Collections, multi-file documents with a page viewer, per-document share visibility, bulk upload, and expiration dates (registration, insurance…). |
| Electronic signatures | Logbook entries can be signed electronically along the lines of AC 120-78B chapter 2: the signer reviews the entry, picks their certificate, re-enters their password (or signs in again with SSO) and confirms a "Certified by" statement. The signature records who, which certificate, the statement, the time and a SHA-256 fingerprint of the entry, sealed by the server; the signer gets an email. Signed entries are locked: a correction is a new signed entry that supersedes the original. Owners can invite an outside mechanic to sign one entry with their own account. Disabled accounts can't sign; their past signatures stay. |
| Records integrity | Every change to maintenance records is kept (who, when, field by field) in a hash chain per aircraft (Activity → Record history). Nightly: a verified SQLite backup in `storage/backups` (how many are kept: Admin → Settings), then a check of the history chains and every signature; admins are emailed on a problem (Admin → About). Software versions are recorded. A records package (Access & Sharing) bundles every entry as a PDF with signatures, a signature register, the history, the status report and the `.sam.zip` for the FAA or a buyer. Scans of paper logbooks can be marked as legacy records, with an "electronic records since" date per aircraft. |
+| Recordkeeping procedures and audits | Admin → Recordkeeping Procedures generates the procedures document AC 120-78B asks for (who is responsible, who may sign, signing, corrections, backups, access, audits, transfer, legacy records) from the system setup plus a few details you fill in; adopt it as numbered, unchangeable revisions, included in the records package. Admin → Records Audits is a periodic QC checklist (app checks plus a restore test, a sample of entries against source documents and a user review); admins get the due date in the weekly reminder. Users' instructions are at `/help/records`, linked from the logbook and the signing page. |
| Major repairs and alterations | Form 337, STC, and ICA tracking; an STC's ICA can become a tracked recurring inspection. |
| Weight & balance | History of empty weight and CG (linked to the alteration that changed them) and a loading calculator: takeoff and landing weight and CG against max gross and the CG envelope. |
| Status report | A printable maintenance status (91.417(a)(2)): total times, life-limited parts, time since overhaul, inspections, ADs with method and revision, major alterations, open discrepancies. Also on maintenance share links. |
diff --git a/app/controllers/admin/audits_controller.rb b/app/controllers/admin/audits_controller.rb
new file mode 100644
index 0000000..bd18c18
--- /dev/null
+++ b/app/controllers/admin/audits_controller.rb
@@ -0,0 +1,21 @@
+class Admin::AuditsController < ApplicationController
+ before_action :require_admin!
+
+ def index
+ @audits = AuditRun.latest_first.includes(:performed_by)
+ end
+
+ def new
+ @audit = RecordsAudit.new
+ end
+
+ def create
+ answers = params.fetch(:answers, {}).permit(RecordsAudit::MANUAL.keys.index_with { %i[passed note] }).to_h
+ run = RecordsAudit.new.record!(user: current_user, answers: answers, notes: params[:notes], sample_ids: Array(params[:sample_ids]).map(&:to_i))
+ redirect_to admin_audit_path(run), notice: run.passed ? "Audit recorded: everything passed." : "Audit recorded, with items that didn't pass. Note what's being done about them."
+ end
+
+ def show
+ @audit = AuditRun.find(params[:id])
+ end
+end
diff --git a/app/controllers/admin/procedures_controller.rb b/app/controllers/admin/procedures_controller.rb
new file mode 100644
index 0000000..8f21a1e
--- /dev/null
+++ b/app/controllers/admin/procedures_controller.rb
@@ -0,0 +1,52 @@
+# The electronic signature and recordkeeping procedures document
+# (AC 120-78B 2.2.11 / 3.2.8): the owner fills in what the app can't know,
+# reviews the generated draft, and adopts it as a numbered revision.
+class Admin::ProceduresController < ApplicationController
+ before_action :require_admin!
+
+ def show
+ @policy = RecordkeepingPolicy.current
+ @revisions = ProceduresRevision.latest_first.includes(:adopted_by)
+ end
+
+ def update
+ @policy = RecordkeepingPolicy.current
+ if @policy.update(params.require(:recordkeeping_policy).permit(:operator_name, :responsible_name, :responsible_title, :hosting_description,
+ :offsite_backup_description, :audit_interval_months, :audit_sample_size,
+ :additional_procedures))
+ redirect_to admin_procedures_path, notice: "Saved. Review the draft and adopt it as a new revision when it's right."
+ else
+ @revisions = ProceduresRevision.latest_first
+ render :show, status: :unprocessable_entity
+ end
+ end
+
+ # The current draft, printable.
+ def draft
+ render html: draft_html.html_safe, layout: "report"
+ end
+
+ def adopt
+ policy = RecordkeepingPolicy.current
+ return redirect_to(admin_procedures_path, alert: "Fill in the operator, responsible person, hosting and off-site backup first.") unless policy.complete?
+ number = (ProceduresRevision.maximum(:number) || 0) + 1
+ revision = ProceduresRevision.create!(number: number, adopted_by: current_user, adopted_at: Time.current,
+ summary: params[:summary].to_s.strip.first(500).presence || "Revision #{number}",
+ content: draft_html(number: number, summary: params[:summary].to_s.strip.first(500)))
+ redirect_to admin_procedures_path, notice: "Revision #{revision.number} adopted. Print it or keep the PDF with your records."
+ end
+
+ def revision
+ @revision = ProceduresRevision.find(params[:id])
+ render html: @revision.content.html_safe, layout: "report"
+ end
+
+ private
+
+ def draft_html(number: nil, summary: nil)
+ render_to_string(partial: "admin/procedures/document",
+ locals: { policy: RecordkeepingPolicy.current, number: number || "#{(ProceduresRevision.maximum(:number) || 0) + 1} (draft)",
+ adopted_at: number ? Time.current : nil, adopted_by: number ? current_user : nil,
+ revisions: ProceduresRevision.latest_first.to_a, summary: summary })
+ end
+end
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
new file mode 100644
index 0000000..13db097
--- /dev/null
+++ b/app/controllers/help_controller.rb
@@ -0,0 +1,4 @@
+# User instructions for electronic records and signatures (AC 120-78B 2.2.12, 3.2.9).
+class HelpController < ApplicationController
+ def records; end
+end
diff --git a/app/mailers/reminder_mailer.rb b/app/mailers/reminder_mailer.rb
index 09c600a..7d20eff 100644
--- a/app/mailers/reminder_mailer.rb
+++ b/app/mailers/reminder_mailer.rb
@@ -8,15 +8,18 @@ class ReminderMailer < ApplicationMailer
def self.expiring_certificates_for(user) = user.certificates.expiring.to_a
- def self.anything_for?(user) = items_for(user).any? || expiring_certificates_for(user).any?
+ def self.audit_due_for?(user) = user.admin? && AuditRun.due_soon?
+
+ def self.anything_for?(user) = items_for(user).any? || expiring_certificates_for(user).any? || audit_due_for?(user)
def weekly(user)
@user = user
@items = self.class.items_for(user)
@certificates = self.class.expiring_certificates_for(user)
+ @audit_due = self.class.audit_due_for?(user) && AuditRun.next_due
overdue = @items.sum { |_, issues, _| issues.count { _1.severity.in?(%w[RED LIMITED]) } }
subject = overdue.positive? ? "#{overdue} #{'item'.pluralize(overdue)} overdue" : "Maintenance coming due"
- subject = "Certificate expiring" if @items.empty?
+ subject = (@certificates.any? ? "Certificate expiring" : "Records audit due") if @items.empty?
mail subject: [ subject, @items.map { _1.first.tail_number }.to_sentence.presence ].compact.join(": "), to: user.email_address
end
end
diff --git a/app/models/audit_run.rb b/app/models/audit_run.rb
new file mode 100644
index 0000000..91739e3
--- /dev/null
+++ b/app/models/audit_run.rb
@@ -0,0 +1,18 @@
+# A quality-control audit of the electronic records (AC 120-78B 3.2.8.5):
+# a checklist, some items checked by the app, some confirmed by the auditor.
+class AuditRun < ApplicationRecord
+ belongs_to :performed_by, class_name: "User", optional: true
+
+ scope :latest_first, -> { order(performed_at: :desc) }
+ before_update { throw :abort }
+ before_destroy { throw :abort }
+
+ def self.latest = latest_first.first
+
+ def self.next_due
+ interval = RecordkeepingPolicy.current.audit_interval_months.months
+ (latest&.performed_at || Time.current - interval).to_date + interval
+ end
+
+ def self.due_soon? = next_due <= 14.days.from_now.to_date
+end
diff --git a/app/models/procedures_revision.rb b/app/models/procedures_revision.rb
new file mode 100644
index 0000000..c2f0f19
--- /dev/null
+++ b/app/models/procedures_revision.rb
@@ -0,0 +1,11 @@
+# An adopted revision of the procedures document, kept for good (the
+# superseded ones are the archive, as AC 120-78B 4.3.8 asks of manuals).
+class ProceduresRevision < ApplicationRecord
+ belongs_to :adopted_by, class_name: "User", optional: true
+
+ scope :latest_first, -> { order(number: :desc) }
+ before_update { throw :abort }
+ before_destroy { throw :abort }
+
+ def self.current = latest_first.first
+end
diff --git a/app/models/recordkeeping_policy.rb b/app/models/recordkeeping_policy.rb
new file mode 100644
index 0000000..001d6e5
--- /dev/null
+++ b/app/models/recordkeeping_policy.rb
@@ -0,0 +1,11 @@
+# The facts the procedures document needs that the app can't know (who is
+# responsible, where it's hosted, the off-site backup, how often to audit).
+# One row for the installation.
+class RecordkeepingPolicy < ApplicationRecord
+ validates :audit_interval_months, numericality: { only_integer: true, in: 1..24 }
+ validates :audit_sample_size, numericality: { only_integer: true, in: 1..50 }
+
+ def self.current = first || create!
+
+ def complete? = [ operator_name, responsible_name, hosting_description, offsite_backup_description ].all?(&:present?)
+end
diff --git a/app/services/records_audit.rb b/app/services/records_audit.rb
new file mode 100644
index 0000000..0a0c001
--- /dev/null
+++ b/app/services/records_audit.rb
@@ -0,0 +1,70 @@
+# The QC audit checklist (AC 120-78B 3.2.8.5): items the app checks itself,
+# and items the auditor confirms (restore test, comparing a sample of entries
+# with their source documents, reviewing users).
+class RecordsAudit
+ Item = Data.define(:key, :title, :auto, :passed, :detail)
+
+ MANUAL = {
+ "restore_test" => "Restored the latest off-site backup somewhere separate and opened it (records readable, counts plausible)",
+ "sample" => "Compared the sampled entries below with their work orders, receipts or other source documents; they match",
+ "users" => "Reviewed the users and roles below; accounts of people who no longer need access are disabled",
+ "legacy" => "The paper (legacy) logbooks are kept, complete and accounted for"
+ }.freeze
+
+ def initialize(since: AuditRun.latest&.performed_at)
+ @since = since
+ @policy = RecordkeepingPolicy.current
+ end
+
+ def auto_items
+ check = IntegrityCheck.latest
+ backup = BackupRun.latest
+ revision = ProceduresRevision.current
+ expired = UserCertificate.joins(:user).merge(User.active).where(expires_on: ...Date.current)
+ [
+ Item.new("integrity", "Records integrity check passed in the last 2 days", true,
+ check.present? && check.ok && check.created_at > 2.days.ago,
+ check ? "#{check.created_at.to_date}: #{check.ok ? 'no problems' : check.problems.first(3).join('; ')}" : "Never run"),
+ Item.new("backup", "A verified database backup was made in the last 2 days", true,
+ backup.present? && backup.ok && backup.created_at > 2.days.ago,
+ backup ? "#{backup.created_at.to_date}: #{backup.message}" : "Never run"),
+ Item.new("procedures", "The procedures document is adopted and its details filled in", true,
+ revision.present? && @policy.complete?,
+ revision ? "Revision #{revision.number}, adopted #{revision.adopted_at.to_date}" : "Not adopted yet"),
+ Item.new("signatures", "Electronic signatures since the last audit are intact", true,
+ check.present? && check.ok, "#{signatures_since.count} signed since #{since_label}"),
+ Item.new("certificates", "No active user is relying on an expired certificate", true, true,
+ expired.any? ? "Expired (can't sign until renewed): #{expired.map { "#{_1.user.display_name} #{_1.short_label}" }.join(', ')}" : "None expired"),
+ Item.new("versions", "Software versions since the last audit", true, true,
+ versions_since.map(&:revision).join(", ").presence || "No changes")
+ ]
+ end
+
+ # Entries to compare with source documents: a random few since the last audit, signed ones first.
+ def sample
+ pool = LogbookEntry.where(created_at: (@since || Time.at(0))..).includes(:aircraft, :signature)
+ signed = pool.joins(:signature).order(Arel.sql("RANDOM()")).limit(@policy.audit_sample_size).to_a
+ (signed + pool.where.not(id: signed.map(&:id)).order(Arel.sql("RANDOM()")).limit(@policy.audit_sample_size - signed.size).to_a).first(@policy.audit_sample_size)
+ end
+
+ def users = User.order(:email_address).includes(:certificates, aircraft_roles: :aircraft)
+
+ # Saves the audit from the auditor's answers: { key => { "passed" => "1", "note" => … } }.
+ def record!(user:, answers:, notes:, sample_ids:)
+ autos = auto_items
+ manual = MANUAL.map do |key, title|
+ a = answers.fetch(key, {})
+ { "key" => key, "title" => title, "auto" => false, "passed" => a["passed"] == "1", "detail" => a["note"].to_s.strip.first(1000) }
+ end
+ results = autos.map { { "key" => _1.key, "title" => _1.title, "auto" => true, "passed" => _1.passed, "detail" => _1.detail } } + manual
+ results << { "key" => "sample_entries", "title" => "Entries sampled", "auto" => true, "passed" => true,
+ "detail" => LogbookEntry.where(id: sample_ids).includes(:aircraft).map { "#{_1.aircraft.tail_number} #{_1.date}" }.join(", ") }
+ AuditRun.create!(performed_by: user, performed_at: Time.current, passed: results.all? { _1["passed"] }, results: results, notes: notes.to_s.strip.first(5000))
+ end
+
+ private
+
+ def since_label = @since ? @since.to_date.to_s : "the start"
+ def signatures_since = EntrySignature.where(signed_at: (@since || Time.at(0))..)
+ def versions_since = AppRevision.where(first_seen_at: (@since || Time.at(0))..).order(:first_seen_at)
+end
diff --git a/app/services/records_package.rb b/app/services/records_package.rb
index bd87143..7e0cb9d 100644
--- a/app/services/records_package.rb
+++ b/app/services/records_package.rb
@@ -22,6 +22,9 @@ class RecordsPackage
add(zip, "signatures.csv", signatures_csv(entries))
add(zip, "record-history.csv", history_csv)
add(zip, "status-report.html", status_report_html)
+ if (revision = ProceduresRevision.current)
+ add(zip, "recordkeeping-procedures.html", standalone_html(revision.content, "Recordkeeping procedures, revision #{revision.number}"))
+ end
archive = Tempfile.new([ "archive", ".sam.zip" ])
AircraftArchive::Exporter.new(@aircraft, source: @source).write_to(archive.path)
zip.put_next_entry("#{@aircraft.tail_number.downcase}.sam.zip")
@@ -55,6 +58,7 @@ class RecordsPackage
- record-history.csv Every change to the maintenance records (created, changed, deleted), with who and when.
- status-report.html Maintenance status per 14 CFR 91.417(a)(2): times, life-limited parts, inspections, ADs, alterations.
- #{@aircraft.tail_number.downcase}.sam.zip All records and files as data, to load into another system.
+ - recordkeeping-procedures.html How these electronic records and signatures are kept (AC 120-78B), current adopted revision.
Signatures
Each electronic signature records who signed, with which certificate, what they certified, when, and a SHA-256
@@ -91,8 +95,14 @@ class RecordsPackage
# The status report as one self-contained HTML file (styles inlined).
def status_report_html
- html = ApplicationController.render("maintenance_reports/show", layout: "report",
- assigns: { report: MaintenanceReport.new(@aircraft) })
+ inline_styles(ApplicationController.render("maintenance_reports/show", layout: "report", assigns: { report: MaintenanceReport.new(@aircraft) }))
+ end
+
+ def standalone_html(body, title)
+ inline_styles(ApplicationController.render(html: body.html_safe, layout: "report", assigns: {}).sub(%r{
Quality-control audits of the electronic records (AC 120-78B 3.2.8.5), every <%= RecordkeepingPolicy.current.audit_interval_months %> months. Next due <%= AuditRun.next_due %>.
Revision <%= number %><%= adopted_at ? " · adopted #{adopted_at.to_date.iso8601} by #{adopted_by&.display_name}" : " · not yet adopted" %>
+
+
+
1. Purpose and scope
+
These procedures describe how <%= policy.operator_name.presence || "[Operator]" %> keeps the maintenance records required by 14 CFR 91.417 electronically in Simple Aircraft Manager, and how entries are signed electronically under 14 CFR 43.9 and 43.11. They follow FAA AC 120-78B. Under its paragraph 1.9.5, use of electronic signatures and recordkeeping under part 91 (other than subpart K) needs no FAA approval, acceptance or authorization; the FAA recommends following the AC, and these procedures do.
Paper logbooks<%= " (scans held as legacy records)" if a.documents.where(legacy_record: true).exists? %>
+ <% end %>
+
+
+
Records kept electronically: logbook entries (maintenance, preventive maintenance, inspections, alterations), inspection status and history, airworthiness directive compliance, component times and life limits, major repairs and alterations with their Form 337s, weight and balance, and supporting documents. Paper logbooks from before the date above remain the record for that period and are kept.
+
+
2. Regulatory compliance
+
Each logbook entry carries what 14 CFR 43.9 requires (description of the work, date, the name, certificate number and kind of certificate of the person approving return to service, and their signature) and, for inspections, what 43.11 requires (type and extent of inspection, aircraft time in service, and the airworthiness statement or discrepancy list). The app flags entries missing any of these. Records include the key elements of AC 120-78B 3.1.1: the event, when (date, and the signature's time), where (location), who, the signature, and the make, model and serial of the aircraft, engine, propeller and components. The status required by 91.417(a)(2) is produced by the maintenance status report. Records are made available under 91.417(c) and transferred under 91.419 as described in sections 9 and 10.
Hosting and network: <%= policy.hosting_description.presence || "[describe the server, location and network]" %> Access is over HTTPS<%= " with single sign-on (#{Sso.label})" if Sso.enabled? %>.
+
Data: one SQLite database plus uploaded files (stored once per identical file) on the server's storage volume.
+
Backups: every night the app makes a verified copy of the database in the storage volume (SQLite integrity check and record counts compared) and keeps the newest <%= Setting.integer("backups_kept") %>. Off-site: <%= policy.offsite_backup_description.presence || "[describe the off-site backup]" %>
+
+
+
4. Responsible personnel
+
<%= policy.responsible_name.presence || "[Name]" %><%= ", #{policy.responsible_title}" if policy.responsible_title.present? %>, has authority and overall responsibility for the electronic signature process and the recordkeeping system, for controlling access to it (accounts, roles, disabling accounts), and for the quality-control audits. Administrators: <%= users.select(&:admin?).reject(&:disabled?).map(&:display_name).to_sentence.presence || "none" %>.
+
+
5. Defined users and roles
+
Owners keep an aircraft's records; pilots can view them and record flights, squawks and preventive maintenance. A user may sign entries with a current certificate on their profile: mechanic certificates (A&P, IA, airframe, powerplant, repair station, repairman) for maintenance and inspection entries; a pilot certificate for preventive maintenance only. Disabled accounts can't sign in or sign.
+
+
User
Roles
Certificates
May sign
+
+ <% users.each do |u| %>
+ <% current = u.certificates.reject(&:expired?) %>
+
<%= u.display_name %>
<%= u.email_address %>
+
<%= [ ("Administrator" if u.admin?), *u.aircraft_roles.map { "#{_1.role.capitalize}, #{_1.aircraft.tail_number}" } ].compact.join("; ").presence || "—" %><%= " (DISABLED)" if u.disabled? %>
<%= if u.disabled? || current.empty? then "No"
+ elsif current.any?(&:mechanic?) then "Maintenance and inspection entries"
+ else "Preventive maintenance entries" end %>
+ <% end %>
+
+
+
People outside these users (e.g. a mechanic who did the work) sign through a one-time email invitation from an owner, with their own account and certificate, for that entry only; or they sign on paper (section 11).
+
+
6. Electronic signature process
+
+
The signer opens the entry and chooses Sign. The entry is shown in full exactly as it will be certified (AC 2.2.4).
+
They choose one of their own current certificates. The statement they will certify is shown with it, under the heading “Certified by” (2.2.2): for maintenance, “I certify that the work described in this entry was performed in accordance with 14 CFR Part 43, and I approve it for return to service with respect to that work”; for inspections, the 43.11(a)(5) statement; for preventive maintenance by a pilot, the corresponding statement.
+
They prove who they are again: their password, or signing in again with single sign-on within the last five minutes (2.2.6), and confirm that they are signing with intent to sign (2.1.2.4–5).
+
The system records the signer, the certificate (kind and number), the statement, the time (UTC), how they authenticated, their network address and browser, a SHA-256 fingerprint of the entry's content and a readable copy of it, and a server seal (HMAC) over the signature record (2.1.2.6, 2.2.5). The signer is told on screen and by email (2.2.3).
+
Once signed, the entry and its components can't be edited or deleted (2.1.2.7–8, 2.2.7). A correction is made as a new entry that, once signed, supersedes the original; the original and its signature are kept and marked superseded (2.2.8).
+
When someone no longer needs access, the responsible person disables their account: they can no longer sign in or sign, and their past signatures stay valid (2.2.6.4).
+
+
Signed records are archived in the database, its nightly verified copies and the off-site backup, and can be exported with their signatures (2.2.9).
+
+
7. Recordkeeping system controls
+
+
Controlled access (3.2.1): personal accounts; roles per aircraft; sessions end after 30 days unused; rate-limited sign-in; changing an email or password needs the current password.
+
Record preservation (3.2.2): every change to a maintenance record is kept with who, when and what changed, in a hash chain per aircraft that can't be edited; signed entries are locked.
+
Confidential information (3.2.3): records are visible only to the aircraft's users, and to share links an owner creates (scoped and optionally expiring).
+
Data corruption (3.2.4): nightly, the history chains and every signature's seal and fingerprint are checked; administrators are emailed on any problem.
+
Outages (3.2.5): entries are made on paper and signed in ink during an outage (section 13); the database is restored from the latest verified copy or the off-site backup.
+
Software revision control (3.2.6): the software is updated by deploying a new version built from its source repository; each version and when it ran is recorded by the system. Before an update that changes how records are entered, displayed or accessed, the responsible person reviews it, and these procedures are revised if they're affected.
+
Backups (3.2.7): see section 3.
+
+
+
8. Quality control and auditing
+
Every <%= policy.audit_interval_months %> months the responsible person carries out and records an audit in the system (3.2.8.5). The app checks that the integrity check and backups are passing, the procedures are adopted, signatures are intact, and lists expired certificates and software versions since the last audit. The auditor restores the off-site backup somewhere separate and opens it, compares <%= policy.audit_sample_size %> randomly chosen entries with their work orders or source documents, reviews the users and roles (disabling accounts no longer needed), and confirms the paper logbooks are kept. Audit results are kept in the system.<%= " Last audit: #{AuditRun.latest.performed_at.to_date}." if AuditRun.latest %>
+
+
9. Making records available to the FAA and NTSB
+
On request (14 CFR 91.417(c), 49 CFR 830), the responsible person provides the records package for the aircraft: every logbook entry as a PDF with its electronic signature, a signature register, the full change history, the maintenance status report and the data archive, with a README. Printed copies are produced the same way. Direct access to the system can be offered but isn't required (3.2.8.6).
+
+
10. Transfer of records
+
At sale (91.419, 3.2.8.12): the buyer receives the records package and the data archive, which another installation of the system can import, together with the paper logbooks. To another system (3.2.8.9): records are exported as the data archive and the records package; both systems run side by side until the transfer is checked.
+
+
11. Continuity
+
Legacy records (3.2.8.10): records before the dates in section 1 are the paper logbooks, which are kept; scans are held as legacy records for reference. Maintenance providers (3.2.8.11): a provider signs electronically through an invitation, or signs a printed entry in ink; the signed paper is kept with the logbooks and scanned into the system.
+
+
12. Changes to the system and these procedures
+
These procedures are revised when the system or its use changes. Each revision is numbered, dated and adopted in the system by an administrator; earlier revisions are kept. Under AC 120-78B 1.9.5 no submission to the FAA is required for part 91 operations (3.2.8.13).
+
+
13. User instructions and training
+
Every user who keeps or signs records reads these instructions (also in the system under “How electronic records work”) before signing (2.2.12, 3.2.9).
+
<%= render "help/records_content" %>
+
+ <% if policy.additional_procedures.present? %>
+
The standalone procedures document AC 120-78B asks for (paragraphs 2.2.11 and 3.2.8): how signatures and records work here, who's responsible, who may sign, backups, audits, and how records are produced and transferred. It's generated from the system's setup; fill in what the app can't know, review the draft, and adopt it as a revision. Adopt a new revision whenever users, hosting or procedures change.
+ <%= f.field :hosting_description, as: :textarea, rows: 2, label: "Hosting and network",
+ placeholder: "Self-hosted on a server at the owner's home, behind a firewall and an authenticating proxy." %>
+ <%= f.field :offsite_backup_description, as: :textarea, rows: 2, label: "Off-site backup",
+ placeholder: "The storage volume is backed up nightly with restic to an encrypted off-site repository; retention 30 days." %>
+
Review the entry: your signature will cover exactly what's shown here, and it can't be changed afterwards. A mistake is fixed with a correction entry.
+
Review the entry: your signature will cover exactly what's shown here, and it can't be changed afterwards. A mistake is fixed with a correction entry. <%= link_to "How signing works", records_help_path, class: "link", target: "_blank" %>
<%= render "logbook_entries/content", entry: entry %>
<% if @signing_error %>
<%= @signing_error %>
diff --git a/app/views/help/_records_content.html.erb b/app/views/help/_records_content.html.erb
new file mode 100644
index 0000000..074a0ac
--- /dev/null
+++ b/app/views/help/_records_content.html.erb
@@ -0,0 +1,21 @@
+<%# User instructions for electronic records (also an appendix of the procedures document). %>
+
+
Writing an entry
+
On the aircraft's Logbook tab, choose + New Entry. Give the date, the logbook (aircraft, engine, propeller), the airframe total time, and what was done; for an engine or propeller entry pick the component (its times fill in) and tick any sub-components. A template can start the wording. An entry isn't a signed record until it's signed.
+
Signing
+
+
Add your certificate (kind and number) once, on your profile.
+
Open the entry and choose Sign. Read the entry as shown: your signature covers exactly that.
+
Pick the certificate you're signing with. The statement you'll certify is shown with it (return to service, or the inspection statement).
+
Re-enter your password, or sign in again with single sign-on, tick the confirmation and choose Sign entry. You'll see a confirmation and get an email.
+
+
Never share your password or let someone else sign while you're signed in: a signature is yours alone. If you think someone has, tell the administrator straight away.
+
Mistakes
+
A signed entry can't be edited or deleted. Open it and choose Correct this entry: a new entry starts from the original; fix it, save, and sign it. The original stays, marked “Superseded by a correction”.
+
Someone else did the work
+
The owner can choose Ask someone to sign on the entry: the mechanic gets a one-time email link, signs in or creates their own account, adds their certificate and signs. If they prefer paper, print the entry (Print for logbook), have it signed in ink, and keep the paper with the logbooks (scan it into Documents).
+
Checking a record
+
A signed entry shows who certified it, with which certificate, when (UTC), what they certified, and its status. Valid means nothing has changed since signing. The fingerprint (a SHA-256 of the entry) is printed on paper copies so a copy can be matched to the record. Every change to any record is kept under Activity → Record history.
+
If the system is down
+
Make the entry on paper and sign it in ink. When the system is back, add the entry and scan the signed paper into Documents; the paper itself stays with the logbooks and remains the signed record for that entry.
+
diff --git a/app/views/help/records.html.erb b/app/views/help/records.html.erb
new file mode 100644
index 0000000..9ad2711
--- /dev/null
+++ b/app/views/help/records.html.erb
@@ -0,0 +1,6 @@
+<% content_for :title, "How electronic records work" %>
+
+
How electronic records work
+
Instructions for everyone who keeps or signs maintenance records here.