mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
- Users add their FAA certificates (kind, number, optional expiry) on their profile; admins see them on the Users list - "Sign as" on new/edited logbook entries and the squawk Resolve page fills the signer's name, kind of certificate and number (expired certificates aren't offered); deferrals default to mechanic for users with a mechanic certificate - Weekly reminder lists certificates expiring within 60 days (or lapsed in the last 30), even when nothing else is due - Preventive maintenance templates keep a certificate already chosen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
1.3 KiB
ERB
14 lines
1.3 KiB
ERB
<% content_for :title, "Users" %>
|
|
<div class="mb-4 flex items-center justify-between"><h1 class="text-2xl font-bold">Users</h1><%= link_to "+ New User", new_admin_user_path, class: "btn-primary" %></div>
|
|
<section class="card"><table class="table">
|
|
<thead><tr><th>Name</th><th>Email</th><th>Aircraft</th><th>Last sign-in</th><th></th></tr></thead>
|
|
<tbody><% @users.each do |u| %><tr>
|
|
<td><%= u.name %> <% if u.admin? %><span class="badge-blue">Admin</span><% end %><% if u.sso_uid? %> <span class="badge-gray" title="Signs in with <%= Sso.label %>"><%= Sso.label %></span><% end %></td>
|
|
<td><%= u.email_address %><% if u.certificates.any? %><div class="text-xs text-slate-500"><%= u.certificates.map { "#{_1.short_label} #{_1.number}" }.join(", ") %></div><% end %></td>
|
|
<td class="text-xs"><%= u.aircraft_roles.map { "#{_1.aircraft.tail_number} (#{_1.role})" }.join(", ").presence || "—" %></td>
|
|
<td class="text-xs text-slate-500"><%= u.last_signed_in_at ? "#{time_ago_in_words(u.last_signed_in_at)} ago" : "never" %></td>
|
|
<td class="text-right"><%= link_to "Edit", edit_admin_user_path(u), class: "btn-secondary btn-sm" %></td>
|
|
</tr><% end %></tbody>
|
|
</table></section>
|
|
<p class="hint mt-3">After creating an account, an aircraft owner can grant access from the aircraft's “Access & Sharing” tab.</p>
|