sync2
Raz 1 year ago
parent 556f57004d
commit d4bae677d4
  1. 2
      PadelClub/Views/Cashier/Event/EventCreationView.swift
  2. 2
      PadelClub/Views/Cashier/Event/EventSettingsView.swift
  3. 44
      PadelClub/Views/Navigation/Agenda/TournamentSubscriptionView.swift
  4. 7
      PadelClub/Views/Tournament/TournamentInitView.swift
  5. 4
      PadelClub/Views/Tournament/TournamentView.swift

@ -64,7 +64,7 @@ struct EventCreationView: View {
} }
} }
TextField("Nom de l'événement", text: $eventName, axis: .vertical) TextField("Description de l'événement", text: $eventName, axis: .vertical)
.lineLimit(2) .lineLimit(2)
.keyboardType(.alphabet) .keyboardType(.alphabet)
.multilineTextAlignment(.leading) .multilineTextAlignment(.leading)

@ -46,7 +46,7 @@ struct EventSettingsView: View {
var body: some View { var body: some View {
Form { Form {
Section { Section {
TextField("Nom de l'événement", text: $eventName, axis: .vertical) TextField("Description de l'événement", text: $eventName, axis: .vertical)
.lineLimit(2) .lineLimit(2)
.keyboardType(.alphabet) .keyboardType(.alphabet)
.multilineTextAlignment(.leading) .multilineTextAlignment(.leading)

@ -37,6 +37,16 @@ struct TournamentSubscriptionView: View {
LabeledContent("Épreuve") { LabeledContent("Épreuve") {
Text(build.buildHolderTitle()) Text(build.buildHolderTitle())
} }
LabeledContent("JAP") {
Text(federalTournament.umpireLabel())
}
LabeledContent("Mail") {
Text(federalTournament.mailLabel())
}
LabeledContent("Téléphone") {
Text(federalTournament.phoneLabel())
}
} header: { } header: {
Text("Informations") Text("Informations")
} }
@ -67,28 +77,18 @@ struct TournamentSubscriptionView: View {
} }
} }
} header: { } header: {
HStack { if selectedPlayers.isEmpty == false {
Text("Poids") HStack {
Spacer() Text("Poids de l'équipe")
Text(selectedPlayers.map { $0.rank }.reduce(0, +).formatted()) Spacer()
} Text(selectedPlayers.map { $0.rank }.reduce(0, +).formatted())
} }
Section {
LabeledContent("JAP") {
Text(federalTournament.umpireLabel())
}
LabeledContent("Mail") {
Text(federalTournament.mailLabel())
}
LabeledContent("Téléphone") {
Text(federalTournament.phoneLabel())
} }
} }
if let courrielEngagement = federalTournament.courrielEngagement { if let courrielEngagement = federalTournament.courrielEngagement {
Section { Section {
RowButtonView("Contacter par email") { RowButtonView("S'inscrire par email") {
contactType = .mail(date: nil, recipients: [courrielEngagement], bccRecipients: nil, body: messageBody, subject: messageSubject, tournamentBuild: build as? TournamentBuild) contactType = .mail(date: nil, recipients: [courrielEngagement], bccRecipients: nil, body: messageBody, subject: messageSubject, tournamentBuild: build as? TournamentBuild)
} }
} }
@ -97,7 +97,7 @@ struct TournamentSubscriptionView: View {
if let installation = federalTournament.installation, let telephone = installation.telephone { if let installation = federalTournament.installation, let telephone = installation.telephone {
if telephone.isMobileNumber() { if telephone.isMobileNumber() {
Section { Section {
RowButtonView("Contacter par message") { RowButtonView("S'inscrire par message") {
contactType = .message(date: nil, recipients: [telephone], body: messageBodyShort, tournamentBuild: build as? TournamentBuild) contactType = .message(date: nil, recipients: [telephone], body: messageBodyShort, tournamentBuild: build as? TournamentBuild)
} }
} }
@ -108,6 +108,14 @@ struct TournamentSubscriptionView: View {
Label("Appeler", systemImage: "phone") Label("Appeler", systemImage: "phone")
} }
} }
Section {
Text(messageBody)
} header: {
Text("Message preparé par Padel Club")
} footer: {
CopyPasteButtonView(pasteValue: messageBody)
}
} }
} }

@ -22,7 +22,12 @@ struct TournamentInitView: View {
LabeledContent { LabeledContent {
Text(tournaments.count.formatted() + " tournoi" + tournaments.count.pluralSuffix) Text(tournaments.count.formatted() + " tournoi" + tournaments.count.pluralSuffix)
} label: { } label: {
Text("Gestion de l'événement") Text("Réglages de l'événement")
if let eventName = event.name, eventName.isEmpty == false {
Text(eventName).foregroundStyle(.secondary)
} else {
Text("Aucune description").foregroundStyle(.secondary)
}
} }
} }
} }

@ -131,7 +131,7 @@ struct TournamentView: View {
} }
NavigationLink(value: Screen.event) { NavigationLink(value: Screen.event) {
Text("Gestion de l'événement") Text("Réglages de l'événement")
} }
} }
@ -176,7 +176,7 @@ struct TournamentView: View {
} }
NavigationLink(value: Screen.event) { NavigationLink(value: Screen.event) {
Text("Gestion de l'événement") Text("Réglages de l'événement")
} }
NavigationLink(value: Screen.settings) { NavigationLink(value: Screen.settings) {
LabelSettings() LabelSettings()

Loading…
Cancel
Save