mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-17 10:40:24 +00:00
Added queues for mats and provided a way for tournament directors to move matches to a mat.
This commit is contained in:
@@ -37,7 +37,11 @@ class TournamentBackupService
|
||||
attributes: @tournament.attributes,
|
||||
schools: @tournament.schools.map(&:attributes),
|
||||
weights: @tournament.weights.map(&:attributes),
|
||||
mats: @tournament.mats.map(&:attributes),
|
||||
mats: @tournament.mats.map do |mat|
|
||||
mat.attributes.merge(
|
||||
"queue_bout_numbers" => mat.queue_matches.map { |match| match&.bout_number }
|
||||
)
|
||||
end,
|
||||
mat_assignment_rules: @tournament.mat_assignment_rules.map do |rule|
|
||||
rule.attributes.merge(
|
||||
mat: Mat.find_by(id: rule.mat_id)&.attributes.slice("name"),
|
||||
|
||||
Reference in New Issue
Block a user