You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
56 lines
1.5 KiB
//
|
|
// TournamentInitView.swift
|
|
// PadelClub
|
|
//
|
|
// Created by Razmig Sarkissian on 22/03/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
import LeStorage
|
|
|
|
struct TournamentInitView: View {
|
|
var tournament: Tournament
|
|
|
|
@ViewBuilder
|
|
var body: some View {
|
|
Section {
|
|
|
|
if let event = tournament.eventObject() {
|
|
let tournaments = event.tournaments
|
|
NavigationLink(value: Screen.event) {
|
|
LabeledContent {
|
|
Text(tournaments.count.formatted() + " tournoi" + tournaments.count.pluralSuffix)
|
|
} label: {
|
|
Text("Gestion de l'événement")
|
|
}
|
|
}
|
|
}
|
|
|
|
NavigationLink(value: Screen.structure) {
|
|
LabeledContent {
|
|
Text(tournament.structureDescriptionLocalizedLabel())
|
|
} label: {
|
|
LabelStructure()
|
|
}
|
|
}
|
|
|
|
NavigationLink(value: Screen.settings) {
|
|
LabeledContent {
|
|
Text(tournament.settingsDescriptionLocalizedLabel())
|
|
} label: {
|
|
LabelSettings()
|
|
}
|
|
}
|
|
|
|
TournamentBroadcastRowView(tournament: tournament)
|
|
|
|
NavigationLink(value: Screen.print) {
|
|
Text("Imprimer")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//#Preview {
|
|
// TournamentInitView(tournament: Tournament.mock())
|
|
//}
|
|
|