New Point Adjustment



<%= form_for Teampointadjust.new, :url => url_for(:controller => 'tournaments', :action => 'teampointadjust', :method => "post") do |f| %>
Wrestler Deducted School Deducted Points To Deduct
<%= f.collection_select :wrestler_id, @tournament.wrestlers, :id, :name, :include_blank => true %> <%= f.collection_select :school_id, @tournament.schools, :id, :name, :include_blank => true %> <%= f.number_field :points, :step => 'any' %>

Please leave either wrestler or school blank. Please do not choose both (the team will be double decuted the points)

<% if can? :manage, @tournament %> <%= submit_tag "Deduct Points", :class=>"btn btn-success"%> <% end %> <% end %>
<% if @point_adjustments.size > 0 %>

Point Adjustments



<% @point_adjustments.each do |point_adjustment| %> <% end %>
Against Points Deducted
<% if point_adjustment.school_id != nil %> <%= point_adjustment.school.name %> <% elsif point_adjustment.wrestler_id != nil %> <%= point_adjustment.wrestler.name %> <% end %> <%= point_adjustment.points %> <%= link_to 'Remove Point Adjustment', "/tournaments/#{@tournament.id}/#{point_adjustment.id}/remove_teampointadjust", data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' }, :class=>"btn btn-danger btn-sm" %>
<% end %>