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

Record history

Every change to the maintenance records, kept for good and chained so that removing or altering history shows in the nightly check.

<%= form_with url: aircraft_record_versions_path(@aircraft), method: :get, class: "flex gap-2" do %> <%= select_tag :type, options_for_select([ [ "All records", "" ] ] + @types.map { [ _1.underscore.humanize, _1 ] }, @type), class: "input w-48", data: { submit_on_change: true } %> <% end %>
<% if @versions.any? %><%= render "record_versions/list", versions: @versions %><% else %><%= empty_state "No changes recorded yet." %><% end %>