mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Workflow polish: setup checklist, next leg, grouped component limits
- Setup checklist on a new aircraft's Overview (owners): components, standard inspections, DRS AD import, registration/airworthiness certificate, weight and balance; hideable per device - Log Flight: "Save and log next leg" reopens the form on the same date, starting where the leg ended - Component form: limits in two collapsible groups (replacement and expiry; overhaul and TBO), open when in use - Squawk form warns what "Ground Aircraft" does - Logbook entry form: inspection result only for inspection entries (show-when controller); document names default from the file - Dates in pickers, the activity log, airworthiness lines, search, audits and transcription notes use the app format - No duplicate Report Squawk button on Squawks; "Record service" label Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3452a35896
commit
03b9ad65cb
34 files changed
+303
-77
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<%# Shown to owners until the aircraft is set up; Hide keeps it hidden on this device. %>
|
||||
<% steps = setup_steps(aircraft) %>
|
||||
<% if steps.any? { !_2 } %>
|
||||
<section class="card" data-controller="dismiss" data-dismiss-key-value="sam-setup-hidden-<%= aircraft.id %>">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<h2 class="card-title"><%= t(".title", tail_number: aircraft.tail_number) %></h2>
|
||||
<p class="text-xs text-slate-500"><%= t(".progress", done: steps.count { _2 }, total: steps.size) %></p>
|
||||
</div>
|
||||
<button type="button" class="btn-secondary btn-sm" data-action="dismiss#hide"><%= t(".hide") %></button>
|
||||
</div>
|
||||
<ol class="divide-y divide-slate-100">
|
||||
<% steps.each do |key, done, path| %>
|
||||
<li class="flex items-start gap-3 px-4 py-3">
|
||||
<span aria-hidden="true" class="<%= done ? "text-emerald-600" : "text-slate-400" %>"><%= done ? "✓" : "○" %></span>
|
||||
<div class="min-w-0 flex-1 text-sm">
|
||||
<% if done %>
|
||||
<span class="text-slate-500 line-through"><%= t(".#{key}.title") %></span>
|
||||
<% else %>
|
||||
<%= link_to t(".#{key}.title"), path, class: "link font-medium" %>
|
||||
<p class="hint"><%= t(".#{key}.why") %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ol>
|
||||
</section>
|
||||
<% end %>
|
||||
Reference in new issue
Block a user