AD baseline: record DRS imports and the models they covered; weekly search starts from the last import; reminders and audit check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-11 20:56:20 -05:00
1 parent ba0455b149
commit 8bea2abf75
13 files changed
+169 -4

No files matched your search

@@ -18,6 +18,8 @@
<% @certificates.each do |c| %><li><strong><%= c.expired? ? "Expired" : "Expires" %> <%= c.expires_on %>:</strong> <%= c.kind_label %> <%= c.number %></li><% end %>
</ul>
<% end %>
<% if @drs_due.any? %><p><strong>Refresh the AD list from FAA DRS</strong> (new ADs are found weekly, but revisions and anything missed come from a fresh import):</p>
<ul><% @drs_due.each do |a| %><li><%= link_to a.tail_number, aircraft_airworthiness_directives_url(a) %>: <%= (m = DrsImport.missing_models(a)).any? ? "never imported for #{m.to_sentence}" : "last import #{a.drs_imports.latest_first.first&.created_at&.to_date || 'never'}" %></li><% end %></ul><% end %>
<% if @audit_due %><p><strong>Records audit due <%= @audit_due %></strong> (AC 120-78B quality control): <%= link_to "start it", new_admin_audit_url %>.</p><% end %>
<p style="color: #64748b; font-size: 12px; margin-top: 20px;">
Based on the records in Simple Aircraft Manager. Turn these emails off on your <%= link_to "profile", edit_profile_url %>.
@@ -16,6 +16,13 @@ Your certificates:
- <%= c.expired? ? "Expired" : "Expires" %> <%= c.expires_on %>: <%= c.kind_label %> <%= c.number %>
<% end %>
<% end %>
<% if @drs_due.any? %>
AD list from FAA DRS needs a refresh:
<% @drs_due.each do |a| %>
- <%= a.tail_number %>: <%= (m = DrsImport.missing_models(a)).any? ? "never imported for #{m.to_sentence}" : "last import #{a.drs_imports.latest_first.first&.created_at&.to_date || 'never'}" %> (<%= aircraft_airworthiness_directives_url(a) %>)
<% end %>
<% end %>
<% if @audit_due %>
Records audit due <%= @audit_due %>: <%= new_admin_audit_url %>