mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
27 lines
2.1 KiB
ERB
27 lines
2.1 KiB
ERB
<p>Here's what needs attention<%= " on your aircraft" if @items.any? %>.</p>
|
|
<% @items.each do |aircraft, issues, alerts| %>
|
|
<h3 style="margin: 16px 0 4px;"><%= link_to aircraft.tail_number, aircraft_url(aircraft) %> <span style="font-weight: normal; color: #64748b;"><%= aircraft.airworthiness.label %></span></h3>
|
|
<ul style="margin: 0; padding-left: 20px;">
|
|
<% issues.each do |issue| %>
|
|
<li><strong><%= { "RED" => "Overdue", "LIMITED" => "Overdue", "ORANGE" => "Due soon", "INFO" => "Deferred" }[issue.severity] %>:</strong>
|
|
<%= issue.title %> <span style="color: #64748b;"><%= issue.description %></span></li>
|
|
<% end %>
|
|
</ul>
|
|
<% if alerts.any? %>
|
|
<p style="margin: 8px 0 0;"><strong><%= alerts.size %> newly published <%= "AD".pluralize(alerts.size) %> may apply:</strong>
|
|
<%= alerts.map { _1.ad_number || _1.fr_document_number }.to_sentence %>. <%= link_to "Review them", aircraft_airworthiness_directives_url(aircraft, anchor: "new-ads") %>.</p>
|
|
<% end %>
|
|
<% end %>
|
|
<% if @certificates.any? %>
|
|
<h3 style="margin: 16px 0 4px;">Your certificates</h3>
|
|
<ul style="margin: 0; padding-left: 20px;">
|
|
<% @certificates.each do |c| %><li><strong><%= c.expired? ? "Expired" : "Expires" %> <%= fmt_date(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 %>.
|
|
</p>
|