diff --git a/app/jobs/tournament_cleanup_job.rb b/app/jobs/tournament_cleanup_job.rb
index 769650e..65b4710 100644
--- a/app/jobs/tournament_cleanup_job.rb
+++ b/app/jobs/tournament_cleanup_job.rb
@@ -17,7 +17,8 @@ class TournamentCleanupJob < ApplicationJob
has_real_matches = tournament.matches.where(finished: 1).where.not(win_type: 'BYE').exists?
if has_real_matches
-
+ tournament.tournament_backups.destroy_all
+
# 1. Remove all school delegates
tournament.schools.each do |school|
school.delegates.destroy_all
@@ -33,4 +34,4 @@ class TournamentCleanupJob < ApplicationJob
end
end
end
-end
\ No newline at end of file
+end
diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb
index 9ba8956..6bde5c4 100644
--- a/app/views/schools/show.html.erb
+++ b/app/views/schools/show.html.erb
@@ -76,8 +76,12 @@
<% delete_wrestler_path_with_key = wrestler_path(wrestler) %>
<% delete_wrestler_path_with_key += "?school_permission_key=#{params[:school_permission_key]}" if params[:school_permission_key].present? %>
- <%= link_to '', edit_wrestler_path_with_key, class: "fas fa-edit" %>
- <%= link_to '', delete_wrestler_path_with_key, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{wrestler.name}? This will delete all of his matches." }, class: "fas fa-trash-alt" %>
+ <%= link_to edit_wrestler_path_with_key, class: "text-decoration-none" do %>
+
+ <% end %>
+ <%= link_to delete_wrestler_path_with_key, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{wrestler.name}? This will delete all of his matches." }, class: "text-decoration-none" do %>
+
+ <% end %>
<% end %>
@@ -101,8 +105,12 @@
<% delete_wrestler_path_with_key = wrestler_path(wrestler) %>
<% delete_wrestler_path_with_key += "?school_permission_key=#{params[:school_permission_key]}" if params[:school_permission_key].present? %>
- <%= link_to '', edit_wrestler_path_with_key, class: "fas fa-edit" %>
- <%= link_to '', delete_wrestler_path_with_key, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{wrestler.name}? This will delete all of his matches." }, class: "fas fa-trash-alt" %>
+ <%= link_to edit_wrestler_path_with_key, class: "text-decoration-none" do %>
+
+ <% end %>
+ <%= link_to delete_wrestler_path_with_key, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{wrestler.name}? This will delete all of his matches." }, class: "text-decoration-none" do %>
+
+ <% end %>
<% end %>
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
index bd3cf83..a8e8d19 100644
--- a/app/views/tournaments/show.html.erb
+++ b/app/views/tournaments/show.html.erb
@@ -70,9 +70,13 @@
<% if can? :manage, school %>
- <%= link_to '', edit_school_path(school), :class=>"fas fa-edit" %>
+ <%= link_to edit_school_path(school), class: "text-decoration-none" do %>
+
+ <% end %>
<% if can? :manage, @tournament %>
- <%= link_to '', school, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{school.name}?" }, :class=>"fas fa-trash-alt" %>
+ <%= link_to school, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{school.name}?" }, class: "text-decoration-none" do %>
+
+ <% end %>
<% end %>
<% end %>
|
@@ -105,8 +109,12 @@
<%= weight.bracket_size %> |
<% if can? :manage, @tournament %>
- <%= link_to '', edit_weight_path(weight), :class=>"fas fa-edit" %>
- <%= link_to '', weight, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete the #{weight.max} weight class?" }, :class=>"fas fa-trash-alt" %>
+ <%= link_to edit_weight_path(weight), class: "text-decoration-none" do %>
+
+ <% end %>
+ <%= link_to weight, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete the #{weight.max} weight class?" }, class: "text-decoration-none" do %>
+
+ <% end %>
|
<% end %>
@@ -130,7 +138,9 @@
<%= link_to "Mat #{mat.name}", mat %> |
<% if can? :manage, @tournament %>
- <%= link_to '', mat, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete Mat #{mat.name}?" }, :class=>"fas fa-trash-alt" %>
+ <%= link_to mat, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete Mat #{mat.name}?" }, class: "text-decoration-none" do %>
+
+ <% end %>
<%= link_to '', "/mats/#{mat.id}/assign_next_match", data: { turbo_method: :post }, :class=>"fas fa-solid fa-arrow-right" %>
|
<% end %>
diff --git a/app/views/tournaments/up_matches.html.erb b/app/views/tournaments/up_matches.html.erb
index 0b7702b..dd6bdac 100644
--- a/app/views/tournaments/up_matches.html.erb
+++ b/app/views/tournaments/up_matches.html.erb
@@ -28,10 +28,34 @@
<% @mats.each.map do |m| %>
| <%= m.name %> |
- <% if m.unfinished_matches.first %><%=m.unfinished_matches.first.bout_number%> - <%= m.unfinished_matches.first.weight_max %> <%= m.unfinished_matches.first.w1_bracket_name %> vs. <%= m.unfinished_matches.first.w2_bracket_name %><% end %> |
- <% if m.unfinished_matches.second %><%=m.unfinished_matches.second.bout_number%> - <%= m.unfinished_matches.second.weight_max %> <%= m.unfinished_matches.second.w1_bracket_name %> vs. <%= m.unfinished_matches.second.w2_bracket_name %><% end %> |
- <% if m.unfinished_matches.third %><%=m.unfinished_matches.third.bout_number%> - <%= m.unfinished_matches.third.weight_max %> <%= m.unfinished_matches.third.w1_bracket_name %> vs. <%= m.unfinished_matches.third.w2_bracket_name %><% end %> |
- <% if m.unfinished_matches.fourth %><%=m.unfinished_matches.fourth.bout_number%> - <%= m.unfinished_matches.fourth.weight_max %> <%= m.unfinished_matches.fourth.w1_bracket_name %> vs. <%= m.unfinished_matches.fourth.w2_bracket_name %><% end %> |
+
+ <% if m.unfinished_matches.first %><%=m.unfinished_matches.first.bout_number%> (<%= m.unfinished_matches.first.bracket_position %>)
+ <%= m.unfinished_matches.first.weight_max %> lbs
+ <%= m.unfinished_matches.first.w1_bracket_name %> vs.
+ <%= m.unfinished_matches.first.w2_bracket_name %>
+ <% end %>
+ |
+
+ <% if m.unfinished_matches.second %><%=m.unfinished_matches.second.bout_number%> (<%= m.unfinished_matches.second.bracket_position %>)
+ <%= m.unfinished_matches.second.weight_max %> lbs
+ <%= m.unfinished_matches.second.w1_bracket_name %> vs.
+ <%= m.unfinished_matches.second.w2_bracket_name %>
+ <% end %>
+ |
+
+ <% if m.unfinished_matches.third %><%=m.unfinished_matches.third.bout_number%> (<%= m.unfinished_matches.third.bracket_position %>)
+ <%= m.unfinished_matches.third.weight_max %> lbs
+ <%= m.unfinished_matches.third.w1_bracket_name %> vs.
+ <%= m.unfinished_matches.third.w2_bracket_name %>
+ <% end %>
+ |
+
+ <% if m.unfinished_matches.fourth %><%=m.unfinished_matches.fourth.bout_number%> (<%= m.unfinished_matches.fourth.bracket_position %>)
+ <%= m.unfinished_matches.fourth.weight_max %> lbs
+ <%= m.unfinished_matches.fourth.w1_bracket_name %> vs.
+ <%= m.unfinished_matches.fourth.w2_bracket_name %>
+ <% end %>
+ |
<% end %>
diff --git a/app/views/weights/show.html.erb b/app/views/weights/show.html.erb
index a36b927..b4f0b90 100644
--- a/app/views/weights/show.html.erb
+++ b/app/views/weights/show.html.erb
@@ -1,48 +1,50 @@
-Weight Class:<%= @weight.max %> <% if can? :manage, @tournament %><%= link_to " Edit", edit_weight_path(@weight), :class=>"fas fa-edit" %><% end %>
+Weight Class:<%= @weight.max %> <% if can? :manage, @tournament %><%= link_to edit_weight_path(@weight), class: "text-decoration-none" do %><% end %><% end %>
-
-
-
- | Name |
- School |
- Seed |
- Record |
- Seed Criteria |
- Extra? |
-
-
-
- <%= form_tag @wrestlers_update_path do %>
- <% @wrestlers.sort_by{|w| [w.original_seed ? 0 : 1, w.original_seed || 0]}.each do |wrestler| %>
- <% if wrestler.weight_id == @weight.id %>
-
- | <%= link_to "#{wrestler.name}", wrestler %> |
- <%= wrestler.school.name %> |
-
- <% if can? :manage, @tournament %>
- <%= fields_for "wrestler[]", wrestler do |w| %>
- <%= w.text_field :original_seed %>
- <% end %>
- <% else %>
- <%= wrestler.original_seed %>
- <% end %>
- |
- <%= wrestler.season_win %>-<%= wrestler.season_loss %> |
- <%= wrestler.criteria %> Win <%= wrestler.season_win_percentage %>% |
- <% if wrestler.extra? == true %>
- Yes
- <% end %> |
- <% if can? :manage, @tournament %>
-
- <%= link_to '', wrestler, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{wrestler.name}? THIS WILL DELETE ALL MATCHES." } , :class=>"fas fa-trash-alt" %>
+<%= form_tag @wrestlers_update_path do %>
+
+
+
+ | Name |
+ School |
+ Seed |
+ Record |
+ Seed Criteria |
+ Extra? |
+
+
+
+ <% @wrestlers.sort_by{|w| [w.original_seed ? 0 : 1, w.original_seed || 0]}.each do |wrestler| %>
+ <% if wrestler.weight_id == @weight.id %>
+
+ | <%= link_to "#{wrestler.name}", wrestler %> |
+ <%= wrestler.school.name %> |
+
+ <% if can? :manage, @tournament %>
+ <%= fields_for "wrestler[]", wrestler do |w| %>
+ <%= w.text_field :original_seed %>
+ <% end %>
+ <% else %>
+ <%= wrestler.original_seed %>
+ <% end %>
|
- <% end %>
-
- <% end %>
- <% end %>
-
-
+ | <%= wrestler.season_win %>-<%= wrestler.season_loss %> |
+ <%= wrestler.criteria %> Win <%= wrestler.season_win_percentage %>% |
+ <% if wrestler.extra? == true %>
+ Yes
+ <% end %> |
+ <% if can? :manage, @tournament %>
+
+ <%= link_to wrestler, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{wrestler.name}? THIS WILL DELETE ALL MATCHES." }, class: "text-decoration-none" do %>
+
+ <% end %>
+ |
+ <% end %>
+
+ <% end %>
+ <% end %>
+
+
*All wrestlers without a seed (determined by tournament director) will be assigned a random bracket line.
<% if can? :manage, @tournament %>