mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Smaller aircraft photos, one-row-per-item detail cards, push diagnostics
- Aircraft photos get 192px and 960x432 copies made on upload; the header, share page and Fleet cards use them (and the offline copies), instead of the full original. - Flight, engine data, component and major record details show one label and value per row on phones (wide items no longer add grid columns). - Profile re-records this device's push subscription on every visit, and says why if it can't; Send test delivers now and lists each device's result; Google's other push hosts are accepted; turning notifications on shows the browser's actual error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3f314a13bb
commit
d4b71d17a1
21 files changed
+234
-96
No files matched your search
@@ -2,24 +2,24 @@
|
||||
<section class="card max-w-4xl">
|
||||
<div class="card-header"><h2 class="card-title"><%= @record.type_label %>: <%= @record.title %></h2>
|
||||
<% if owner? %><%= link_to t(".edit"), edit_aircraft_major_record_path(@aircraft, @record), class: "btn-secondary btn-sm" %><% end %></div>
|
||||
<dl class="card-body grid grid-cols-2 gap-x-4 gap-y-2 text-sm sm:grid-cols-4">
|
||||
<dt class="text-slate-500"><%= t(".date") %></dt><dd><%= fmt_date(@record.date_performed) %></dd>
|
||||
<dt class="text-slate-500"><%= t(".aircraft_hours") %></dt><dd><%= hours(@record.aircraft_hours) %></dd>
|
||||
<dt class="text-slate-500"><%= t(".performed_by") %></dt><dd><%= @record.performed_by.presence || "—" %></dd>
|
||||
<dt class="text-slate-500"><%= t(".component") %></dt><dd><%= @record.component || "—" %></dd>
|
||||
<dt class="text-slate-500"><%= t(".form_337") %></dt><dd><%= @record.form_337_document ? link_to(@record.form_337_document.name, aircraft_document_path(@aircraft, @record.form_337_document), class: "link") : "—" %></dd>
|
||||
<dt class="text-slate-500"><%= t(".stc") %></dt><dd><%= [@record.stc_number, @record.stc_holder].compact_blank.join(" · ").presence || "—" %>
|
||||
<%= link_to(t(".docs"), aircraft_document_path(@aircraft, @record.stc_document), class: "link") if @record.stc_document %></dd>
|
||||
<dt class="text-slate-500"><%= t(".logbook") %></dt><dd><%= @record.logbook_entry ? link_to(@record.logbook_entry.date, aircraft_logbook_entry_path(@aircraft, @record.logbook_entry), class: "link") : "—" %></dd>
|
||||
<dt class="text-slate-500"><%= t(".weight_balance") %></dt>
|
||||
<dl class="card-body grid gap-x-8 gap-y-3 text-sm sm:grid-cols-2">
|
||||
<div class="detail-row"><dt><%= t(".date") %></dt><dd><%= fmt_date(@record.date_performed) %></dd></div>
|
||||
<div class="detail-row"><dt><%= t(".aircraft_hours") %></dt><dd><%= hours(@record.aircraft_hours) %></dd></div>
|
||||
<div class="detail-row"><dt><%= t(".performed_by") %></dt><dd><%= @record.performed_by.presence || "—" %></dd></div>
|
||||
<div class="detail-row"><dt><%= t(".component") %></dt><dd><%= @record.component || "—" %></dd></div>
|
||||
<div class="detail-row"><dt><%= t(".form_337") %></dt><dd><%= @record.form_337_document ? link_to(@record.form_337_document.name, aircraft_document_path(@aircraft, @record.form_337_document), class: "link") : "—" %></dd></div>
|
||||
<div class="detail-row"><dt><%= t(".stc") %></dt><dd><%= [@record.stc_number, @record.stc_holder].compact_blank.join(" · ").presence || "—" %>
|
||||
<%= link_to(t(".docs"), aircraft_document_path(@aircraft, @record.stc_document), class: "link") if @record.stc_document %></dd></div>
|
||||
<div class="detail-row"><dt><%= t(".logbook") %></dt><dd><%= @record.logbook_entry ? link_to(@record.logbook_entry.date, aircraft_logbook_entry_path(@aircraft, @record.logbook_entry), class: "link") : "—" %></dd></div>
|
||||
<div class="detail-row"><dt><%= t(".weight_balance") %></dt>
|
||||
<dd>
|
||||
<% if (wb = @aircraft.weight_balance_records.where(major_record: @record).recent_first.first) %>
|
||||
<%= link_to t(".lb_in", date: fmt_date(wb.date), weight: number_with_precision(wb.empty_weight, precision: 1), arm: number_with_precision(wb.empty_arm, precision: 2)), aircraft_weight_balance_records_path(@aircraft), class: "link" %>
|
||||
<% elsif owner? %>
|
||||
<%= link_to t(".record_the_new_w_b"), new_aircraft_weight_balance_record_path(@aircraft, major_record_id: @record.id), class: "link" %>
|
||||
<% else %>—<% end %>
|
||||
</dd>
|
||||
<dt class="text-slate-500"><%= t(".icas") %></dt>
|
||||
</dd></div>
|
||||
<div class="detail-row"><dt><%= t(".icas") %></dt>
|
||||
<dd>
|
||||
<%= @record.has_ica? ? t(".yes") : t(".no") %>
|
||||
<% if (ica = @record.ica_inspection_type) %>
|
||||
@@ -28,7 +28,7 @@
|
||||
<% elsif @record.has_ica? && owner? %>
|
||||
· <%= link_to t(".add_the_ica_s_recurring"), new_aircraft_inspection_type_path(@aircraft, major_record_id: @record.id), class: "link" %>
|
||||
<% end %>
|
||||
</dd>
|
||||
</dd></div>
|
||||
</dl>
|
||||
<% [[t(".description"), @record.description], [t(".ica_notes"), @record.ica_notes], [t(".notes"), @record.notes]].each do |title, text| %>
|
||||
<% if text.present? %><div class="border-t border-slate-100 px-4 py-3 text-sm"><h3 class="mb-1 font-medium"><%= title %></h3><%= simple_format text %></div><% end %>
|
||||
|
||||
Reference in new issue
Block a user