Upload a .sam.zip archive exported from Simple Aircraft Manager (this app or the original).
Everything in it is added as a new aircraft that you own: components, logbook, squawks, inspections, ADs,
documents, oil and fuel, oil analyses, flights and their files.
<% if @preview %>
Archive: <%= @preview.tail_number %> <%= [ @preview.make, @preview.model ].compact_blank.join(" ") %>
<% if @preview.exported_at %>ยท exported <%= fmt_date(@preview.exported_at.to_date) %><% end %>
<% end %>
<%= form_with url: aircraft_imports_path, multipart: true, class: "space-y-4" do |f| %>
<%= f.label :archive, "Archive (.sam.zip)", class: "label" %>
<%= f.file_field :archive, accept: ".zip,application/zip", required: true,
class: "block text-sm text-slate-600 file:mr-3 file:rounded-md file:border-0 file:bg-slate-100 file:px-3 file:py-1.5 file:text-sm file:font-medium hover:file:bg-slate-200" %>
<% if @conflict %>
Choose the file again along with the new tail number.
<% end %>
<%= f.label :tail_number, "Tail number", class: "label" %>
<%= f.text_field :tail_number, value: (params[:tail_number] unless @conflict), class: "input uppercase",
placeholder: @preview&.tail_number || "From the archive", required: @conflict.present? %>
Leave blank to use the archive's. Needed when that tail number is already here.
<%= f.submit "Import", class: "btn-primary" %><%= link_to "Cancel", root_path, class: "btn-secondary" %>
<% end %>