From 2813fcf1de6aacbbb57d17f7ac40fe768203378a Mon Sep 17 00:00:00 2001 From: Raz Date: Tue, 28 Jan 2025 18:48:53 +0100 Subject: [PATCH 1/4] v1.1.4 --- PadelClub.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index 26002e6..386aede 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3329,7 +3329,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.3; + MARKETING_VERSION = 1.1.4; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3376,7 +3376,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.3; + MARKETING_VERSION = 1.1.4; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; From 70355f47de7b500c24d552c1f516b6d40dd9f5e3 Mon Sep 17 00:00:00 2001 From: Raz Date: Wed, 29 Jan 2025 16:11:50 +0100 Subject: [PATCH 2/4] fix delete tournament issue with online reg --- PadelClub.xcodeproj/project.pbxproj | 4 ++-- .../Tournament/Screen/Components/TournamentStatusView.swift | 5 +++++ .../Views/Tournament/Screen/InscriptionManagerView.swift | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index 386aede..c0b888e 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3329,7 +3329,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.4; + MARKETING_VERSION = 1.1.5; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3376,7 +3376,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.4; + MARKETING_VERSION = 1.1.5; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/PadelClub/Views/Tournament/Screen/Components/TournamentStatusView.swift b/PadelClub/Views/Tournament/Screen/Components/TournamentStatusView.swift index 799d634..23bdad9 100644 --- a/PadelClub/Views/Tournament/Screen/Components/TournamentStatusView.swift +++ b/PadelClub/Views/Tournament/Screen/Components/TournamentStatusView.swift @@ -48,6 +48,11 @@ struct TournamentStatusView: View { do { let event = tournament.eventObject() let isLastTournament = event?.tournaments.count == 1 + + tournament.isDeleted = true + + try dataStore.tournaments.addOrUpdate(instance: tournament) + if let event, isLastTournament { try dataStore.events.delete(instance: event) } else { diff --git a/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift b/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift index b945b40..78f3d59 100644 --- a/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift +++ b/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift @@ -668,6 +668,7 @@ struct InscriptionManagerView: View { } } } + .id(refreshStatus) .searchable(text: $searchField, isPresented: $presentSearch, prompt: Text("Chercher parmi les équipes inscrites")) .keyboardType(.alphabet) .autocorrectionDisabled() From c119e5a412a54149fcfcd1e6f5a5424e557e5224 Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 3 Feb 2025 17:38:59 +0100 Subject: [PATCH 3/4] fix crash when filtering with no code club --- PadelClub/ViewModel/FederalDataViewModel.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PadelClub/ViewModel/FederalDataViewModel.swift b/PadelClub/ViewModel/FederalDataViewModel.swift index 2ca3b2f..c841fb7 100644 --- a/PadelClub/ViewModel/FederalDataViewModel.swift +++ b/PadelClub/ViewModel/FederalDataViewModel.swift @@ -90,7 +90,7 @@ class FederalDataViewModel { && (ageCategories.isEmpty || tournament.tournaments.anySatisfy({ ageCategories.contains($0.age) })) && - (selectedClubs.isEmpty || selectedClubs.contains(tournament.codeClub!)) + (selectedClubs.isEmpty || (tournament.codeClub != nil && selectedClubs.contains(tournament.codeClub!))) && (dayPeriod == .all || (dayPeriod != .all && dayPeriod == tournament.dayPeriod)) && @@ -100,7 +100,7 @@ class FederalDataViewModel { func countForTournamentBuilds(from tournaments: [any FederalTournamentHolder]) -> Int { tournaments.filter({ tournament in - (selectedClubs.isEmpty || selectedClubs.contains(tournament.codeClub!)) + (selectedClubs.isEmpty || (tournament.codeClub != nil && selectedClubs.contains(tournament.codeClub!))) && (dayPeriod == .all || (dayPeriod != .all && dayPeriod == tournament.dayPeriod)) && @@ -151,7 +151,7 @@ class FederalDataViewModel { && (ageCategories.isEmpty || ageCategories.contains(build.age)) && - (selectedClubs.isEmpty || selectedClubs.contains(tournament.codeClub!)) + (selectedClubs.isEmpty || (tournament.codeClub != nil && selectedClubs.contains(tournament.codeClub!))) && (dayPeriod == .all || (dayPeriod != .all && dayPeriod == tournament.dayPeriod)) && From 86570858d1452146a41a1aa34af223223c576a8c Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 3 Feb 2025 17:39:22 +0100 Subject: [PATCH 4/4] v1.1.6 --- PadelClub.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index c0b888e..20266ce 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3329,7 +3329,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.5; + MARKETING_VERSION = 1.1.6; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3376,7 +3376,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.5; + MARKETING_VERSION = 1.1.6; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "";