Rafts editor

<%= link_to "Back to dashboard", root_path, class: "btn btn-outline-secondary" %>
Assign ALL rafts
<%= form_with url: assign_all_rafts_path, method: :patch, class: "row g-2", data: { turbo: false } do %>
<% end %>
<% max_cols = @beds.map { |b| b.rafts.count }.max %> <% (1..max_cols).each do |i| %> <% end %> <% @beds.each do |bed| %> <% bed.rafts.order(:location).each do |raft| %> <% end %> <% end %>
BedR<%= i %>
<%= bed.location %> <% if raft.crop %> <%= raft.crop.name %> <% else %> — <% end %>
<% @beds.each do |bed| %>
Bed #<%= bed.location %> <%= form_with url: assign_bed_rafts_path, method: :patch, class: "d-flex gap-2 align-items-center", data: { turbo: false } do %> <% end %>
<% bed.rafts.order(:location).each do |raft| %> <% end %>
Raft Crop Actions
<%= raft.location %> <%= form_with url: assign_one_raft_path(raft), method: :patch, class: "d-flex gap-2", data: { turbo: false } do %> <% end %> <%= button_to "Clear", assign_one_raft_path(raft, crop_id: ""), method: :patch, form: { data: { turbo: false } }, class: "btn btn-outline-secondary btn-sm" %>
<% end %>