Assign Mat/Queue for Match <%= @match.bout_number %>
<% if @current_mat %>
Current Assignment: Mat <%= @current_mat.name %><%= @current_queue_position ? " (Queue #{@current_queue_position})" : "" %>
<% else %>
Current Assignment: Unassigned
<% end %>
<%= form_with model: @match, url: update_assignment_match_path(@match), method: :patch do |f| %>
<%= f.label :mat_id, "Mat" %>
<%= f.collection_select :mat_id, @mats, :id, :name, { include_blank: "Unassigned" } %>
<%= f.label :queue_position, "Queue Position" %>
<%= f.select :queue_position,
options_for_select(
[
["On Mat (Queue 1)", 1],
["On Deck (Queue 2)", 2],
["In The Hole (Queue 3)", 3],
["Warm Up (Queue 4)", 4]
],
@current_queue_position
),
include_blank: "Select position"
%>
<%= f.submit "Update Assignment", class: "btn btn-success" %>
<% end %>