fix 18.2 bug

online_reg
Raz 10 months ago
parent 1d8ccc97d3
commit e1ffa4830a
  1. 8
      PadelClub.xcodeproj/project.pbxproj
  2. 2
      PadelClub/Data/TeamRegistration.swift
  3. 2
      PadelClub/Data/Tournament.swift
  4. 2
      PadelClub/Views/Calling/Components/PlayersWithoutContactView.swift
  5. 12
      PadelClub/Views/Tournament/Screen/Components/InscriptionInfoView.swift
  6. 13
      PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift

@ -3262,7 +3262,7 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
@ -3286,7 +3286,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.41; MARKETING_VERSION = 1.0.42;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -3307,7 +3307,7 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6; DEVELOPMENT_TEAM = BQ3Y44M3Q6;
@ -3330,7 +3330,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.41; MARKETING_VERSION = 1.0.42;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

@ -173,7 +173,7 @@ final class TeamRegistration: ModelObject, Storable {
} }
func getPhoneNumbers() -> [String] { func getPhoneNumbers() -> [String] {
return players().compactMap { $0.phoneNumber }.filter({ $0.isMobileNumber() }) return players().compactMap { $0.phoneNumber }.filter({ $0.isEmpty == false })
} }
func getMail() -> [String] { func getMail() -> [String] {

@ -1136,7 +1136,7 @@ defer {
} }
} }
func registrationIssues() async -> Int { func registrationIssues() -> Int {
let players : [PlayerRegistration] = unsortedPlayers() let players : [PlayerRegistration] = unsortedPlayers()
let selectedTeams : [TeamRegistration] = selectedSortedTeams() let selectedTeams : [TeamRegistration] = selectedSortedTeams()
let callDateIssue : [TeamRegistration] = selectedTeams.filter { $0.callDate != nil && isStartDateIsDifferentThanCallDate($0) } let callDateIssue : [TeamRegistration] = selectedTeams.filter { $0.callDate != nil && isStartDateIsDifferentThanCallDate($0) }

@ -45,7 +45,7 @@ struct PlayersWithoutContactView: View {
LabeledContent { LabeledContent {
Text(withoutPhones.count.formatted()) Text(withoutPhones.count.formatted())
} label: { } label: {
Text("Joueurs sans téléphone portable") Text("Joueurs sans téléphone portable français")
} }
} }
} header: { } header: {

@ -9,7 +9,7 @@ import SwiftUI
struct InscriptionInfoView: View { struct InscriptionInfoView: View {
@EnvironmentObject var dataStore: DataStore @EnvironmentObject var dataStore: DataStore
@Environment(Tournament.self) var tournament let tournament: Tournament
@State private var players : [PlayerRegistration] = [] @State private var players : [PlayerRegistration] = []
@State private var selectedTeams : [TeamRegistration] = [] @State private var selectedTeams : [TeamRegistration] = []
@ -244,16 +244,17 @@ struct InscriptionInfoView: View {
Text("importé du fichier beach-padel sans licence valide ou créé sans licence") Text("importé du fichier beach-padel sans licence valide ou créé sans licence")
} }
} }
.task { .onAppear {
await _getIssues() DispatchQueue.main.async {
_getIssues()
}
} }
.navigationTitle("Synthèse") .navigationTitle("Synthèse")
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar) .toolbarBackground(.visible, for: .navigationBar)
} }
private func _getIssues() async { private func _getIssues() {
Task {
players = tournament.unsortedPlayers() players = tournament.unsortedPlayers()
selectedTeams = tournament.selectedSortedTeams() selectedTeams = tournament.selectedSortedTeams()
callDateIssue = selectedTeams.filter { $0.callDate != nil && tournament.isStartDateIsDifferentThanCallDate($0) } callDateIssue = selectedTeams.filter { $0.callDate != nil && tournament.isStartDateIsDifferentThanCallDate($0) }
@ -269,7 +270,6 @@ struct InscriptionInfoView: View {
playersMissing = selectedTeams.filter({ $0.unsortedPlayers().count < 2 }) playersMissing = selectedTeams.filter({ $0.unsortedPlayers().count < 2 })
} }
} }
}
//#Preview { //#Preview {
// InscriptionInfoView() // InscriptionInfoView()

@ -173,8 +173,8 @@ struct InscriptionManagerView: View {
self.teamsHash = _simpleHash(ids: selectedSortedTeams.map { $0.id }) self.teamsHash = _simpleHash(ids: selectedSortedTeams.map { $0.id })
} }
self.registrationIssues = nil self.registrationIssues = nil
Task { DispatchQueue.main.async {
self.registrationIssues = await tournament.registrationIssues() self.registrationIssues = tournament.registrationIssues()
} }
} }
@ -718,14 +718,7 @@ struct InscriptionManagerView: View {
if tournament.isAnimation() == false { if tournament.isAnimation() == false {
NavigationLink { NavigationLink {
InscriptionInfoView() InscriptionInfoView(tournament: tournament)
.environment(tournament)
.onDisappear {
self.registrationIssues = nil
Task {
self.registrationIssues = await tournament.registrationIssues()
}
}
} label: { } label: {
LabeledContent { LabeledContent {
if let registrationIssues { if let registrationIssues {

Loading…
Cancel
Save