1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-04 13:43:48 +00:00

Made the all results page grouping better and fixed the advance wrestler job.

This commit is contained in:
2025-04-17 17:34:34 -04:00
parent ed7186e5ce
commit 44fb5388b4
6 changed files with 33 additions and 13 deletions

View File

@@ -9,6 +9,11 @@ class AdvanceWrestlerJob < ApplicationJob
end
def perform(wrestler, match)
# Add a small delay to increase chance of transaction commit
# without this some matches were getting a deserialization error when running the rake task
# to finish tournaments
sleep(0.5)
# Get tournament from wrestler
tournament = wrestler.tournament
@@ -18,7 +23,7 @@ class AdvanceWrestlerJob < ApplicationJob
tournament: tournament,
job_name: job_name,
status: "Running",
details: "Match ID: #{match&.bout_number || 'No match'}"
details: "Match ID: #{match&.bout_number || 'No match'} Wrestler Name #{wrestler&.name || 'No Wrestler'}"
)
begin

View File

@@ -46,6 +46,7 @@
<p id="alert" class="alert alert-danger alert-dismissible"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><%= alert %></p>
<% end %>
<div id="view" style="overflow-x: auto; overflow-y: hidden;"> <%# Horizontal scroll only %>
<br><br>
<%= yield %>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<% @matches.select{|m| m.finished == 1 && m.w1 && m.w2}.sort_by{|m| [ m.bout_number, m.bracket_position, m.weight.max ]}.each do |match| %>
<% @matches.select{|m| m.finished == 1 && m.w1 && m.w2}.sort_by{|m| [ m.round, -m.bracket_position, m.weight.max ]}.each do |match| %>
<% if @round != match.round || @bracket_position != match.bracket_position %>
<p><strong><%= match.bracket_position %> Round: <%= match.round %></strong></p>
<% end %>

View File

@@ -1,4 +1,3 @@
<br><br>
<h3>
<%= @tournament.name %> Info
</h3>