parent
15bb8f879a
commit
9dc16f9c81
@ -0,0 +1,75 @@ |
|||||||
|
// |
||||||
|
// TournamentBuildView.swift |
||||||
|
// PadelClub |
||||||
|
// |
||||||
|
// Created by Razmig Sarkissian on 19/05/2024. |
||||||
|
// |
||||||
|
|
||||||
|
import SwiftUI |
||||||
|
|
||||||
|
struct TournamentBuildView: View { |
||||||
|
var tournament: Tournament |
||||||
|
|
||||||
|
@ViewBuilder |
||||||
|
var body: some View { |
||||||
|
TournamentInitView(tournament: tournament) |
||||||
|
|
||||||
|
Section { |
||||||
|
NavigationLink(value: Screen.schedule) { |
||||||
|
let tournamentStatus = tournament.scheduleStatus() |
||||||
|
LabeledContent { |
||||||
|
Text(tournamentStatus.completion) |
||||||
|
} label: { |
||||||
|
Text("Horaires") |
||||||
|
Text(tournamentStatus.label) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
NavigationLink(value: Screen.call) { |
||||||
|
let tournamentStatus = tournament.callStatus() |
||||||
|
LabeledContent { |
||||||
|
Text(tournamentStatus.completion) |
||||||
|
} label: { |
||||||
|
Text("Convocations") |
||||||
|
Text(tournamentStatus.label) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
NavigationLink(value: Screen.cashier) { |
||||||
|
let tournamentStatus = tournament.cashierStatus() |
||||||
|
LabeledContent { |
||||||
|
Text(tournamentStatus.completion) |
||||||
|
} label: { |
||||||
|
Text("Encaissement") |
||||||
|
Text(tournamentStatus.label) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Section { |
||||||
|
if tournament.groupStages().isEmpty == false { |
||||||
|
NavigationLink(value: Screen.groupStage) { |
||||||
|
LabeledContent { |
||||||
|
Text(tournament.groupStageStatus()) |
||||||
|
} label: { |
||||||
|
Text("Poules") |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if tournament.rounds().isEmpty == false { |
||||||
|
NavigationLink(value: Screen.round) { |
||||||
|
LabeledContent { |
||||||
|
Text(tournament.bracketStatus()) |
||||||
|
} label: { |
||||||
|
Text("Tableau") |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
#Preview { |
||||||
|
TournamentBuildView(tournament: Tournament.mock()) |
||||||
|
} |
||||||
Loading…
Reference in new issue