clean up groupstage loser bracket and init

newoffer2025
Raz 6 months ago
parent 0dea3ae550
commit 5d9c1b9cea
  1. 2
      PadelClub/Views/GroupStage/GroupStagesSettingsView.swift
  2. 4
      PadelClubTests/ServerDataTests.swift

@ -78,7 +78,7 @@ struct GroupStagesSettingsView: View {
Section {
if tournament.groupStageLoserBracket() == nil {
RowButtonView("Ajouter des matchs de classements", role: .destructive) {
let round = Round(tournament: tournament.id, index: 0, matchFormat: tournament.loserRoundFormat, groupStageLoserBracket: true)
let round = Round(tournament: tournament.id, index: 0, format: tournament.loserRoundFormat, groupStageLoserBracket: true)
do {
try tournamentStore?.rounds.addOrUpdate(instance: round)

@ -236,9 +236,7 @@ final class ServerDataTests: XCTestCase {
let rounds: [Round] = try await StoreCenter.main.service().get()
let parentRoundId = rounds.first?.id
let round = Round(tournament: tournamentId, index: 1, parent: parentRoundId, matchFormat: MatchFormat.nineGames, startDate: Date(), groupStageLoserBracket: false, loserBracketMode: .manual,
plannedStartDate: Date()
)
let round = Round(tournament: tournamentId, index: 1, parent: parentRoundId, format: MatchFormat.nineGames, startDate: Date(), groupStageLoserBracket: false, loserBracketMode: .manual, plannedStartDate: Date())
round.storeId = "abc"
if let r: Round = try await StoreCenter.main.service().post(round) {

Loading…
Cancel
Save