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

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

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

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

@ -9,7 +9,7 @@ import SwiftUI
struct InscriptionInfoView: View {
@EnvironmentObject var dataStore: DataStore
@Environment(Tournament.self) var tournament
let tournament: Tournament
@State private var players : [PlayerRegistration] = []
@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")
}
}
.task {
await _getIssues()
.onAppear {
DispatchQueue.main.async {
_getIssues()
}
}
.navigationTitle("Synthèse")
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
}
private func _getIssues() async {
Task {
private func _getIssues() {
players = tournament.unsortedPlayers()
selectedTeams = tournament.selectedSortedTeams()
callDateIssue = selectedTeams.filter { $0.callDate != nil && tournament.isStartDateIsDifferentThanCallDate($0) }
@ -268,7 +269,6 @@ struct InscriptionInfoView: View {
entriesFromBeachPadel = tournament.unsortedTeams().filter({ $0.isImported() })
playersMissing = selectedTeams.filter({ $0.unsortedPlayers().count < 2 })
}
}
}
//#Preview {

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

Loading…
Cancel
Save