<% content_for :title, "#{@aircraft.tail_number} Access" %> <%= render "shared/aircraft_header", aircraft: @aircraft %>

Access & sharing

People

<% @roles.each do |r| %> <% end %>
<%= r.user.display_name %>
<%= r.user.email_address %>
<%= form_with url: aircraft_aircraft_role_path(@aircraft, r), method: :patch do |f| %> <%= f.select :role, AircraftRole::ROLES.invert, { selected: r.role }, class: "input w-28", data: { submit_on_change: true } %> <% end %> <% unless r.user == current_user %><%= delete_button "Remove", aircraft_aircraft_role_path(@aircraft, r), confirm: "Remove #{r.user.display_name}'s access?" %><% end %>
<%= form_with url: aircraft_aircraft_roles_path(@aircraft), class: "flex flex-wrap items-end gap-2 border-t border-slate-100 p-4" do |f| %>
<%= f.label :email_address, "Add by email", class: "label" %><%= f.email_field :email_address, class: "input", required: true %>
<%= f.select :role, AircraftRole::ROLES.invert, { selected: "pilot" }, class: "input w-28" %> <%= f.submit "Add", class: "btn-primary" %> <% end %>

Owners can edit everything. Pilots can view all records, log flights, update hours, and add squawks, notes and oil/fuel.

Share Links

<% if @share_tokens.any? %> <% else %> <%= empty_state "No share links." %> <% end %> <%= form_with model: ShareToken.new, url: aircraft_share_tokens_path(@aircraft), class: "space-y-3 border-t border-slate-100 p-4" do |f| %>
<%= f.field :label, placeholder: "Mechanic, buyer…" %> <%= f.field :privilege, as: :select, label: "Shows", collection: ShareToken::PRIVILEGES.invert %> <%= f.field :expires_at, as: :datetime, label: "Expires (optional)" %>

Current Status: overview, airworthiness, components, open squawks, AD/inspection status, oil & fuel, public notes and documents shared with all links. Maintenance Detail adds the full logbook, history, resolved squawks and major records.

<%= f.submit "Create Share Link" %> <% end %>

Backup & transfer

Everything recorded for <%= @aircraft.tail_number %>, with its files, in one .sam.zip archive. Import it from the Fleet page here or into another Simple Aircraft Manager (including the original).

<%= link_to "Download .sam.zip", aircraft_export_path(@aircraft), class: "btn-secondary", data: { turbo: false } %>

Records package

For an FAA or NTSB request, or a buyer: every logbook entry as a PDF with its electronic signature, a signature register, the full change history, the status report, and the .sam.zip, in one ZIP with a README.

<%= link_to "Download records package", aircraft_records_package_path(@aircraft), class: "btn-secondary", data: { turbo: false } %>