mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
- more_menu helper (menu / menu-item styles): each section keeps its main action as a button; imports, exports, printing and tools move under More (flights, logbook, logbook entry, documents, inspections, fleet) - Aircraft header: More with status report and, for owners, access & sharing, edit, .sam.zip and records package; Access & Sharing and Oil Analysis tabs removed (oil analysis is under Oil & Fuel with a switch) - Logbook: Print selected appears once an entry is ticked; filters apply on change; dates use fmt_date (also AirTrail, notes, audits, About) - Header shows the role on the aircraft and hides the usual Available badge; no second Grounded badge on the Overview; AD DRS import listed once - Flights: stat cards 2x2 on phones; By year opens visibly, only with more than one year; duplicate + Log Flight removed - Remove unused hello_controller.js; guide and README updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.1 KiB
ERB
21 lines
1.1 KiB
ERB
<% content_for :title, "Records audits" %>
|
|
<div class="mb-4 flex flex-wrap items-center justify-between gap-2">
|
|
<div>
|
|
<h1 class="text-2xl font-bold">Records audits</h1>
|
|
<p class="text-sm text-slate-600">Quality-control audits of the electronic records (AC 120-78B 3.2.8.5), every <%= RecordkeepingPolicy.current.audit_interval_months %> months. Next due <strong class="<%= AuditRun.due_soon? ? 'text-amber-700' : '' %>"><%= AuditRun.next_due %></strong>.</p>
|
|
</div>
|
|
<%= link_to "Start an audit", new_admin_audit_path, class: "btn-primary" %>
|
|
</div>
|
|
<section class="card">
|
|
<% if @audits.any? %>
|
|
<ul class="divide-y divide-slate-100 text-sm">
|
|
<% @audits.each do |a| %>
|
|
<li class="flex items-center justify-between px-4 py-2">
|
|
<span><%= link_to fmt_date(a.performed_at.to_date), admin_audit_path(a), class: "link" %> · <%= a.performed_by&.display_name %></span>
|
|
<span class="<%= a.passed ? 'badge-green' : 'badge-orange' %>"><%= a.passed ? "Passed" : "Items not passed" %></span>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% else %><%= empty_state "No audits yet." %><% end %>
|
|
</section>
|