mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15: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>
15 lines
765 B
ERB
15 lines
765 B
ERB
<%# "Sign as" picker for the current user's certificates (signer controller). %>
|
|
<% certificates = current_user.certificates.reject(&:expired?) %>
|
|
<% if certificates.any? %>
|
|
<div class="flex flex-wrap items-center gap-2 text-sm">
|
|
<%= label_tag :sign_as, "Sign as", class: "text-slate-600" %>
|
|
<select id="sign_as" class="input w-auto" data-signer-target="choice" data-action="signer#fill">
|
|
<option value="">— Someone else —</option>
|
|
<% certificates.each do |c| %>
|
|
<option value="<%= c.id %>" data-name="<%= current_user.display_name %>" data-kind="<%= c.kind %>" data-number="<%= c.number %>">
|
|
<%= current_user.display_name %>, <%= c.kind_label %> <%= c.number %></option>
|
|
<% end %>
|
|
</select>
|
|
</div>
|
|
<% end %>
|