mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
32 lines
1.4 KiB
ERB
32 lines
1.4 KiB
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 %>
|
|
<% 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 %>
|
|
<% end %>
|
|
|
|
Based on the records in Simple Aircraft Manager. Turn these emails off on your profile: <%= edit_profile_url %>
|