little fixes

sync2
Raz 1 year ago
parent 0161203e84
commit 6391ace9e0
  1. 12
      PadelClub.xcodeproj/project.pbxproj
  2. 6
      PadelClub/Views/Navigation/Agenda/ActivityView.swift
  3. 54
      PadelClub/Views/Navigation/Agenda/TournamentSubscriptionView.swift
  4. 12
      PadelClub/Views/Planning/PlanningSettingsView.swift
  5. 17
      PadelClub/Views/Tournament/FileImportView.swift

@ -3126,7 +3126,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 = 1; CURRENT_PROJECT_VERSION = 2;
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\"";
@ -3170,7 +3170,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 = 1; CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6; DEVELOPMENT_TEAM = BQ3Y44M3Q6;
@ -3285,7 +3285,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 = 1; CURRENT_PROJECT_VERSION = 2;
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\"";
@ -3327,7 +3327,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 = 1; CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6; DEVELOPMENT_TEAM = BQ3Y44M3Q6;
@ -3369,7 +3369,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 = 1; CURRENT_PROJECT_VERSION = 2;
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\"";
@ -3411,7 +3411,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 = 1; CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6; DEVELOPMENT_TEAM = BQ3Y44M3Q6;

@ -150,8 +150,8 @@ struct ActivityView: View {
} }
} }
//.searchable(text: $searchText) //.searchable(text: $searchText)
.onAppear { presentToolbar = true } // .onAppear { presentToolbar = true }
.onDisappear { presentToolbar = false } // .onDisappear { presentToolbar = false }
.refreshable { .refreshable {
if navigation.agendaDestination == .tenup { if navigation.agendaDestination == .tenup {
federalDataViewModel.federalTournaments.removeAll() federalDataViewModel.federalTournaments.removeAll()
@ -231,7 +231,7 @@ struct ActivityView: View {
} }
} }
if presentToolbar, tournaments.isEmpty == false, federalDataViewModel.areFiltersEnabled() || navigation.agendaDestination == .around { if tournaments.isEmpty == false, federalDataViewModel.areFiltersEnabled() || navigation.agendaDestination == .around {
ToolbarItemGroup(placement: .bottomBar) { ToolbarItemGroup(placement: .bottomBar) {
VStack(spacing: 0) { VStack(spacing: 0) {
let searchStatus = _searchStatus() let searchStatus = _searchStatus()

@ -88,19 +88,6 @@ struct TournamentSubscriptionView: View {
var body: some View { var body: some View {
List { List {
if didSaveInCalendar {
Section {
LabeledContent {
Image(systemName: "checkmark").foregroundStyle(.green)
} label: {
Text("Le tournoi a bien été ajouté dans votre calendrier par défaut")
let eventStore = EKEventStore()
if let defaultCalendarForNewEvents = eventStore.defaultCalendarForNewEvents {
Text(defaultCalendarForNewEvents.title)
}
}
}
}
Section { Section {
LabeledContent("Tournoi") { LabeledContent("Tournoi") {
Text(federalTournament.libelle ?? "Tournoi") Text(federalTournament.libelle ?? "Tournoi")
@ -160,9 +147,29 @@ struct TournamentSubscriptionView: View {
} }
} }
Section {
Text(messageBody)
} header: {
Text("Message preparé par Padel Club")
} footer: {
CopyPasteButtonView(pasteValue: messageBody)
}
}
.toolbarBackground(.visible, for: .bottomBar)
.toolbarBackground(.visible, for: .navigationBar)
.overlay(alignment: .bottom) {
if didSaveInCalendar {
Label("Ajouté dans votre calendrier par défaut", systemImage: "checkmark")
.toastFormatted()
.deferredRendering(for: .seconds(3))
}
}
.toolbar(content: {
ToolbarItem(placement: .status) {
Menu {
if let courrielEngagement = federalTournament.courrielEngagement { if let courrielEngagement = federalTournament.courrielEngagement {
Section { Section {
RowButtonView("S'inscrire par email") { RowButtonView("S'inscrire par email", systemImage: "envelope") {
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)
} }
} }
@ -171,7 +178,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("S'inscrire par message") { RowButtonView("S'inscrire par message", systemImage: "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)
} }
} }
@ -182,18 +189,16 @@ 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)
} }
} label: {
Text("Contact et inscription")
}
.menuStyle(.button)
.buttonStyle(.borderedProminent)
.offset(y:-2)
} }
} ToolbarItem(placement: .topBarTrailing) {
.toolbar(content: {
Menu { Menu {
ShareLink(item: federalTournament.sharePartnerMessage) { ShareLink(item: federalTournament.sharePartnerMessage) {
Label("Prévenir votre partenaire", systemImage: "person.2") Label("Prévenir votre partenaire", systemImage: "person.2")
@ -215,6 +220,7 @@ struct TournamentSubscriptionView: View {
} label: { } label: {
LabelOptions() LabelOptions()
} }
}
}) })
.alert("Un problème est survenu", isPresented: messageSentFailed) { .alert("Un problème est survenu", isPresented: messageSentFailed) {
Button("OK") { Button("OK") {

@ -202,12 +202,16 @@ struct PlanningSettingsView: View {
.toastFormatted() .toastFormatted()
.deferredRendering(for: .seconds(2)) .deferredRendering(for: .seconds(2))
} }
} else if deletingDone { }
Label("Tous les horaires ont été supprimés", systemImage: "clock.badge.xmark.fill")
if deletingDone {
Label("Tous les horaires ont été supprimés", systemImage: "clock.badge.xmark")
.toastFormatted() .toastFormatted()
.deferredRendering(for: .seconds(2)) .deferredRendering(for: .seconds(2))
} else if deletingDateMatchesDone { }
Label("Horaires des matchs supprimés", systemImage: "clock.badge.xmark.fill")
if deletingDateMatchesDone {
Label("Horaires des matchs supprimés", systemImage: "clock.badge.xmark")
.toastFormatted() .toastFormatted()
.deferredRendering(for: .seconds(2)) .deferredRendering(for: .seconds(2))
} }

@ -311,14 +311,23 @@ struct FileImportView: View {
} label: { } label: {
Text("Équipe\(_filteredTeams.count.pluralSuffix) \(tournament.tournamentCategory.importingRawValue) \(tournament.federalTournamentAge.importingRawValue) détectée\(_filteredTeams.count.pluralSuffix)") Text("Équipe\(_filteredTeams.count.pluralSuffix) \(tournament.tournamentCategory.importingRawValue) \(tournament.federalTournamentAge.importingRawValue) détectée\(_filteredTeams.count.pluralSuffix)")
} }
} footer: {
if previousTeams.isEmpty == false {
Text("La liste ci-dessous n'est qu'une indication d'évolution par rapport au seul poids d'équipe. Cela ne tient pas compte des dates d'inscriptions, WCs et autres éléments.").foregroundStyle(.logoRed)
}
}
let unfound = _getUnfound(tournament: tournament, fromTeams: _filteredTeams)
if unfound.isEmpty == false {
Section {
LabeledContent { LabeledContent {
Text(_filteredTeams.count.formatted()) Text(unfound.count.formatted())
} label: { } label: {
Text("Équipe\(_filteredTeams.count.pluralSuffix) \(tournament.tournamentCategory.importingRawValue) \(tournament.federalTournamentAge.importingRawValue) détectée\(_filteredTeams.count.pluralSuffix)") Text("Équipe\(unfound.count.pluralSuffix) précédente\(unfound.count.pluralSuffix) introuvable\(unfound.count.pluralSuffix)")
} }
} footer: { } footer: {
if previousTeams.isEmpty == false { Text("Équipes de votre liste précédente non détectées dans ce nouveau fichier")
Text("La liste ci-dessous n'est qu'une indication d'évolution par rapport au seul poids d'équipe. Cela ne tient pas compte des dates d'inscriptions, WCs et autres éléments.").foregroundStyle(.logoRed)
} }
} }

Loading…
Cancel
Save