fix small stuff about p500 deadlines / call subject / event url listing / copy paste licence / call access before structure done / detached await task when deleting tournament

sync3
Raz 7 months ago
parent fae48947a6
commit 0cbad6ef2d
  1. 12
      PadelClub.xcodeproj/project.pbxproj
  2. 5
      PadelClub/Data/Tournament.swift
  3. 2
      PadelClub/Views/Calling/CallView.swift
  4. 2
      PadelClub/Views/Calling/SendToAllView.swift
  5. 2
      PadelClub/Views/Cashier/Event/EventSettingsView.swift
  6. 4
      PadelClub/Views/Shared/ImportedPlayerView.swift
  7. 8
      PadelClub/Views/Tournament/Screen/Components/TournamentStatusView.swift
  8. 52
      PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift
  9. 2
      PadelClub/Views/Tournament/TournamentInscriptionView.swift
  10. 5
      PadelClub/Views/Tournament/TournamentView.swift

@ -3714,7 +3714,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.16;
MARKETING_VERSION = 1.2.17;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3759,7 +3759,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.16;
MARKETING_VERSION = 1.2.17;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3877,7 +3877,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.16;
MARKETING_VERSION = 1.2.17;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3922,7 +3922,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.16;
MARKETING_VERSION = 1.2.17;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3966,7 +3966,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.16;
MARKETING_VERSION = 1.2.17;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub.beta;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -4008,7 +4008,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.16;
MARKETING_VERSION = 1.2.17;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub.beta;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

@ -2434,6 +2434,11 @@ defer {
}
}
func mailSubject() -> String {
let subject = [tournamentTitle(hideSenior: true), formattedDate(.short), clubName].compactMap({ $0 }).joined(separator: " | ")
return subject
}
// MARK: -
func insertOnServer() throws {

@ -391,7 +391,7 @@ struct CallView: View {
recipients: tournament.umpireMail(),
bccRecipients: teams.flatMap { $0.getMail() },
body: finalMessage(reSummon: reSummon, forcedEmptyMessage: forcedEmptyMessage),
subject: tournament.tournamentTitle(hideSenior: true),
subject: tournament.mailSubject(),
tournamentBuild: nil)
}

@ -276,7 +276,7 @@ struct SendToAllView: View {
if contactMethod == 0 {
contactType = .message(date: nil, recipients: _teams().flatMap { $0.unsortedPlayers() }.compactMap { $0.phoneNumber }, body: finalMessage(), tournamentBuild: nil)
} else {
contactType = .mail(date: nil, recipients: tournament.umpireMail(), bccRecipients: _teams().flatMap { $0.unsortedPlayers() }.compactMap { $0.email }, body: finalMessage(), subject: tournament.tournamentTitle(hideSenior: true), tournamentBuild: nil)
contactType = .mail(date: nil, recipients: tournament.umpireMail(), bccRecipients: _teams().flatMap { $0.unsortedPlayers() }.compactMap { $0.email }, body: finalMessage(), subject: tournament.mailSubject(), tournamentBuild: nil)
}
}
}

@ -26,7 +26,7 @@ struct EventSettingsView: View {
link.append("\n\n")
link.append(tournaments.compactMap({ tournament in
if let url = tournament.shareURL(pageLink) {
if tournament.isCanceled == false, tournament.isDeleted == false, let url = tournament.shareURL(pageLink) {
var tournamentLink = [String]()
tournamentLink.append(tournament.tournamentTitle(.title))
tournamentLink.append(url.absoluteString)

@ -115,7 +115,9 @@ struct ImportedPlayerView: View {
}
}
.contextMenu {
CopyPasteButtonView(title: "Licence", pasteValue: player.formattedLicense())
let formattedLicense = player.formattedLicense()
CopyPasteButtonView(title: "Licence sans la lettre", pasteValue: formattedLicense.strippedLicense)
CopyPasteButtonView(title: "Licence avec la lettre", pasteValue: formattedLicense)
}
}
}

@ -72,9 +72,13 @@ struct TournamentStatusView: View {
dataStore.tournaments.addOrUpdate(instance: tournament)
} else {
if let event, isLastTournament {
dataStore.events.delete(instance: event)
Task.detached(priority: .background) {
await dataStore.events.delete(instance: event)
}
} else {
dataStore.tournaments.delete(instance: tournament)
Task.detached(priority: .background) {
await dataStore.tournaments.delete(instance: tournament)
}
}
}
if eventDismiss == false || isLastTournament {

@ -384,41 +384,45 @@ struct InscriptionManagerView: View {
}
if tournament.isAnimation() == false {
if tournament.inscriptionClosed() == false {
Divider()
Divider()
Section {
Button("+1 en tableau") {
tournament.addWildCard(1, .bracket)
Section {
Button("+1 en tableau") {
tournament.addWildCard(1, .bracket)
_setHash()
}
if tournament.groupStageCount > 0 {
Button("+1 en poules") {
tournament.addWildCard(1, .groupStage)
_setHash()
}
if tournament.groupStageCount > 0 {
Button("+1 en poules") {
tournament.addWildCard(1, .groupStage)
_setHash()
}
}
} header: {
Text("Ajout de wildcards")
}
} header: {
Text("Ajout de wildcards")
}
if tournament.inscriptionClosed() == false {
Button("Bloquer une place") {
tournament.addEmptyTeamRegistration(1)
_setHash()
}
}
Divider()
Divider()
Button {
presentImportView = true
} label: {
Label("Importer beach-padel", systemImage: "square.and.arrow.down")
}
Link(destination: URLs.beachPadel.url) {
Label("beach-padel.app.fft.fr", systemImage: "safari")
}
Button {
presentImportView = true
} label: {
Label("Importer beach-padel", systemImage: "square.and.arrow.down")
}
Link(destination: URLs.beachPadel.url) {
Label("beach-padel.app.fft.fr", systemImage: "safari")
}
if tournament.inscriptionClosed() == false {
Divider()
_importTeamsMenuView(title: "Importer des paires")
_sharingTeamsMenuView()

@ -29,7 +29,7 @@ struct TournamentInscriptionView: View {
}
}
if tournament.inscriptionClosed() == false && tournament.hasStarted() == false {
if tournament.hasStarted() == false {
TournamentDeadlinesView(tournament: tournament)
}
}

@ -239,6 +239,11 @@ struct TournamentView: View {
NavigationLink(value: Screen.settings) {
LabelSettings()
}
NavigationLink(value: Screen.call) {
Text("Convocations")
}
NavigationLink(value: Screen.structure) {
LabelStructure()
}

Loading…
Cancel
Save