diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index bec9fd4..f524ebf 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3174,7 +3174,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; @@ -3219,7 +3219,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_TEAM = BQ3Y44M3Q6; diff --git a/PadelClub/ViewModel/Screen.swift b/PadelClub/ViewModel/Screen.swift index cb4d0d6..45534b1 100644 --- a/PadelClub/ViewModel/Screen.swift +++ b/PadelClub/ViewModel/Screen.swift @@ -20,4 +20,5 @@ enum Screen: String, Codable { case broadcast case event case print + case restingTime } diff --git a/PadelClub/Views/Team/TeamRestingView.swift b/PadelClub/Views/Team/TeamRestingView.swift index d576132..c76297a 100644 --- a/PadelClub/Views/Team/TeamRestingView.swift +++ b/PadelClub/Views/Team/TeamRestingView.swift @@ -8,13 +8,11 @@ import SwiftUI struct TeamRestingView: View { - @Environment(Tournament.self) var tournament - - let readyMatches: [Match] - let matchesLeft: [Match] - + @Environment(Tournament.self) var tournament: Tournament @State private var sortingMode: SortingMode = .restingTime @State private var selectedCourt: Int? + @State private var readyMatches: [Match] = [] + @State private var matchesLeft: [Match] = [] enum SortingMode: Int, Identifiable, CaseIterable { var id: Int { self.rawValue } @@ -65,17 +63,16 @@ struct TeamRestingView: View { } var body: some View { - NavigationStack { - List { - Section { - Picker(selection: $selectedCourt) { - Text("Aucun").tag(nil as Int?) - ForEach(0..