Files
simple-aircraft-manager-rails/app/views/reminder_mailer/weekly.text.erb
T
rickyandClaude Opus 5.5 aa262065b2 Certificates on user profiles, with "Sign as"
- 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>
2026-11-07 11:08:21 -05:00

21 lines
955 B
ERB

Here's what needs attention<%= " on your aircraft" if @items.any? %>.
<% @items.each do |aircraft, issues, alerts| %>
<%= aircraft.tail_number %> (<%= aircraft.airworthiness.label %>): <%= aircraft_url(aircraft) %>
<% issues.each do |issue| %>
- <%= { "RED" => "Overdue", "LIMITED" => "Overdue", "ORANGE" => "Due soon", "INFO" => "Deferred" }[issue.severity] %>: <%= issue.title %>. <%= issue.description %>
<% end %>
<% if alerts.any? %>
- New ADs that may apply: <%= alerts.map { _1.ad_number || _1.fr_document_number }.to_sentence %>. Review: <%= aircraft_airworthiness_directives_url(aircraft, anchor: "new-ads") %>
<% end %>
<% end %>
<% if @certificates.any? %>
Your certificates:
<% @certificates.each do |c| %>
- <%= c.expired? ? "Expired" : "Expires" %> <%= c.expires_on %>: <%= c.kind_label %> <%= c.number %>
<% end %>
<% end %>
Based on the records in Simple Aircraft Manager. Turn these emails off on your profile: <%= edit_profile_url %>