Compare commits

..

No commits in common. 'main' and 'newoffer2025' have entirely different histories.

  1. 8
      CLAUDE.md
  2. 183
      PadelClub.xcodeproj/project.pbxproj
  3. 25
      PadelClub/AppDelegate.swift
  4. 7
      PadelClub/Data/Federal/FederalPlayer.swift
  5. 104
      PadelClub/Data/Federal/FederalTournament.swift
  6. 36
      PadelClub/Extensions/Tournament+Extensions.swift
  7. 22
      PadelClub/Extensions/View+Extensions.swift
  8. 13
      PadelClub/PadelClubApp.swift
  9. 2
      PadelClub/Utils/FileImportManager.swift
  10. 74
      PadelClub/Utils/Network/FederalDataService.swift
  11. 2
      PadelClub/Utils/Network/NetworkFederalService.swift
  12. 77
      PadelClub/Utils/Network/PaymentService.swift
  13. 15
      PadelClub/Utils/Tips.swift
  14. 6
      PadelClub/ViewModel/AgendaDestination.swift
  15. 13
      PadelClub/ViewModel/FederalDataViewModel.swift
  16. 2
      PadelClub/ViewModel/NavigationViewModel.swift
  17. 10
      PadelClub/ViewModel/SearchViewModel.swift
  18. 5
      PadelClub/ViewModel/TabDestination.swift
  19. 2
      PadelClub/Views/Calling/BracketCallingView.swift
  20. 11
      PadelClub/Views/Calling/CallMessageCustomizationView.swift
  21. 4
      PadelClub/Views/Calling/CallSettingsView.swift
  22. 119
      PadelClub/Views/Calling/CallView.swift
  23. 24
      PadelClub/Views/Calling/Components/MenuWarningView.swift
  24. 7
      PadelClub/Views/Calling/Components/PlayersWithoutContactView.swift
  25. 98
      PadelClub/Views/Calling/SendToAllView.swift
  26. 60
      PadelClub/Views/Calling/TeamsCallingView.swift
  27. 64
      PadelClub/Views/Cashier/CashierSettingsView.swift
  28. 14
      PadelClub/Views/Cashier/CashierView.swift
  29. 12
      PadelClub/Views/Cashier/Event/EventCreationView.swift
  30. 51
      PadelClub/Views/Cashier/Event/EventSettingsView.swift
  31. 29
      PadelClub/Views/Cashier/Event/EventTournamentsView.swift
  32. 11
      PadelClub/Views/Cashier/Event/EventView.swift
  33. 91
      PadelClub/Views/Cashier/Event/TournamentPickerView.swift
  34. 11
      PadelClub/Views/Club/ClubDetailView.swift
  35. 75
      PadelClub/Views/Club/ClubsView.swift
  36. 15
      PadelClub/Views/Club/Shared/ClubCourtSetupView.swift
  37. 25
      PadelClub/Views/Components/BarButtonView.swift
  38. 14
      PadelClub/Views/Components/ButtonValidateView.swift
  39. 2
      PadelClub/Views/Components/FortuneWheelView.swift
  40. 12
      PadelClub/Views/Components/Labels.swift
  41. 15
      PadelClub/Views/Components/StepperView.swift
  42. 20
      PadelClub/Views/GroupStage/Components/GroupStageSettingsView.swift
  43. 6
      PadelClub/Views/GroupStage/GroupStageView.swift
  44. 8
      PadelClub/Views/GroupStage/GroupStagesSettingsView.swift
  45. 7
      PadelClub/Views/GroupStage/GroupStagesView.swift
  46. 18
      PadelClub/Views/GroupStage/RankingGroupStageSetupView.swift
  47. 10
      PadelClub/Views/Match/Components/MatchDateView.swift
  48. 4
      PadelClub/Views/Match/Components/PlayerBlockView.swift
  49. 78
      PadelClub/Views/Match/MatchDetailView.swift
  50. 1
      PadelClub/Views/Match/MatchSetupView.swift
  51. 249
      PadelClub/Views/Navigation/Agenda/ActivityView.swift
  52. 11
      PadelClub/Views/Navigation/Agenda/CalendarView.swift
  53. 151
      PadelClub/Views/Navigation/Agenda/EventListView.swift
  54. 133
      PadelClub/Views/Navigation/Agenda/TournamentLookUpView.swift
  55. 76
      PadelClub/Views/Navigation/Agenda/TournamentSubscriptionView.swift
  56. 36
      PadelClub/Views/Navigation/Agenda/WeekdaySelectionView.swift
  57. 127
      PadelClub/Views/Navigation/MainView.swift
  58. 226
      PadelClub/Views/Navigation/MyAccount/MyAccountView.swift
  59. 239
      PadelClub/Views/Navigation/OnboardingView.swift
  60. 51
      PadelClub/Views/Navigation/Ongoing/OngoingContainerView.swift
  61. 2
      PadelClub/Views/Navigation/Organizer/TournamentOrganizerView.swift
  62. 23
      PadelClub/Views/Navigation/Toolbox/APICallsListView.swift
  63. 54
      PadelClub/Views/Navigation/Toolbox/DebugSettingsView.swift
  64. 193
      PadelClub/Views/Navigation/Toolbox/ToolboxView.swift
  65. 2
      PadelClub/Views/Navigation/Umpire/PadelClubView.swift
  66. 68
      PadelClub/Views/Navigation/Umpire/UmpireOptionsView.swift
  67. 85
      PadelClub/Views/Navigation/Umpire/UmpireSettingsView.swift
  68. 477
      PadelClub/Views/Navigation/Umpire/UmpireView.swift
  69. 10
      PadelClub/Views/Planning/CourtAvailabilitySettingsView.swift
  70. 12
      PadelClub/Views/Planning/PlanningSettingsView.swift
  71. 110
      PadelClub/Views/Planning/PlanningView.swift
  72. 2
      PadelClub/Views/Planning/SchedulerView.swift
  73. 28
      PadelClub/Views/Player/Components/PlayerPopoverView.swift
  74. 32
      PadelClub/Views/Player/PlayerDetailView.swift
  75. 6
      PadelClub/Views/Round/DrawLogsView.swift
  76. 3
      PadelClub/Views/Round/LoserRoundView.swift
  77. 7
      PadelClub/Views/Round/LoserRoundsView.swift
  78. 9
      PadelClub/Views/Round/RoundSettingsView.swift
  79. 13
      PadelClub/Views/Round/RoundView.swift
  80. 6
      PadelClub/Views/Round/RoundsView.swift
  81. 28
      PadelClub/Views/Score/EditScoreView.swift
  82. 13
      PadelClub/Views/Score/FollowUpMatchView.swift
  83. 6
      PadelClub/Views/Score/SetInputView.swift
  84. 2
      PadelClub/Views/Shared/LearnMoreSheetView.swift
  85. 96
      PadelClub/Views/Shared/SelectablePlayerListView.swift
  86. 84
      PadelClub/Views/Shared/SupportButtonView.swift
  87. 2
      PadelClub/Views/Shared/TournamentFilterView.swift
  88. 98
      PadelClub/Views/Team/EditingTeamView.swift
  89. 268
      PadelClub/Views/Team/PaymentLinkManagerView.swift
  90. 51
      PadelClub/Views/Team/PaymentRequestButton.swift
  91. 24
      PadelClub/Views/Team/PaymentService.swift
  92. 52
      PadelClub/Views/Team/TeamMatchesView.swift
  93. 2
      PadelClub/Views/Team/TeamRestingView.swift
  94. 6
      PadelClub/Views/Tournament/ConsolationTournamentImportView.swift
  95. 4
      PadelClub/Views/Tournament/Screen/AddTeamView.swift
  96. 55
      PadelClub/Views/Tournament/Screen/BroadcastView.swift
  97. 240
      PadelClub/Views/Tournament/Screen/Components/HeadManagerView.swift
  98. 13
      PadelClub/Views/Tournament/Screen/Components/TournamentFormatSelectionView.swift
  99. 162
      PadelClub/Views/Tournament/Screen/Components/TournamentGeneralSettingsView.swift
  100. 7
      PadelClub/Views/Tournament/Screen/Components/TournamentMatchFormatsSettingsView.swift
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,8 +0,0 @@
## Padel Club
This is the main directory of a Swift app that helps padel tournament organizers.
The project is structured around three projects linked in the PadelClub.xcworkspace:
- PadelClub: this one, which mostly contains the UI for the project
- PadelClubData: the business logic for the app
- LeStorage: a local storage with a synchronization layer

@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
C40CD2F32C412681000DBD9A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C40CD2F22C412681000DBD9A /* AppDelegate.swift */; };
C410F54E2DF340FE009713ED /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4D05D462DC10AE5009B053C /* WebKit.framework */; };
C411C9C32BEBA453003017AD /* ServerDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C411C9C22BEBA453003017AD /* ServerDataTests.swift */; };
C411C9C92BF219CB003017AD /* UserDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C411C9C82BF219CB003017AD /* UserDataTests.swift */; };
C411C9D02BF38F41003017AD /* TokenExemptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C411C9CF2BF38F41003017AD /* TokenExemptionTests.swift */; };
@ -151,34 +150,10 @@
FF1F4B8A2BFA02A4000B4573 /* groupstage-template.html in Resources */ = {isa = PBXBuildFile; fileRef = FF1F4B772BFA0105000B4573 /* groupstage-template.html */; };
FF1F4B8B2BFA02A4000B4573 /* groupstageentrant-template.html in Resources */ = {isa = PBXBuildFile; fileRef = FF1F4B792BFA0105000B4573 /* groupstageentrant-template.html */; };
FF1F4B8C2BFA02A4000B4573 /* match-template.html in Resources */ = {isa = PBXBuildFile; fileRef = FF1F4B7D2BFA0105000B4573 /* match-template.html */; };
FF2099042EA0D99A003CE880 /* PaymentLinkManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2099032EA0D99A003CE880 /* PaymentLinkManagerView.swift */; };
FF2099052EA0D99A003CE880 /* PaymentLinkManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2099032EA0D99A003CE880 /* PaymentLinkManagerView.swift */; };
FF2099062EA0D99A003CE880 /* PaymentLinkManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2099032EA0D99A003CE880 /* PaymentLinkManagerView.swift */; };
FF2099082EA140A2003CE880 /* TeamMatchesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2099072EA140A2003CE880 /* TeamMatchesView.swift */; };
FF2099092EA140A2003CE880 /* TeamMatchesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2099072EA140A2003CE880 /* TeamMatchesView.swift */; };
FF20990A2EA140A2003CE880 /* TeamMatchesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2099072EA140A2003CE880 /* TeamMatchesView.swift */; };
FF20990C2EA1430E003CE880 /* PlayerSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF20990B2EA1430E003CE880 /* PlayerSearchView.swift */; };
FF20990D2EA1430E003CE880 /* PlayerSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF20990B2EA1430E003CE880 /* PlayerSearchView.swift */; };
FF20990E2EA1430E003CE880 /* PlayerSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF20990B2EA1430E003CE880 /* PlayerSearchView.swift */; };
FF2B51552C7A4DAF00FFF126 /* PlanningByCourtView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2B51542C7A4DAF00FFF126 /* PlanningByCourtView.swift */; };
FF2B51612C7E302C00FFF126 /* local.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = FF2B51602C7E302C00FFF126 /* local.sqlite */; };
FF2B6F5E2C036A1500835EE7 /* EventLinksView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2B6F5D2C036A1400835EE7 /* EventLinksView.swift */; };
FF2EFBF02BDE295E0049CE3B /* SendToAllView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2EFBEF2BDE295E0049CE3B /* SendToAllView.swift */; };
FF30ACED2E8D700B008B6006 /* PaymentService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30ACEC2E8D700B008B6006 /* PaymentService.swift */; };
FF30ACEE2E8D700B008B6006 /* PaymentService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30ACEC2E8D700B008B6006 /* PaymentService.swift */; };
FF30ACEF2E8D700B008B6006 /* PaymentService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30ACEC2E8D700B008B6006 /* PaymentService.swift */; };
FF30ACF12E8D7078008B6006 /* PaymentRequestButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30ACF02E8D7078008B6006 /* PaymentRequestButton.swift */; };
FF30ACF22E8D7078008B6006 /* PaymentRequestButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30ACF02E8D7078008B6006 /* PaymentRequestButton.swift */; };
FF30ACF32E8D7078008B6006 /* PaymentRequestButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30ACF02E8D7078008B6006 /* PaymentRequestButton.swift */; };
FF30AD302E92A994008B6006 /* MyAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD2F2E92A994008B6006 /* MyAccountView.swift */; };
FF30AD312E92A994008B6006 /* MyAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD2F2E92A994008B6006 /* MyAccountView.swift */; };
FF30AD322E92A994008B6006 /* MyAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD2F2E92A994008B6006 /* MyAccountView.swift */; };
FF30AD342E93E5B4008B6006 /* UmpireOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD332E93E5B4008B6006 /* UmpireOptionsView.swift */; };
FF30AD352E93E5B4008B6006 /* UmpireOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD332E93E5B4008B6006 /* UmpireOptionsView.swift */; };
FF30AD362E93E5B4008B6006 /* UmpireOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD332E93E5B4008B6006 /* UmpireOptionsView.swift */; };
FF30AD3C2E93E822008B6006 /* UmpireSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD3B2E93E822008B6006 /* UmpireSettingsView.swift */; };
FF30AD3D2E93E822008B6006 /* UmpireSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD3B2E93E822008B6006 /* UmpireSettingsView.swift */; };
FF30AD3E2E93E822008B6006 /* UmpireSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF30AD3B2E93E822008B6006 /* UmpireSettingsView.swift */; };
FF3795622B9396D0004EA093 /* PadelClubApp.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = FF3795602B9396D0004EA093 /* PadelClubApp.xcdatamodeld */; };
FF3795662B9399AA004EA093 /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF3795652B9399AA004EA093 /* Persistence.swift */; };
FF39B6152DC8825E004E10CE /* PadelClubData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C49770202DC25A23005CD239 /* PadelClubData.framework */; };
@ -640,6 +615,7 @@
FF70FBAF2C90584900129CC2 /* UpdateSourceRankDateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF0EC5212BB173E70056B6D1 /* UpdateSourceRankDateView.swift */; };
FF70FBB02C90584900129CC2 /* GlobalSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF025AE62BD1111000A86CF8 /* GlobalSettingsView.swift */; };
FF70FBB22C90584900129CC2 /* PurchaseListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C49EF0182BD694290077B5AA /* PurchaseListView.swift */; };
FF70FBB42C90584900129CC2 /* Algorithms in Frameworks */ = {isa = PBXBuildFile; productRef = FF70FABE2C90584900129CC2 /* Algorithms */; };
FF70FBB52C90584900129CC2 /* Zip in Frameworks */ = {isa = PBXBuildFile; productRef = FF70FAC02C90584900129CC2 /* Zip */; };
FF70FBB62C90584900129CC2 /* LeStorage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C49EF0372BDFF3000077B5AA /* LeStorage.framework */; };
FF70FBB82C90584900129CC2 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C425D4072B6D249E002A7B48 /* Preview Assets.xcassets */; };
@ -735,21 +711,6 @@
FFA252B62CDD2C6C0074E63F /* OngoingDestination.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA252B42CDD2C630074E63F /* OngoingDestination.swift */; };
FFA252B72CDD2C6C0074E63F /* OngoingDestination.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA252B42CDD2C630074E63F /* OngoingDestination.swift */; };
FFA6D7852BB0B795003A31F3 /* FileImportManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA6D7842BB0B795003A31F3 /* FileImportManager.swift */; };
FFA97C8D2E8A59D00089EA22 /* TournamentPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97C8C2E8A59D00089EA22 /* TournamentPickerView.swift */; };
FFA97C8E2E8A59D00089EA22 /* TournamentPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97C8C2E8A59D00089EA22 /* TournamentPickerView.swift */; };
FFA97C8F2E8A59D00089EA22 /* TournamentPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97C8C2E8A59D00089EA22 /* TournamentPickerView.swift */; };
FFA97C9E2E8A7C080089EA22 /* View+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97C9D2E8A7C080089EA22 /* View+Extensions.swift */; };
FFA97C9F2E8A7C080089EA22 /* View+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97C9D2E8A7C080089EA22 /* View+Extensions.swift */; };
FFA97CA02E8A7C080089EA22 /* View+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97C9D2E8A7C080089EA22 /* View+Extensions.swift */; };
FFA97CA22E8BAC880089EA22 /* RankingGroupStageSetupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97CA12E8BAC880089EA22 /* RankingGroupStageSetupView.swift */; };
FFA97CA32E8BAC880089EA22 /* RankingGroupStageSetupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97CA12E8BAC880089EA22 /* RankingGroupStageSetupView.swift */; };
FFA97CA42E8BAC880089EA22 /* RankingGroupStageSetupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFA97CA12E8BAC880089EA22 /* RankingGroupStageSetupView.swift */; };
FFB0FF672E81B671009EDEAC /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0FF662E81B671009EDEAC /* OnboardingView.swift */; };
FFB0FF682E81B671009EDEAC /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0FF662E81B671009EDEAC /* OnboardingView.swift */; };
FFB0FF692E81B671009EDEAC /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0FF662E81B671009EDEAC /* OnboardingView.swift */; };
FFB0FF732E841042009EDEAC /* WeekdaySelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0FF722E841042009EDEAC /* WeekdaySelectionView.swift */; };
FFB0FF742E841042009EDEAC /* WeekdaySelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0FF722E841042009EDEAC /* WeekdaySelectionView.swift */; };
FFB0FF752E841042009EDEAC /* WeekdaySelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB0FF722E841042009EDEAC /* WeekdaySelectionView.swift */; };
FFB1C98B2C10255100B154A7 /* TournamentBroadcastRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB1C98A2C10255100B154A7 /* TournamentBroadcastRowView.swift */; };
FFB378342D672ED200EE82E9 /* MatchFormatGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB378332D672ED100EE82E9 /* MatchFormatGuideView.swift */; };
FFB378352D672ED200EE82E9 /* MatchFormatGuideView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB378332D672ED100EE82E9 /* MatchFormatGuideView.swift */; };
@ -773,12 +734,6 @@
FFC1E1082BAC29FC008D6F59 /* LocationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC1E1072BAC29FC008D6F59 /* LocationManager.swift */; };
FFC1E10A2BAC2A77008D6F59 /* NetworkFederalService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC1E1092BAC2A77008D6F59 /* NetworkFederalService.swift */; };
FFC1E10C2BAC7FB0008D6F59 /* ClubImportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC1E10B2BAC7FB0008D6F59 /* ClubImportView.swift */; };
FFC2DB202E97D00300869317 /* TournamentSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DB1F2E97D00300869317 /* TournamentSelectorView.swift */; };
FFC2DB212E97D00300869317 /* TournamentSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DB1F2E97D00300869317 /* TournamentSelectorView.swift */; };
FFC2DB222E97D00300869317 /* TournamentSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DB1F2E97D00300869317 /* TournamentSelectorView.swift */; };
FFC2DB242E97DD0A00869317 /* HeadManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DB232E97DD0A00869317 /* HeadManagerView.swift */; };
FFC2DB252E97DD0A00869317 /* HeadManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DB232E97DD0A00869317 /* HeadManagerView.swift */; };
FFC2DB262E97DD0A00869317 /* HeadManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DB232E97DD0A00869317 /* HeadManagerView.swift */; };
FFC2DCB22BBE75D40046DB9F /* LoserRoundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DCB12BBE75D40046DB9F /* LoserRoundView.swift */; };
FFC2DCB42BBE9ECD0046DB9F /* LoserRoundsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC2DCB32BBE9ECD0046DB9F /* LoserRoundsView.swift */; };
FFC83D4F2BB807D100750834 /* RoundsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC83D4E2BB807D100750834 /* RoundsView.swift */; };
@ -1047,19 +1002,11 @@
FF1F4B7E2BFA0105000B4573 /* player-template.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "player-template.html"; sourceTree = "<group>"; };
FF1F4B7F2BFA0105000B4573 /* tournament-template.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "tournament-template.html"; sourceTree = "<group>"; };
FF1F4B812BFA0124000B4573 /* PrintSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrintSettingsView.swift; sourceTree = "<group>"; };
FF2099032EA0D99A003CE880 /* PaymentLinkManagerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentLinkManagerView.swift; sourceTree = "<group>"; };
FF2099072EA140A2003CE880 /* TeamMatchesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TeamMatchesView.swift; sourceTree = "<group>"; };
FF20990B2EA1430E003CE880 /* PlayerSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerSearchView.swift; sourceTree = "<group>"; };
FF2B51542C7A4DAF00FFF126 /* PlanningByCourtView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanningByCourtView.swift; sourceTree = "<group>"; };
FF2B51602C7E302C00FFF126 /* local.sqlite */ = {isa = PBXFileReference; lastKnownFileType = file; path = local.sqlite; sourceTree = "<group>"; };
FF2B51622C7F073100FFF126 /* Model_1_1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model_1_1.xcdatamodel; sourceTree = "<group>"; };
FF2B6F5D2C036A1400835EE7 /* EventLinksView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventLinksView.swift; sourceTree = "<group>"; };
FF2EFBEF2BDE295E0049CE3B /* SendToAllView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendToAllView.swift; sourceTree = "<group>"; };
FF30ACEC2E8D700B008B6006 /* PaymentService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentService.swift; sourceTree = "<group>"; };
FF30ACF02E8D7078008B6006 /* PaymentRequestButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentRequestButton.swift; sourceTree = "<group>"; };
FF30AD2F2E92A994008B6006 /* MyAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyAccountView.swift; sourceTree = "<group>"; };
FF30AD332E93E5B4008B6006 /* UmpireOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UmpireOptionsView.swift; sourceTree = "<group>"; };
FF30AD3B2E93E822008B6006 /* UmpireSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UmpireSettingsView.swift; sourceTree = "<group>"; };
FF3795612B9396D0004EA093 /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; };
FF3795652B9399AA004EA093 /* Persistence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Persistence.swift; sourceTree = "<group>"; };
FF39B60F2DC87FEB004E10CE /* PadelClubData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PadelClubData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@ -1165,11 +1112,6 @@
FFA252B42CDD2C630074E63F /* OngoingDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OngoingDestination.swift; sourceTree = "<group>"; };
FFA6D7842BB0B795003A31F3 /* FileImportManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileImportManager.swift; sourceTree = "<group>"; };
FFA6D78A2BB0BEB3003A31F3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
FFA97C8C2E8A59D00089EA22 /* TournamentPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TournamentPickerView.swift; sourceTree = "<group>"; };
FFA97C9D2E8A7C080089EA22 /* View+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Extensions.swift"; sourceTree = "<group>"; };
FFA97CA12E8BAC880089EA22 /* RankingGroupStageSetupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankingGroupStageSetupView.swift; sourceTree = "<group>"; };
FFB0FF662E81B671009EDEAC /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = "<group>"; };
FFB0FF722E841042009EDEAC /* WeekdaySelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekdaySelectionView.swift; sourceTree = "<group>"; };
FFB1C98A2C10255100B154A7 /* TournamentBroadcastRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TournamentBroadcastRowView.swift; sourceTree = "<group>"; };
FFB378332D672ED100EE82E9 /* MatchFormatGuideView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchFormatGuideView.swift; sourceTree = "<group>"; };
FFBE62042CE9DA0900815D33 /* MatchViewStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatchViewStyle.swift; sourceTree = "<group>"; };
@ -1185,8 +1127,6 @@
FFC1E1072BAC29FC008D6F59 /* LocationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationManager.swift; sourceTree = "<group>"; };
FFC1E1092BAC2A77008D6F59 /* NetworkFederalService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkFederalService.swift; sourceTree = "<group>"; };
FFC1E10B2BAC7FB0008D6F59 /* ClubImportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClubImportView.swift; sourceTree = "<group>"; };
FFC2DB1F2E97D00300869317 /* TournamentSelectorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TournamentSelectorView.swift; sourceTree = "<group>"; };
FFC2DB232E97DD0A00869317 /* HeadManagerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadManagerView.swift; sourceTree = "<group>"; };
FFC2DCB12BBE75D40046DB9F /* LoserRoundView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoserRoundView.swift; sourceTree = "<group>"; };
FFC2DCB32BBE9ECD0046DB9F /* LoserRoundsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoserRoundsView.swift; sourceTree = "<group>"; };
FFC83D4E2BB807D100750834 /* RoundsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundsView.swift; sourceTree = "<group>"; };
@ -1277,7 +1217,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C410F54E2DF340FE009713ED /* WebKit.framework in Frameworks */,
FF70FBB42C90584900129CC2 /* Algorithms in Frameworks */,
FF39B6172DC88267004E10CE /* PadelClubData.framework in Frameworks */,
FF70FBB52C90584900129CC2 /* Zip in Frameworks */,
FF70FBB62C90584900129CC2 /* LeStorage.framework in Frameworks */,
@ -1393,7 +1333,6 @@
C49771DE2DC25F04005CD239 /* Badge+Extensions.swift */,
C49771DF2DC25F04005CD239 /* SpinDrawable+Extensions.swift */,
C49772022DC260D3005CD239 /* Round+Extensions.swift */,
FFA97C9D2E8A7C080089EA22 /* View+Extensions.swift */,
);
path = Extensions;
sourceTree = "<group>";
@ -1626,21 +1565,11 @@
path = SeedData;
sourceTree = "<group>";
};
FF30AD2E2E92A936008B6006 /* MyAccount */ = {
isa = PBXGroup;
children = (
FF30AD2F2E92A994008B6006 /* MyAccountView.swift */,
);
path = MyAccount;
sourceTree = "<group>";
};
FF39719B2B8DE04B004C4E75 /* Navigation */ = {
isa = PBXGroup;
children = (
FF59FFB62B90EFBF0061EFF9 /* MainView.swift */,
FFB0FF662E81B671009EDEAC /* OnboardingView.swift */,
FFD783FB2B91B919000F62A6 /* Agenda */,
FF30AD2E2E92A936008B6006 /* MyAccount */,
FF3F74FA2B91A04B004CFE0E /* Organizer */,
FF3F74FB2B91A060004CFE0E /* Toolbox */,
FF3F74FC2B91A06B004CFE0E /* Umpire */,
@ -1673,7 +1602,6 @@
FF7091692B90F95E00AB08DA /* DateBoxView.swift */,
FFA1B1282BB71773006CE248 /* PadelClubButtonView.swift */,
FFB1C98A2C10255100B154A7 /* TournamentBroadcastRowView.swift */,
FF20990B2EA1430E003CE880 /* PlayerSearchView.swift */,
);
path = Shared;
sourceTree = "<group>";
@ -1725,8 +1653,6 @@
isa = PBXGroup;
children = (
FF3F74F52B919E45004CFE0E /* UmpireView.swift */,
FF30AD3B2E93E822008B6006 /* UmpireSettingsView.swift */,
FF30AD332E93E5B4008B6006 /* UmpireOptionsView.swift */,
FFA252AC2CDB734A0074E63F /* UmpireStatisticView.swift */,
FFD783FE2B91BA42000F62A6 /* PadelClubView.swift */,
C488C8812CCBE8FC0082001F /* NetworkStatusView.swift */,
@ -1818,7 +1744,6 @@
FF4AB6B42B9248200002987F /* NetworkManager.swift */,
FFC1E1092BAC2A77008D6F59 /* NetworkFederalService.swift */,
FFE8B5BA2DA9896800BDE966 /* RefundService.swift */,
FF30ACEC2E8D700B008B6006 /* PaymentService.swift */,
FFE8B5C62DAA390000BDE966 /* StripeValidationService.swift */,
FFE8B5CA2DAA429E00BDE966 /* XlsToCsvService.swift */,
FFE8B6392DACEAEC00BDE966 /* ConfigurationService.swift */,
@ -1844,8 +1769,6 @@
FF6087E92BE25EF1004E1E47 /* TournamentStatusView.swift */,
FFE8B5BE2DAA325400BDE966 /* RefundResultsView.swift */,
FFCF76062C3BE9BC006C8C3D /* CloseDatePicker.swift */,
FFC2DB1F2E97D00300869317 /* TournamentSelectorView.swift */,
FFC2DB232E97DD0A00869317 /* HeadManagerView.swift */,
);
path = Components;
sourceTree = "<group>";
@ -1873,7 +1796,6 @@
FF967CFB2BAEE13900A9A3BD /* GroupStagesView.swift */,
FF5DA18E2BB9268800A33061 /* GroupStagesSettingsView.swift */,
FF6525C22C8C61B400B9498E /* LoserBracketFromGroupStageView.swift */,
FFA97CA12E8BAC880089EA22 /* RankingGroupStageSetupView.swift */,
FF9AC3932BE3625D00C2E883 /* Components */,
FF9AC3922BE3625200C2E883 /* Shared */,
);
@ -1902,9 +1824,6 @@
FF1162862BD004AD000C4809 /* EditingTeamView.swift */,
FF17CA562CC02FEA003C7323 /* CoachListView.swift */,
FF7DCD382CC330260041110C /* TeamRestingView.swift */,
FF30ACF02E8D7078008B6006 /* PaymentRequestButton.swift */,
FF2099032EA0D99A003CE880 /* PaymentLinkManagerView.swift */,
FF2099072EA140A2003CE880 /* TeamMatchesView.swift */,
FF025AD62BD0C0FB00A86CF8 /* Components */,
);
path = Team;
@ -1938,7 +1857,6 @@
FFE103072C353B7600684FC9 /* EventClubSettingsView.swift */,
FF8F263C2BAD627A00650388 /* TournamentConfiguratorView.swift */,
FF8E52332DF01D6100099B75 /* EventStatusView.swift */,
FFA97C8C2E8A59D00089EA22 /* TournamentPickerView.swift */,
);
name = Event;
path = Cashier/Event;
@ -1979,7 +1897,6 @@
FF59FFB22B90EFAC0061EFF9 /* EventListView.swift */,
FF5D0D8A2BB4D1E3005CB568 /* CalendarView.swift */,
FFD655D72C8DE27400E5B35E /* TournamentLookUpView.swift */,
FFB0FF722E841042009EDEAC /* WeekdaySelectionView.swift */,
FF8044AB2C8F676D00A49A52 /* TournamentSubscriptionView.swift */,
);
path = Agenda;
@ -2148,6 +2065,7 @@
);
name = "PadelClub TestFlight";
packageProductDependencies = (
FF70FABE2C90584900129CC2 /* Algorithms */,
FF70FAC02C90584900129CC2 /* Zip */,
);
productName = PadelClub;
@ -2318,13 +2236,11 @@
FF1DC5572BAB3AED00FD8220 /* ClubsView.swift in Sources */,
FFE103122C366E5900684FC9 /* ImagePickerView.swift in Sources */,
FF8F264F2BAE0B9600650388 /* MatchTypeSelectionView.swift in Sources */,
FF30AD312E92A994008B6006 /* MyAccountView.swift in Sources */,
FF967D062BAF3C4200A9A3BD /* MatchSetupView.swift in Sources */,
FF4AB6B52B9248200002987F /* NetworkManager.swift in Sources */,
FF2B6F5E2C036A1500835EE7 /* EventLinksView.swift in Sources */,
FF025AE12BD0EB9000A86CF8 /* TournamentClubSettingsView.swift in Sources */,
FFBF065C2BBD2657009D6715 /* GroupStageTeamView.swift in Sources */,
FF30AD362E93E5B4008B6006 /* UmpireOptionsView.swift in Sources */,
FF5DA1932BB9279B00A33061 /* RoundSettingsView.swift in Sources */,
FFBE62052CE9DA0900815D33 /* MatchViewStyle.swift in Sources */,
FFE2D2E22C231BEE00D0C7BE /* SupportButtonView.swift in Sources */,
@ -2345,7 +2261,6 @@
C4A47DB32B86387500ADC637 /* AccountView.swift in Sources */,
FFCEDA4C2C2C08EA00F8C0F2 /* PlayersWithoutContactView.swift in Sources */,
FF17CA4F2CB9243E003C7323 /* FollowUpMatchView.swift in Sources */,
FF30ACEF2E8D700B008B6006 /* PaymentService.swift in Sources */,
FFCD16B32C3E5E590092707B /* TeamsCallingView.swift in Sources */,
FF1162832BCFBE4E000C4809 /* EditablePlayerView.swift in Sources */,
FF1162852BD00279000C4809 /* PlayerDetailView.swift in Sources */,
@ -2380,7 +2295,6 @@
FF025AED2BD1513700A86CF8 /* AppScreen.swift in Sources */,
FFC91B032BD85E2400B29808 /* CourtView.swift in Sources */,
FFCFC00E2BBC3D4600B82851 /* PointSelectionView.swift in Sources */,
FF30ACF22E8D7078008B6006 /* PaymentRequestButton.swift in Sources */,
FF089EB62BB00A3800F0AEC7 /* TeamRowView.swift in Sources */,
C40CD2F32C412681000DBD9A /* AppDelegate.swift in Sources */,
FFCFC00C2BBC3D1E00B82851 /* EditScoreView.swift in Sources */,
@ -2396,7 +2310,6 @@
FF4AB6BB2B9256D50002987F /* SearchViewModel.swift in Sources */,
FF4AB6BF2B92577A0002987F /* ImportedPlayerView.swift in Sources */,
FF1162872BD004AD000C4809 /* EditingTeamView.swift in Sources */,
FFC2DB252E97DD0A00869317 /* HeadManagerView.swift in Sources */,
FF3A74332D37DCF2007E3032 /* InscriptionLegendView.swift in Sources */,
FF5647132C0B6F390081F995 /* LoserRoundSettingsView.swift in Sources */,
FF3795662B9399AA004EA093 /* Persistence.swift in Sources */,
@ -2423,7 +2336,6 @@
FF5BAF6E2BE0B3C8008B4B7E /* FederalDataViewModel.swift in Sources */,
FF3F74FF2B91A2D4004CFE0E /* AgendaDestination.swift in Sources */,
FF3795622B9396D0004EA093 /* PadelClubApp.xcdatamodeld in Sources */,
FFA97CA02E8A7C080089EA22 /* View+Extensions.swift in Sources */,
FFCFC0162BBC5A4C00B82851 /* SetInputView.swift in Sources */,
FFF03C942BD91D0C00B516FC /* ButtonValidateView.swift in Sources */,
FF5D0D892BB4935C005CB568 /* ClubRowView.swift in Sources */,
@ -2448,20 +2360,17 @@
FF6761582CC7803600CC9BF2 /* DrawLogsView.swift in Sources */,
FFF8ACCD2B92367B008466FA /* FederalPlayer.swift in Sources */,
FFBF06602BBD9F6D009D6715 /* NavigationViewModel.swift in Sources */,
FF20990D2EA1430E003CE880 /* PlayerSearchView.swift in Sources */,
FF6525C32C8C61B400B9498E /* LoserBracketFromGroupStageView.swift in Sources */,
FF5D30512BD94E1000F2B93D /* ImportedPlayer+Extensions.swift in Sources */,
FFC1E1042BAC28C6008D6F59 /* ClubSearchView.swift in Sources */,
FFE8B5B72DA8763800BDE966 /* PaymentInfoSheetView.swift in Sources */,
FFD8837A2E1E63880004D7DD /* FederalDataService.swift in Sources */,
FF2099092EA140A2003CE880 /* TeamMatchesView.swift in Sources */,
FFBFC3962CF05CBB000EBD8D /* DateMenuView.swift in Sources */,
FF089EBB2BB0120700F0AEC7 /* PlayerPopoverView.swift in Sources */,
FF70916E2B9108C600AB08DA /* InscriptionManagerView.swift in Sources */,
FFB378352D672ED200EE82E9 /* MatchFormatGuideView.swift in Sources */,
FF77CE542CCCD1B200CBCBB4 /* MatchFormatPickingView.swift in Sources */,
FF82CFC92B9132AF00B0CAF2 /* ActivityView.swift in Sources */,
FFC2DB212E97D00300869317 /* TournamentSelectorView.swift in Sources */,
FF5D0D8B2BB4D1E3005CB568 /* CalendarView.swift in Sources */,
FF1CBC1F2BB53E0C0036DAAB /* FederalTournamentSearchScope.swift in Sources */,
FF8F26472BAE0ACB00650388 /* TournamentFieldsManagerView.swift in Sources */,
@ -2477,9 +2386,7 @@
FF9268072BCE94D90080F940 /* TournamentCallView.swift in Sources */,
FFC2DCB42BBE9ECD0046DB9F /* LoserRoundsView.swift in Sources */,
FF967CFC2BAEE52E00A9A3BD /* GroupStagesView.swift in Sources */,
FFB0FF682E81B671009EDEAC /* OnboardingView.swift in Sources */,
FFD783FF2B91BA42000F62A6 /* PadelClubView.swift in Sources */,
FFB0FF732E841042009EDEAC /* WeekdaySelectionView.swift in Sources */,
C497723A2DC28A92005CD239 /* ComposeViews.swift in Sources */,
FF3A73F32D37C34D007E3032 /* RegistrationInfoSheetView.swift in Sources */,
FF8F264C2BAE0B4100650388 /* TournamentFormatSelectionView.swift in Sources */,
@ -2494,7 +2401,6 @@
FF8E52342DF01D6100099B75 /* EventStatusView.swift in Sources */,
FFE8B63C2DACEAED00BDE966 /* ConfigurationService.swift in Sources */,
FF0E0B6D2BC254C6005F00A9 /* TournamentScheduleView.swift in Sources */,
FF30AD3D2E93E822008B6006 /* UmpireSettingsView.swift in Sources */,
FF025AF12BD1AEBD00A86CF8 /* MatchFormatStorageView.swift in Sources */,
FF3F74F62B919E45004CFE0E /* UmpireView.swift in Sources */,
FF967D012BAEF0B400A9A3BD /* MatchSummaryView.swift in Sources */,
@ -2516,14 +2422,11 @@
FFF527D62BC6DDD000FF4EF2 /* MatchScheduleEditorView.swift in Sources */,
FFC91AF92BD6A09100B29808 /* FortuneWheelView.swift in Sources */,
FFE8B5C82DAA390900BDE966 /* StripeValidationService.swift in Sources */,
FFA97C8D2E8A59D00089EA22 /* TournamentPickerView.swift in Sources */,
C493B37E2C10AD3600862481 /* LoadingViewModifier.swift in Sources */,
FF089EBD2BB0287D00F0AEC7 /* PlayerView.swift in Sources */,
FF2099052EA0D99A003CE880 /* PaymentLinkManagerView.swift in Sources */,
FF967D032BAEF0C000A9A3BD /* MatchDetailView.swift in Sources */,
FFE8B5B32DA848D300BDE966 /* OnlineWaitingListFaqSheetView.swift in Sources */,
FF967D0F2BAF63B000A9A3BD /* PlayerBlockView.swift in Sources */,
FFA97CA32E8BAC880089EA22 /* RankingGroupStageSetupView.swift in Sources */,
FFCFC0122BBC3E1A00B82851 /* PointView.swift in Sources */,
FF1CBC232BB53E590036DAAB /* ClubHolder.swift in Sources */,
FFBF41862BF75FDA001B24CB /* EventSettingsView.swift in Sources */,
@ -2598,13 +2501,11 @@
FF4CBF532C996C0600151637 /* ClubsView.swift in Sources */,
FF4CBF542C996C0600151637 /* ImagePickerView.swift in Sources */,
FF4CBF552C996C0600151637 /* MatchTypeSelectionView.swift in Sources */,
FF30AD302E92A994008B6006 /* MyAccountView.swift in Sources */,
FF4CBF562C996C0600151637 /* MatchSetupView.swift in Sources */,
FF4CBF572C996C0600151637 /* NetworkManager.swift in Sources */,
FF4CBF582C996C0600151637 /* EventLinksView.swift in Sources */,
FF4CBF5A2C996C0600151637 /* TournamentClubSettingsView.swift in Sources */,
FF4CBF5B2C996C0600151637 /* GroupStageTeamView.swift in Sources */,
FF30AD342E93E5B4008B6006 /* UmpireOptionsView.swift in Sources */,
FF4CBF5C2C996C0600151637 /* RoundSettingsView.swift in Sources */,
FFBE62072CE9DA0900815D33 /* MatchViewStyle.swift in Sources */,
FF4CBF5D2C996C0600151637 /* SupportButtonView.swift in Sources */,
@ -2625,7 +2526,6 @@
FFA252AF2CDB734A0074E63F /* UmpireStatisticView.swift in Sources */,
FF4CBF6F2C996C0600151637 /* ListRowViewModifier.swift in Sources */,
FF4CBF702C996C0600151637 /* PresentationContext.swift in Sources */,
FF30ACEE2E8D700B008B6006 /* PaymentService.swift in Sources */,
FF4CBF722C996C0600151637 /* SwiftParser.swift in Sources */,
FF4CBF732C996C0600151637 /* ChangePasswordView.swift in Sources */,
FF4CBF742C996C0600151637 /* TournamentSubscriptionView.swift in Sources */,
@ -2660,7 +2560,6 @@
FF4CBF882C996C0600151637 /* TeamRowView.swift in Sources */,
FF4CBF8A2C996C0600151637 /* AppDelegate.swift in Sources */,
FF4CBF8C2C996C0600151637 /* EditScoreView.swift in Sources */,
FF30ACF12E8D7078008B6006 /* PaymentRequestButton.swift in Sources */,
FF4CBF8D2C996C0600151637 /* TournamentOrganizerView.swift in Sources */,
FF4CBF8F2C996C0600151637 /* TournamentRunningView.swift in Sources */,
FF4CBF902C996C0600151637 /* TournamentDatePickerView.swift in Sources */,
@ -2676,7 +2575,6 @@
FF4CBF9D2C996C0600151637 /* EditingTeamView.swift in Sources */,
FF3A74322D37DCF2007E3032 /* InscriptionLegendView.swift in Sources */,
FF4CBFA12C996C0600151637 /* LoserRoundSettingsView.swift in Sources */,
FFC2DB262E97DD0A00869317 /* HeadManagerView.swift in Sources */,
FF4CBFA22C996C0600151637 /* Persistence.swift in Sources */,
FF4CBFA32C996C0600151637 /* CloseDatePicker.swift in Sources */,
FF4CBFA42C996C0600151637 /* BarButtonView.swift in Sources */,
@ -2703,7 +2601,6 @@
FF4CBFBF2C996C0600151637 /* SetInputView.swift in Sources */,
FF4CBFC02C996C0600151637 /* ButtonValidateView.swift in Sources */,
FF4CBFC12C996C0600151637 /* ClubRowView.swift in Sources */,
FFA97C9E2E8A7C080089EA22 /* View+Extensions.swift in Sources */,
FF4CBFC22C996C0600151637 /* ClubDetailView.swift in Sources */,
FF4CBFC32C996C0600151637 /* GroupStageCallingView.swift in Sources */,
FF4CBFC52C996C0600151637 /* CashierSettingsView.swift in Sources */,
@ -2728,20 +2625,17 @@
FF4CBFD82C996C0600151637 /* ImportedPlayer+Extensions.swift in Sources */,
FF4CBFD92C996C0600151637 /* ClubSearchView.swift in Sources */,
FFBFC3972CF05CBB000EBD8D /* DateMenuView.swift in Sources */,
FF20990C2EA1430E003CE880 /* PlayerSearchView.swift in Sources */,
FF4CBFDA2C996C0600151637 /* PlayerPopoverView.swift in Sources */,
FF4CBFDB2C996C0600151637 /* InscriptionManagerView.swift in Sources */,
FFB378362D672ED200EE82E9 /* MatchFormatGuideView.swift in Sources */,
FF77CE522CCCD1B200CBCBB4 /* MatchFormatPickingView.swift in Sources */,
FFD883792E1E63880004D7DD /* FederalDataService.swift in Sources */,
FF20990A2EA140A2003CE880 /* TeamMatchesView.swift in Sources */,
FF4CBFDC2C996C0600151637 /* ActivityView.swift in Sources */,
FF4CBFDE2C996C0600151637 /* CalendarView.swift in Sources */,
FF4CBFDF2C996C0600151637 /* FederalTournamentSearchScope.swift in Sources */,
FF4CBFE02C996C0600151637 /* TournamentFieldsManagerView.swift in Sources */,
FF4CBFE12C996C0600151637 /* PrintSettingsView.swift in Sources */,
FF4CBFE22C996C0600151637 /* TournamentMatchFormatsSettingsView.swift in Sources */,
FFC2DB202E97D00300869317 /* TournamentSelectorView.swift in Sources */,
FF4CBFE32C996C0600151637 /* DatePickingView.swift in Sources */,
FFE8B63B2DACEAED00BDE966 /* ConfigurationService.swift in Sources */,
FF4CBFE42C996C0600151637 /* MatchFormatRowView.swift in Sources */,
@ -2757,9 +2651,7 @@
FF4CBFEF2C996C0600151637 /* PadelClubView.swift in Sources */,
FFE8B5CC2DAA42A000BDE966 /* XlsToCsvService.swift in Sources */,
FF3A73F52D37C34D007E3032 /* RegistrationInfoSheetView.swift in Sources */,
FFB0FF672E81B671009EDEAC /* OnboardingView.swift in Sources */,
C4D05D4A2DC10CBE009B053C /* PaymentStatusView.swift in Sources */,
FFB0FF742E841042009EDEAC /* WeekdaySelectionView.swift in Sources */,
C49772392DC28A92005CD239 /* ComposeViews.swift in Sources */,
FF4CBFF22C996C0600151637 /* TournamentFormatSelectionView.swift in Sources */,
FF17CA592CC02FEB003C7323 /* CoachListView.swift in Sources */,
@ -2774,7 +2666,6 @@
FF8E52362DF01D6100099B75 /* EventStatusView.swift in Sources */,
FF4CBFFB2C996C0600151637 /* MatchFormatStorageView.swift in Sources */,
FF4CBFFC2C996C0600151637 /* UmpireView.swift in Sources */,
FF30AD3C2E93E822008B6006 /* UmpireSettingsView.swift in Sources */,
FF4CBFFE2C996C0600151637 /* MatchSummaryView.swift in Sources */,
FFE8B5B52DA848D400BDE966 /* OnlineWaitingListFaqSheetView.swift in Sources */,
FFA252B52CDD2C6C0074E63F /* OngoingDestination.swift in Sources */,
@ -2796,14 +2687,11 @@
FF4CC0102C996C0600151637 /* LoadingViewModifier.swift in Sources */,
FF4CC0112C996C0600151637 /* PlayerView.swift in Sources */,
FF4CC0122C996C0600151637 /* MatchDetailView.swift in Sources */,
FFA97C8F2E8A59D00089EA22 /* TournamentPickerView.swift in Sources */,
FF4CC0142C996C0600151637 /* PlayerBlockView.swift in Sources */,
FF4CC0172C996C0600151637 /* PointView.swift in Sources */,
FF2099042EA0D99A003CE880 /* PaymentLinkManagerView.swift in Sources */,
FF4CC0182C996C0600151637 /* ClubHolder.swift in Sources */,
FF4CC0192C996C0600151637 /* EventSettingsView.swift in Sources */,
C49771E72DC25F04005CD239 /* Color+Extensions.swift in Sources */,
FFA97CA22E8BAC880089EA22 /* RankingGroupStageSetupView.swift in Sources */,
C49771E82DC25F04005CD239 /* Badge+Extensions.swift in Sources */,
C49771E92DC25F04005CD239 /* SpinDrawable+Extensions.swift in Sources */,
FF4CC01A2C996C0600151637 /* InscriptionInfoView.swift in Sources */,
@ -2856,13 +2744,11 @@
FF70FAD22C90584900129CC2 /* ClubsView.swift in Sources */,
FF70FAD32C90584900129CC2 /* ImagePickerView.swift in Sources */,
FF70FAD42C90584900129CC2 /* MatchTypeSelectionView.swift in Sources */,
FF30AD322E92A994008B6006 /* MyAccountView.swift in Sources */,
FF70FAD52C90584900129CC2 /* MatchSetupView.swift in Sources */,
FF70FAD62C90584900129CC2 /* NetworkManager.swift in Sources */,
FF70FAD72C90584900129CC2 /* EventLinksView.swift in Sources */,
FF70FAD92C90584900129CC2 /* TournamentClubSettingsView.swift in Sources */,
FF70FADA2C90584900129CC2 /* GroupStageTeamView.swift in Sources */,
FF30AD352E93E5B4008B6006 /* UmpireOptionsView.swift in Sources */,
FF70FADB2C90584900129CC2 /* RoundSettingsView.swift in Sources */,
FFBE62062CE9DA0900815D33 /* MatchViewStyle.swift in Sources */,
FF70FADC2C90584900129CC2 /* SupportButtonView.swift in Sources */,
@ -2883,7 +2769,6 @@
FFA252AD2CDB734A0074E63F /* UmpireStatisticView.swift in Sources */,
FF70FAEE2C90584900129CC2 /* ListRowViewModifier.swift in Sources */,
FF70FAEF2C90584900129CC2 /* PresentationContext.swift in Sources */,
FF30ACED2E8D700B008B6006 /* PaymentService.swift in Sources */,
FF70FAF12C90584900129CC2 /* SwiftParser.swift in Sources */,
FF70FAF22C90584900129CC2 /* ChangePasswordView.swift in Sources */,
FF70FAF32C90584900129CC2 /* TournamentSubscriptionView.swift in Sources */,
@ -2918,7 +2803,6 @@
FF70FB072C90584900129CC2 /* TeamRowView.swift in Sources */,
FF70FB092C90584900129CC2 /* AppDelegate.swift in Sources */,
FF70FB0B2C90584900129CC2 /* EditScoreView.swift in Sources */,
FF30ACF32E8D7078008B6006 /* PaymentRequestButton.swift in Sources */,
FF70FB0C2C90584900129CC2 /* TournamentOrganizerView.swift in Sources */,
FF70FB0E2C90584900129CC2 /* TournamentRunningView.swift in Sources */,
FF70FB0F2C90584900129CC2 /* TournamentDatePickerView.swift in Sources */,
@ -2934,7 +2818,6 @@
FF70FB1C2C90584900129CC2 /* EditingTeamView.swift in Sources */,
FF3A74342D37DCF2007E3032 /* InscriptionLegendView.swift in Sources */,
FF70FB202C90584900129CC2 /* LoserRoundSettingsView.swift in Sources */,
FFC2DB242E97DD0A00869317 /* HeadManagerView.swift in Sources */,
FF70FB212C90584900129CC2 /* Persistence.swift in Sources */,
FF70FB222C90584900129CC2 /* CloseDatePicker.swift in Sources */,
FF70FB232C90584900129CC2 /* BarButtonView.swift in Sources */,
@ -2961,7 +2844,6 @@
FF70FB3E2C90584900129CC2 /* SetInputView.swift in Sources */,
FF70FB3F2C90584900129CC2 /* ButtonValidateView.swift in Sources */,
FF70FB402C90584900129CC2 /* ClubRowView.swift in Sources */,
FFA97C9F2E8A7C080089EA22 /* View+Extensions.swift in Sources */,
FF70FB412C90584900129CC2 /* ClubDetailView.swift in Sources */,
FF70FB422C90584900129CC2 /* GroupStageCallingView.swift in Sources */,
FF70FB442C90584900129CC2 /* CashierSettingsView.swift in Sources */,
@ -2986,20 +2868,17 @@
FF70FB572C90584900129CC2 /* ImportedPlayer+Extensions.swift in Sources */,
FF70FB582C90584900129CC2 /* ClubSearchView.swift in Sources */,
FFBFC3952CF05CBB000EBD8D /* DateMenuView.swift in Sources */,
FF20990E2EA1430E003CE880 /* PlayerSearchView.swift in Sources */,
FF70FB592C90584900129CC2 /* PlayerPopoverView.swift in Sources */,
FF70FB5A2C90584900129CC2 /* InscriptionManagerView.swift in Sources */,
FFB378342D672ED200EE82E9 /* MatchFormatGuideView.swift in Sources */,
FF77CE532CCCD1B200CBCBB4 /* MatchFormatPickingView.swift in Sources */,
FFD8837B2E1E63880004D7DD /* FederalDataService.swift in Sources */,
FF2099082EA140A2003CE880 /* TeamMatchesView.swift in Sources */,
FF70FB5B2C90584900129CC2 /* ActivityView.swift in Sources */,
FF70FB5D2C90584900129CC2 /* CalendarView.swift in Sources */,
FF70FB5E2C90584900129CC2 /* FederalTournamentSearchScope.swift in Sources */,
FF70FB5F2C90584900129CC2 /* TournamentFieldsManagerView.swift in Sources */,
FF70FB602C90584900129CC2 /* PrintSettingsView.swift in Sources */,
FF70FB612C90584900129CC2 /* TournamentMatchFormatsSettingsView.swift in Sources */,
FFC2DB222E97D00300869317 /* TournamentSelectorView.swift in Sources */,
FF70FB622C90584900129CC2 /* DatePickingView.swift in Sources */,
FFE8B63A2DACEAED00BDE966 /* ConfigurationService.swift in Sources */,
FF70FB632C90584900129CC2 /* MatchFormatRowView.swift in Sources */,
@ -3015,9 +2894,7 @@
FF70FB6E2C90584900129CC2 /* PadelClubView.swift in Sources */,
FFE8B5CB2DAA42A000BDE966 /* XlsToCsvService.swift in Sources */,
FF3A73F42D37C34D007E3032 /* RegistrationInfoSheetView.swift in Sources */,
FFB0FF692E81B671009EDEAC /* OnboardingView.swift in Sources */,
C4D05D4B2DC10CBE009B053C /* PaymentStatusView.swift in Sources */,
FFB0FF752E841042009EDEAC /* WeekdaySelectionView.swift in Sources */,
C497723B2DC28A92005CD239 /* ComposeViews.swift in Sources */,
FF70FB712C90584900129CC2 /* TournamentFormatSelectionView.swift in Sources */,
FF17CA582CC02FEB003C7323 /* CoachListView.swift in Sources */,
@ -3032,7 +2909,6 @@
FF8E52352DF01D6100099B75 /* EventStatusView.swift in Sources */,
FF70FB7A2C90584900129CC2 /* MatchFormatStorageView.swift in Sources */,
FF70FB7B2C90584900129CC2 /* UmpireView.swift in Sources */,
FF30AD3E2E93E822008B6006 /* UmpireSettingsView.swift in Sources */,
FF70FB7D2C90584900129CC2 /* MatchSummaryView.swift in Sources */,
FFE8B5B42DA848D400BDE966 /* OnlineWaitingListFaqSheetView.swift in Sources */,
FFA252B72CDD2C6C0074E63F /* OngoingDestination.swift in Sources */,
@ -3054,14 +2930,11 @@
FF70FB8F2C90584900129CC2 /* LoadingViewModifier.swift in Sources */,
FF70FB902C90584900129CC2 /* PlayerView.swift in Sources */,
FF70FB912C90584900129CC2 /* MatchDetailView.swift in Sources */,
FFA97C8E2E8A59D00089EA22 /* TournamentPickerView.swift in Sources */,
FF70FB932C90584900129CC2 /* PlayerBlockView.swift in Sources */,
FF70FB962C90584900129CC2 /* PointView.swift in Sources */,
FF2099062EA0D99A003CE880 /* PaymentLinkManagerView.swift in Sources */,
FF70FB972C90584900129CC2 /* ClubHolder.swift in Sources */,
FF70FB982C90584900129CC2 /* EventSettingsView.swift in Sources */,
C49771E42DC25F04005CD239 /* Color+Extensions.swift in Sources */,
FFA97CA42E8BAC880089EA22 /* RankingGroupStageSetupView.swift in Sources */,
C49771E52DC25F04005CD239 /* Badge+Extensions.swift in Sources */,
C49771E62DC25F04005CD239 /* SpinDrawable+Extensions.swift in Sources */,
FF70FB992C90584900129CC2 /* InscriptionInfoView.swift in Sources */,
@ -3245,7 +3118,7 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
@ -3267,12 +3140,12 @@
INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
IPHONEOS_DEPLOYMENT_TARGET = 17.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.64;
MARKETING_VERSION = 1.2.48;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3293,11 +3166,10 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6;
ENABLE_DEBUG_DYLIB = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = PadelClub/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Padel Club";
@ -3314,12 +3186,12 @@
INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
IPHONEOS_DEPLOYMENT_TARGET = 17.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.64;
MARKETING_VERSION = 1.2.48;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3412,12 +3284,11 @@
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\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6;
ENABLE_DEBUG_DYLIB = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = PadelClub/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Padel Club (ProdTest)";
@ -3434,12 +3305,12 @@
INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
IPHONEOS_DEPLOYMENT_TARGET = 17.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.57;
MARKETING_VERSION = 1.2.37;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3459,11 +3330,10 @@
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;
ENABLE_DEBUG_DYLIB = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = PadelClub/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Padel Club (ProdTest)";
@ -3480,12 +3350,12 @@
INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
IPHONEOS_DEPLOYMENT_TARGET = 17.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.57;
MARKETING_VERSION = 1.2.37;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3524,19 +3394,18 @@
INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
IPHONEOS_DEPLOYMENT_TARGET = 17.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.53;
MARKETING_VERSION = 1.2.37;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub.beta;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
@ -3567,12 +3436,12 @@
INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen";
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
IPHONEOS_DEPLOYMENT_TARGET = 17.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.53;
MARKETING_VERSION = 1.2.37;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub.beta;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3580,7 +3449,6 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = TESTFLIGHT;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
@ -3662,6 +3530,14 @@
minimumVersion = 2.1.2;
};
};
FF70FABF2C90584900129CC2 /* XCRemoteSwiftPackageReference "swift-algorithms" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/apple/swift-algorithms.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.2.0;
};
};
FF70FAC12C90584900129CC2 /* XCRemoteSwiftPackageReference "Zip" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/marmelroy/Zip";
@ -3691,6 +3567,11 @@
package = FF4CBF422C996C0600151637 /* XCRemoteSwiftPackageReference "Zip" */;
productName = Zip;
};
FF70FABE2C90584900129CC2 /* Algorithms */ = {
isa = XCSwiftPackageProductDependency;
package = FF70FABF2C90584900129CC2 /* XCRemoteSwiftPackageReference "swift-algorithms" */;
productName = Algorithms;
};
FF70FAC02C90584900129CC2 /* Zip */ = {
isa = XCSwiftPackageProductDependency;
package = FF70FAC12C90584900129CC2 /* XCRemoteSwiftPackageReference "Zip" */;

@ -26,33 +26,21 @@ class AppDelegate : NSObject, UIApplicationDelegate, UNUserNotificationCenterDel
return true
}
fileprivate func _domain() -> String {
#if DEBUG
return "xlr.alwaysdata.net"
#elseif TESTFLIGHT
return "padelclub.app"
#elseif PRODTEST
return "padelclub.app"
#else
return "padelclub.app"
#endif
}
fileprivate func _configureLeStorage() {
StoreCenter.main.blackListUserName("apple-test")
StoreCenter.main.classProject = "PadelClubData"
// let secureScheme = true
let domain: String = self._domain()
let domain: String = URLs.activationHost.rawValue
#if DEBUG
if let secure = PListReader.readBool(plist: "local", key: "secure_server"),
let domain = PListReader.readString(plist: "local", key: "server_domain") {
StoreCenter.main.configureURLs(secureScheme: secure, domain: domain, webSockets: true, useSynchronization: true)
StoreCenter.main.configureURLs(secureScheme: secure, domain: domain, webSockets: false)
} else {
StoreCenter.main.configureURLs(secureScheme: true, domain: domain, webSockets: true, useSynchronization: true)
StoreCenter.main.configureURLs(secureScheme: true, domain: domain, webSockets: false)
}
#else
StoreCenter.main.configureURLs(secureScheme: true, domain: domain, webSockets: true, useSynchronization: true)
StoreCenter.main.configureURLs(secureScheme: true, domain: domain, webSockets: false)
#endif
StoreCenter.main.logsFailedAPICalls()
@ -67,10 +55,9 @@ class AppDelegate : NSObject, UIApplicationDelegate, UNUserNotificationCenterDel
StoreCenter.main.forceNoSynchronization = !synchronized
}
func applicationWillEnterForeground(_ application: UIApplication) {
Task {
await Guard.main.refreshPurchases()
try await Guard.main.refreshPurchasedAppleProducts()
}
}

@ -80,12 +80,7 @@ class FederalPlayer: Decodable {
let ageSportif = try container.decodeIfPresent(Int.self, forKey: .ageSportif)
if let ageSportif {
let month = Calendar.current.component(.month, from: Date())
if month > 8 {
birthYear = Calendar.current.component(.year, from: Date()) + 1 - ageSportif
} else {
birthYear = Calendar.current.component(.year, from: Date()) - ageSportif
}
birthYear = Calendar.current.component(.year, from: Date()) - ageSportif
}
clubCode = try container.decodeIfPresent(String.self, forKey: .codeClub) ?? ""
club = try container.decodeIfPresent(String.self, forKey: .nomClub) ?? ""

@ -10,7 +10,7 @@ import PadelClubData
// MARK: - FederalTournament
struct FederalTournament: Identifiable, Codable, Hashable {
struct FederalTournament: Identifiable, Codable {
func getEvent() -> Event {
let club = DataStore.shared.user.clubsObjects().first(where: { $0.code == codeClub })
@ -313,7 +313,7 @@ extension FederalTournament: FederalTournamentHolder {
}
// MARK: - CategorieAge
struct CategorieAge: Codable, Hashable {
struct CategorieAge: Codable {
var ageJoueurMin, ageMin, ageJoueurMax, ageRechercheMax: Int?
var categoriesAgeTypePratique: [CategoriesAgeTypePratique]?
var ageMax: Int?
@ -335,18 +335,18 @@ struct CategorieAge: Codable, Hashable {
}
// MARK: - CategoriesAgeTypePratique
struct CategoriesAgeTypePratique: Codable, Hashable {
struct CategoriesAgeTypePratique: Codable {
var id: ID?
}
// MARK: - ID
struct ID: Codable, Hashable {
struct ID: Codable {
var typePratique: String?
var idCategorieAge: Int?
}
// MARK: - CategorieTournoi
struct CategorieTournoi: Codable, Hashable {
struct CategorieTournoi: Codable {
var code, codeTaxe: String?
var compteurGda: CompteurGda?
var libelle, niveauHierarchique: String?
@ -354,14 +354,14 @@ struct CategorieTournoi: Codable, Hashable {
}
// MARK: - CompteurGda
struct CompteurGda: Codable, Hashable {
struct CompteurGda: Codable {
var classementMax: Classement?
var libelle: String?
var classementMin: Classement?
}
// MARK: - Classement
struct Classement: Codable, Hashable {
struct Classement: Codable {
var nature, libelle: String?
var serie: Serie?
var sexe: String?
@ -371,7 +371,7 @@ struct Classement: Codable, Hashable {
}
// MARK: - Serie
struct Serie: Codable, Hashable {
struct Serie: Codable {
var code, libelle: String?
var valide: Bool?
var sexe: String?
@ -382,7 +382,7 @@ struct Serie: Codable, Hashable {
}
// MARK: - Epreuve
struct Epreuve: Codable, Hashable {
struct Epreuve: Codable {
var inscriptionEnLigneEnCours: Bool?
var categorieAge: CategorieAge?
var typeEpreuve: TypeEpreuve?
@ -419,7 +419,7 @@ struct Epreuve: Codable, Hashable {
}
// MARK: - TypeEpreuve
struct TypeEpreuve: Codable, Hashable {
struct TypeEpreuve: Codable {
let code: String?
let delai: Int?
let libelle: String?
@ -437,12 +437,12 @@ struct TypeEpreuve: Codable, Hashable {
}
// MARK: - BorneAnneesNaissance
struct BorneAnneesNaissance: Codable, Hashable {
struct BorneAnneesNaissance: Codable {
var min, max: Int?
}
// MARK: - Installation
struct Installation: Codable, Hashable {
struct Installation: Codable {
var ville: String?
var lng: Double?
var surfaces: [JSONAny]?
@ -457,7 +457,7 @@ struct Installation: Codable, Hashable {
}
// MARK: - JugeArbitre
struct JugeArbitre: Codable, Hashable {
struct JugeArbitre: Codable {
var idCRM, id: Int?
var nom, prenom: String?
@ -468,7 +468,7 @@ struct JugeArbitre: Codable, Hashable {
}
// MARK: - ModeleDeBalle
struct ModeleDeBalle: Codable, Hashable {
struct ModeleDeBalle: Codable {
var libelle: String?
var marqueDeBalle: MarqueDeBalle?
var id: Int?
@ -476,7 +476,7 @@ struct ModeleDeBalle: Codable, Hashable {
}
// MARK: - MarqueDeBalle
struct MarqueDeBalle: Codable, Hashable {
struct MarqueDeBalle: Codable {
var id: Int?
var valide: Bool?
var marque: String?
@ -529,13 +529,9 @@ class JSONCodingKey: CodingKey {
}
}
class JSONAny: Codable, Hashable, Equatable {
class JSONAny: Codable {
var value: Any
init() {
self.value = ()
}
let value: Any
static func decodingError(forCodingPath codingPath: [CodingKey]) -> DecodingError {
let context = DecodingError.Context(codingPath: codingPath, debugDescription: "Cannot decode JSONAny")
@ -726,70 +722,4 @@ class JSONAny: Codable, Hashable, Equatable {
try JSONAny.encode(to: &container, value: self.value)
}
}
public static func == (lhs: JSONAny, rhs: JSONAny) -> Bool {
switch (lhs.value, rhs.value) {
case (let l as Bool, let r as Bool): return l == r
case (let l as Int64, let r as Int64): return l == r
case (let l as Double, let r as Double): return l == r
case (let l as String, let r as String): return l == r
case (let l as JSONNull, let r as JSONNull): return true
case (let l as [Any], let r as [Any]):
guard l.count == r.count else { return false }
return zip(l, r).allSatisfy { (a, b) in
// Recursively wrap in JSONAny for comparison
JSONAny(value: a) == JSONAny(value: b)
}
case (let l as [String: Any], let r as [String: Any]):
guard l.count == r.count else { return false }
for (key, lVal) in l {
guard let rVal = r[key], JSONAny(value: lVal) == JSONAny(value: rVal) else { return false }
}
return true
default:
return false
}
}
public func hash(into hasher: inout Hasher) {
switch value {
case let v as Bool:
hasher.combine(0)
hasher.combine(v)
case let v as Int64:
hasher.combine(1)
hasher.combine(v)
case let v as Double:
hasher.combine(2)
hasher.combine(v)
case let v as String:
hasher.combine(3)
hasher.combine(v)
case is JSONNull:
hasher.combine(4)
case let v as [Any]:
hasher.combine(5)
for elem in v {
JSONAny(value: elem).hash(into: &hasher)
}
case let v as [String: Any]:
hasher.combine(6)
// Order of hashing dictionary keys shouldn't matter
for key in v.keys.sorted() {
hasher.combine(key)
if let val = v[key] {
JSONAny(value: val).hash(into: &hasher)
}
}
default:
hasher.combine(-1)
}
}
// Helper init for internal use
convenience init(value: Any) {
self.init()
self.value = value
}
}

@ -12,6 +12,36 @@ import LeStorage
extension Tournament {
func setupFederalSettings() {
teamSorting = tournamentLevel.defaultTeamSortingType
groupStageMatchFormat = groupStageSmartMatchFormat()
loserBracketMatchFormat = loserBracketSmartMatchFormat(5)
matchFormat = roundSmartMatchFormat(5)
entryFee = tournamentLevel.entryFee
registrationDateLimit = deadline(for: .inscription)
if enableOnlineRegistration, isAnimation() == false {
accountIsRequired = true
licenseIsRequired = true
}
}
func customizeUsingPreferences() {
guard let lastTournamentWithSameBuild = DataStore.shared.tournaments.filter({ tournament in
tournament.tournamentLevel == self.tournamentLevel
&& tournament.tournamentCategory == self.tournamentCategory
&& tournament.federalTournamentAge == self.federalTournamentAge
&& tournament.hasEnded() == true
&& tournament.isCanceled == false
&& tournament.isDeleted == false
}).sorted(by: \.endDate!, order: .descending).first else {
return
}
self.dayDuration = lastTournamentWithSameBuild.dayDuration
self.teamCount = (lastTournamentWithSameBuild.teamCount / 2) * 2
self.enableOnlineRegistration = lastTournamentWithSameBuild.enableOnlineRegistration
}
func addTeam(_ players: Set<PlayerRegistration>, registrationDate: Date? = nil, name: String? = nil) -> TeamRegistration {
let team = TeamRegistration(tournament: id, registrationDate: registrationDate ?? Date(), name: name)
team.setWeight(from: Array(players), inTournamentCategory: tournamentCategory)
@ -107,9 +137,9 @@ extension Tournament {
players.filter({ $0.hasHomonym() })
}
func payIfNecessary() async throws {
func payIfNecessary() throws {
if self.payment != nil { return }
if let payment = await Guard.main.paymentForNewTournament() {
if let payment = Guard.main.paymentForNewTournament() {
self.payment = payment
DataStore.shared.tournaments.addOrUpdate(instance: self)
return
@ -205,7 +235,7 @@ extension Tournament {
}
func registrationIssues(selectedTeams: [TeamRegistration]) async -> Int {
let players : [PlayerRegistration] = selectedTeams.flatMap { $0.players() }
let players : [PlayerRegistration] = unsortedPlayers()
let callDateIssue : [TeamRegistration] = selectedTeams.filter { $0.callDate != nil && isStartDateIsDifferentThanCallDate($0) }
let duplicates : [PlayerRegistration] = duplicates(in: players)
let problematicPlayers : [PlayerRegistration] = players.filter({ $0.sex == nil })

@ -1,22 +0,0 @@
//
// View+Extensions.swift
// PadelClub
//
// Created by Razmig Sarkissian on 29/09/2025.
//
import SwiftUI
extension View {
/// Runs a transform only on iOS 26+, otherwise returns self
@ViewBuilder
func ifAvailableiOS26<Content: View>(
@ViewBuilder transform: (Self) -> Content
) -> some View {
if #available(iOS 26.0, *) {
transform(self)
} else {
self
}
}
}

@ -193,11 +193,11 @@ struct PadelClubApp: App {
navigationViewModel.selectedTab = .umpire
}
if navigationViewModel.accountPath.isEmpty {
navigationViewModel.accountPath.append(MyAccountView.AccountScreen.login)
} else if navigationViewModel.accountPath.last! != .login {
navigationViewModel.accountPath.removeAll()
navigationViewModel.accountPath.append(MyAccountView.AccountScreen.login)
if navigationViewModel.umpirePath.isEmpty {
navigationViewModel.umpirePath.append(UmpireView.UmpireScreen.login)
} else if navigationViewModel.umpirePath.last! != .login {
navigationViewModel.umpirePath.removeAll()
navigationViewModel.umpirePath.append(UmpireView.UmpireScreen.login)
}
}
}.resume()
@ -248,8 +248,7 @@ struct DownloadNewVersionView: View {
}.padding().background(.logoYellow)
.clipShape(.buttonBorder)
}
.frame(maxWidth: .infinity)
}.frame(maxWidth: .infinity)
.foregroundStyle(.logoBackground)
.fontWeight(.medium)
.multilineTextAlignment(.center)

@ -154,7 +154,7 @@ class FileImportManager {
}
let significantPlayerCount = 2
let pl = players.prefix(significantPlayerCount).map { $0.computedRank }
let missingPl = (missing.map { tournament.unrankValue(for: $0 == 1 ? true : false ) ?? ($0 == 1 ? 92_327 : 10_000) }).prefix(significantPlayerCount)
let missingPl = (missing.map { tournament.unrankValue(for: $0 == 1 ? true : false ) ?? ($0 == 1 ? 90_415 : 10_000) }).prefix(significantPlayerCount)
self.weight = pl.reduce(0,+) + missingPl.reduce(0,+)
} else {
self.weight = players.map { $0.computedRank }.reduce(0,+)

@ -240,8 +240,7 @@ class FederalDataService {
let queryString = urlComponents.query ?? ""
// The servicePath now points to your backend's endpoint for all tournaments: 'fft/all-tournaments/'
var urlRequest = try service._baseRequest(servicePath: "fft/all-tournaments?\(queryString)", method: .get, requiresToken: true)
urlRequest.timeoutInterval = 180
let urlRequest = try service._baseRequest(servicePath: "fft/all-tournaments?\(queryString)", method: .get, requiresToken: true)
let (data, response) = try await URLSession.shared.data(for: urlRequest)
@ -276,8 +275,7 @@ class FederalDataService {
// The servicePath now points to your backend's endpoint for umpire data: 'fft/umpire/{tournament_id}/'
let servicePath = "fft/umpire/\(idTournament)/"
var urlRequest = try service._baseRequest(servicePath: servicePath, method: .get, requiresToken: false)
urlRequest.timeoutInterval = 120.0
let urlRequest = try service._baseRequest(servicePath: servicePath, method: .get, requiresToken: false)
let (data, response) = try await URLSession.shared.data(for: urlRequest)
@ -299,4 +297,72 @@ class FederalDataService {
throw NetworkManagerError.apiError("Failed to decode UmpireContactInfo: \(error.localizedDescription)")
}
}
/// Fetches umpire contact data for multiple tournament IDs.
/// This function calls your backend endpoint that handles multiple tournament IDs via query parameters.
/// - Parameter tournamentIds: An array of tournament ID strings.
/// - Returns: A dictionary mapping tournament IDs to tuples `(name: String?, email: String?, phone: String?)` containing the umpire's contact info.
/// - Throws: An error if the network request fails or decoding the response is unsuccessful.
func getUmpiresData(tournamentIds: [String]) async throws -> [String: (name: String?, email: String?, phone: String?)] {
let service = try StoreCenter.main.service()
// Validate input
guard !tournamentIds.isEmpty else {
throw NetworkManagerError.apiError("Tournament IDs array cannot be empty")
}
// Create the base service path
let basePath = "fft/umpires/"
// Build query parameters - join tournament IDs with commas
let tournamentIdsParam = tournamentIds.joined(separator: ",")
let queryItems = [URLQueryItem(name: "tournament_ids", value: tournamentIdsParam)]
// Create the URL with query parameters
var urlComponents = URLComponents()
urlComponents.queryItems = queryItems
let servicePath = basePath + (urlComponents.url?.query.map { "?\($0)" } ?? "")
let urlRequest = try service._baseRequest(servicePath: servicePath, method: .get, requiresToken: false)
let (data, response) = try await URLSession.shared.data(for: urlRequest)
guard let httpResponse = response as? HTTPURLResponse else {
throw URLError(.badServerResponse)
}
guard !data.isEmpty else {
throw NetworkManagerError.noDataReceived
}
// Check for HTTP errors
guard httpResponse.statusCode == 200 else {
if let errorData = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
let message = errorData["message"] as? String {
throw NetworkManagerError.apiError("Server error: \(message)")
}
throw NetworkManagerError.apiError("HTTP error: \(httpResponse.statusCode)")
}
do {
let umpireResponse = try JSONDecoder().decode(UmpireDataResponse.self, from: data)
// Convert the results to the expected return format
var resultDict: [String: (name: String?, email: String?, phone: String?)] = [:]
for (tournamentId, umpireInfo) in umpireResponse.results {
resultDict[tournamentId] = (name: umpireInfo.name, email: umpireInfo.email, phone: umpireInfo.phone)
}
print("Umpire data fetched for \(resultDict.count) tournaments")
return resultDict
} catch {
print("Decoding error for UmpireDataResponse: \(error)")
throw NetworkManagerError.apiError("Failed to decode UmpireDataResponse: \(error.localizedDescription)")
}
}
}

@ -93,7 +93,7 @@ class NetworkFederalService {
//"geocoding%5Bcountry%5D=fr&geocoding%5Bville%5D=13%20Avenue%20Emile%20Bodin%2013260%20Cassis&geocoding%5Brayon%5D=15&geocoding%5BuserPosition%5D%5Blat%5D=43.22278594081477&geocoding%5BuserPosition%5D%5Blng%5D=5.556953900769194&geocoding%5BuserPosition%5D%5BshowDistance%5D=true&nombreResultat=0&diplomeEtatOption=false&galaxieOption=false&fauteuilOption=false&tennisSanteOption=false"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://tenup.fft.fr/recherche/clubs/ajax")!)
var request = URLRequest(url: URL(string: "https://tenup.fft.fr/recherche/clubs/ajax")!,timeoutInterval: Double.infinity)
request.addValue("application/json, text/plain, */*", forHTTPHeaderField: "Accept")
request.addValue("fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3", forHTTPHeaderField: "Accept-Language")
request.addValue("gzip, deflate, br", forHTTPHeaderField: "Accept-Encoding")

@ -1,77 +0,0 @@
//
// PaymentService.swift
// PadelClub
//
// Created by Razmig Sarkissian on 01/10/2025.
//
import Foundation
import LeStorage
import PadelClubData
class PaymentService {
static func resendPaymentEmail(teamRegistrationId: String) async throws -> SimpleResponse {
let service = try StoreCenter.main.service()
let urlRequest = try service._baseRequest(
servicePath: "resend-payment-email/\(teamRegistrationId)/",
method: .post,
requiresToken: true
)
let (data, response) = try await URLSession.shared.data(for: urlRequest)
guard let httpResponse = response as? HTTPURLResponse,
httpResponse.statusCode == 200 else {
throw PaymentError.requestFailed
}
return try JSON.decoder.decode(SimpleResponse.self, from: data)
}
static func getPaymentLink(teamRegistrationId: String) async throws -> PaymentLinkResponse {
let service = try StoreCenter.main.service()
let urlRequest = try service._baseRequest(
servicePath: "payment-link/\(teamRegistrationId)/",
method: .get,
requiresToken: true
)
let (data, response) = try await URLSession.shared.data(for: urlRequest)
guard let httpResponse = response as? HTTPURLResponse,
httpResponse.statusCode == 200 else {
throw PaymentError.requestFailed
}
// // Debug: Print the raw JSON response
// if let jsonString = String(data: data, encoding: .utf8) {
// print("Raw JSON Response: \(jsonString)")
// }
return try JSON.decoder.decode(PaymentLinkResponse.self, from: data)
}
}
struct PaymentLinkResponse: Codable {
let success: Bool
let paymentLink: String?
let message: String?
enum CodingKeys: String, CodingKey {
case success
case paymentLink
case message
}
}
enum PaymentError: Error {
case requestFailed
case unauthorized
case unknown
}
struct SimpleResponse: Codable {
let success: Bool
let message: String
}

@ -660,21 +660,6 @@ struct UpdatePlannedDatesTip: Tip {
}
}
struct MergeTournamentTip: Tip {
var title: Text {
Text("Transfert de tournois")
}
var message: Text? {
Text("Vous pouvez transferer des tournois d'un autre événement dans celui-ci.")
}
var image: Image? {
Image(systemName: "square.and.arrow.down")
}
}
struct TipStyleModifier: ViewModifier {
@Environment(\.colorScheme) var colorScheme
var tint: Color?

@ -25,7 +25,7 @@ enum AgendaDestination: Int, CaseIterable, Identifiable, Selectable, Equatable {
var localizedTitleKey: String {
switch self {
case .activity:
return "À venir"
return "En cours"
case .history:
return "Terminé"
case .tenup:
@ -60,9 +60,9 @@ enum AgendaDestination: Int, CaseIterable, Identifiable, Selectable, Equatable {
func badgeValue() -> Int? {
switch self {
case .activity:
DataStore.shared.tournaments.filter { $0.endDate == nil && $0.isDeleted == false && FederalDataViewModel.shared.isTournamentValidForFilters($0) && $0.sharing != .granted }.count
DataStore.shared.tournaments.filter { $0.endDate == nil && $0.isDeleted == false && FederalDataViewModel.shared.isTournamentValidForFilters($0) }.count
case .history:
DataStore.shared.tournaments.filter { $0.endDate != nil && FederalDataViewModel.shared.isTournamentValidForFilters($0) && $0.sharing != .granted }.count
DataStore.shared.tournaments.filter { $0.endDate != nil && FederalDataViewModel.shared.isTournamentValidForFilters($0) }.count
case .tenup:
FederalDataViewModel.shared.filteredFederalTournaments.map { $0.tournaments.count }.reduce(0,+)
case .around:

@ -23,7 +23,6 @@ class FederalDataViewModel {
var searchAttemptCount: Int = 0
var dayDuration: Int?
var dayPeriod: DayPeriod = .all
var weekdays: Set<Int> = Set()
var lastError: NetworkManagerError?
func filterStatus() -> String {
@ -37,7 +36,6 @@ class FederalDataViewModel {
}
labels.append(contentsOf: clubNames.formatList())
labels.append(contentsOf: weekdays.map { Date.weekdays[$0 - 1] }.formatList())
if dayPeriod != .all {
labels.append(dayPeriod.localizedDayPeriodLabel())
}
@ -70,12 +68,11 @@ class FederalDataViewModel {
selectedClubs.removeAll()
dayPeriod = .all
dayDuration = nil
weekdays.removeAll()
id = UUID()
}
func areFiltersEnabled() -> Bool {
(weekdays.isEmpty && levels.isEmpty && categories.isEmpty && ageCategories.isEmpty && selectedClubs.isEmpty && dayPeriod == .all && dayDuration == nil) == false
(levels.isEmpty && categories.isEmpty && ageCategories.isEmpty && selectedClubs.isEmpty && dayPeriod == .all && dayDuration == nil) == false
}
var filteredFederalTournaments: [FederalTournamentHolder] {
@ -99,8 +96,6 @@ class FederalDataViewModel {
(dayPeriod == .all || (dayPeriod != .all && dayPeriod == tournament.dayPeriod))
&&
(dayDuration == nil || (dayDuration != nil && dayDuration == tournament.dayDuration))
&&
(weekdays.isEmpty || weekdays.contains(tournament.startDate.weekDay))
})
}
@ -111,8 +106,6 @@ class FederalDataViewModel {
(dayPeriod == .all || (dayPeriod != .all && dayPeriod == tournament.dayPeriod))
&&
(dayDuration == nil || (dayDuration != nil && dayDuration == tournament.dayDuration))
&&
(weekdays.isEmpty || weekdays.contains(tournament.startDate.weekDay))
})
.flatMap { $0.tournaments }
.filter {
@ -144,8 +137,6 @@ class FederalDataViewModel {
(dayPeriod == .all || (dayPeriod != .all && dayPeriod == tournament.dayPeriod))
&&
(dayDuration == nil || (dayDuration != nil && dayDuration == tournament.dayDuration))
&&
(weekdays.isEmpty || weekdays.contains(tournament.startDate.weekDay))
if let codeClub = tournament.club()?.code {
return firstPart && (selectedClubs.isEmpty || selectedClubs.contains(codeClub))
@ -166,8 +157,6 @@ class FederalDataViewModel {
(dayPeriod == .all || (dayPeriod != .all && dayPeriod == tournament.dayPeriod))
&&
(dayDuration == nil || (dayDuration != nil && dayDuration == tournament.dayDuration))
&&
(weekdays.isEmpty || weekdays.contains(tournament.startDate.weekDay))
}
func gatherTournaments(clubs: [Club], startDate: Date, endDate: Date? = nil) async throws {

@ -12,7 +12,7 @@ import PadelClubData
class NavigationViewModel {
var path = NavigationPath()
var toolboxPath = NavigationPath()
var accountPath: [MyAccountView.AccountScreen] = []
var umpirePath: [UmpireView.UmpireScreen] = []
var ongoingPath = NavigationPath()
var selectedTab: TabDestination?
var agendaDestination: AgendaDestination? = .activity

@ -75,16 +75,6 @@ class SearchViewModel: ObservableObject, Identifiable {
return message.joined(separator: "\n")
}
func sortTitle() -> String {
var base = [sortOption.localizedLabel()]
base.append((ascending ? "croissant" : "décroissant"))
if selectedAgeCategory != .unlisted {
base.append(selectedAgeCategory.localizedFederalAgeLabel())
}
return base.joined(separator: " ")
}
func codeClubs() -> [String] {
let clubs: [Club] = DataStore.shared.user.clubsObjects()
return clubs.compactMap { $0.code }

@ -17,7 +17,6 @@ enum TabDestination: CaseIterable, Identifiable {
case tournamentOrganizer
case umpire
case ongoing
case myAccount
var title: String {
switch self {
@ -31,8 +30,6 @@ enum TabDestination: CaseIterable, Identifiable {
return "Gestionnaire"
case .umpire:
return "Juge-Arbitre"
case .myAccount:
return "Compte"
}
}
@ -48,8 +45,6 @@ enum TabDestination: CaseIterable, Identifiable {
return "squares.below.rectangle"
case .umpire:
return "person.bust"
case .myAccount:
return "person.crop.circle"
}
}
}

@ -106,7 +106,7 @@ struct BracketCallingView: View {
ForEach(filteredRounds()) { round in
let seeds = seeds(forRoundIndex: round.index)
let startDate = ([round.startDate] + round.playedMatches().map { $0.startDate }).compacted().min()
let startDate = round.startDate ?? round.playedMatches().first?.startDate
let callSeeds = seeds.filter({ tournament.isStartDateIsDifferentThanCallDate($0, expectedSummonDate: startDate) == false })
if seeds.isEmpty == false {
Section {

@ -31,7 +31,7 @@ struct CallMessageCustomizationView: View {
self.tournament = tournament
_customCallMessageBody = State(wrappedValue: DataStore.shared.user.summonsMessageBody ?? (DataStore.shared.user.summonsUseFullCustomMessage ? "" : ContactType.defaultCustomMessage))
_customCallMessageSignature = State(wrappedValue: DataStore.shared.user.getSummonsMessageSignature() ?? DataStore.shared.user.defaultSignature(tournament))
_customClubName = State(wrappedValue: tournament.customClubName ?? tournament.clubName ?? "Lieu du tournoi")
_customClubName = State(wrappedValue: tournament.clubName ?? "Lieu du tournoi")
_summonsAvailablePaymentMethods = State(wrappedValue: DataStore.shared.user.summonsAvailablePaymentMethods ?? ContactType.defaultAvailablePaymentMethods)
}
@ -126,7 +126,7 @@ struct CallMessageCustomizationView: View {
} label: {
Text("Valider")
}
.buttonStyle(.borderedProminent)
.buttonStyle(.bordered)
}
}
}
@ -235,13 +235,14 @@ struct CallMessageCustomizationView: View {
if let eventClub = tournament.eventObject()?.clubObject() {
let hasBeenCreated: Bool = eventClub.hasBeenCreated(by: StoreCenter.main.userId)
Section {
TextField("Nom du club", text: $customClubName)
TextField("Nom du club", text: $customClubName, axis: .vertical)
.lineLimit(2)
.autocorrectionDisabled()
.focused($focusedField, equals: .clubName)
.onSubmit {
tournament.customClubName = customClubName.prefixTrimmed(100)
eventClub.name = customClubName
do {
try dataStore.tournaments.addOrUpdate(instance: tournament)
try dataStore.clubs.addOrUpdate(instance: eventClub)
} catch {
Logger.error(error)
}

@ -96,11 +96,11 @@ struct CallSettingsView: View {
//#endif
}
.sheet(isPresented: $showSendToAllView) {
SendToAllView(tournament: tournament, addLink: false)
SendToAllView(addLink: false)
.tint(.master)
}
.sheet(isPresented: $addLink) {
SendToAllView(tournament: tournament, addLink: true)
SendToAllView(addLink: true)
.tint(.master)
}
}

@ -60,10 +60,9 @@ struct CallView: View {
@State var showUserCreationView: Bool = false
@State var summonParamByMessage: Bool = false
@State var summonParamReSummon: SummonType = .contact
@State var summonParamReSummon: Bool = false
let simpleMode : Bool
let summonType: SummonType
init(teams: [TeamRegistration], callDate: Date, matchFormat: MatchFormat, roundLabel: String) {
self.teams = teams
@ -72,7 +71,6 @@ struct CallView: View {
self.roundLabel = roundLabel
self.simpleMode = false
self.displayContext = .footer
self.summonType = .contact
}
init(teams: [TeamRegistration]) {
@ -82,14 +80,12 @@ struct CallView: View {
self.roundLabel = ""
self.simpleMode = true
self.displayContext = .footer
self.summonType = .contact
}
init(team: TeamRegistration, displayContext: SummoningDisplayContext, summonType: SummonType) {
init(team: TeamRegistration, displayContext: SummoningDisplayContext) {
self.teams = [team]
let expectedSummonDate = team.expectedSummonDate()
self.displayContext = displayContext
self.summonType = summonType
if let expectedSummonDate, let initialMatch = team.initialMatch() {
self.callDate = expectedSummonDate
@ -101,11 +97,6 @@ struct CallView: View {
self.matchFormat = initialGroupStage.matchFormat
self.roundLabel = "poule"
self.simpleMode = false
} else if let expectedSummonDate {
self.callDate = expectedSummonDate
self.matchFormat = MatchFormat.nineGames
self.roundLabel = ""
self.simpleMode = false
} else {
self.callDate = Date()
self.matchFormat = MatchFormat.nineGames
@ -135,7 +126,7 @@ struct CallView: View {
if success {
calledTeams.forEach { team in
team.callDate = callDate
if summonType.shouldConfirm() {
if reSummon {
team.confirmationDate = nil
}
}
@ -147,26 +138,21 @@ struct CallView: View {
}
}
func finalMessage(summonType: SummonType, forcedEmptyMessage: Bool) -> String {
if summonType == .contactWithoutSignature {
return ""
}
func finalMessage(reSummon: Bool, forcedEmptyMessage: Bool) -> String {
if simpleMode || forcedEmptyMessage {
let signature = dataStore.user.getSummonsMessageSignature() ?? dataStore.user.defaultSignature(tournament)
return "\n\n\n\n" + signature
}
return ContactType.callingMessage(tournament: tournament, startDate: callDate, roundLabel: roundLabel, matchFormat: matchFormat, summonType: summonType)
return ContactType.callingMessage(tournament: tournament, startDate: callDate, roundLabel: roundLabel, matchFormat: matchFormat, reSummon: reSummon)
}
var reSummon: Bool {
if simpleMode {
return false
}
return self.teams.allSatisfy({ $0.called() })
}
//
// var summonType: SummonType {
// if simpleMode {
// return .contact
// }
// return self.teams.allSatisfy({ $0.called() }) == true ? .summon : .summonWalkoutFollowUp
// }
var mainWord: String {
if simpleMode {
@ -277,7 +263,7 @@ struct CallView: View {
LoginView(reason: LoginReason.loginRequiredForFeature) { _ in
self.showUserCreationView = false
self._summon(byMessage: self.summonParamByMessage,
summonType: self.summonType)
reSummon: self.summonParamByMessage)
}
}
})
@ -285,7 +271,7 @@ struct CallView: View {
private func _footerStyleView() -> some View {
HStack {
let callWord : String = (summonType.isRecall() ? "Reconvoquer" : mainWord)
let callWord : String = (reSummon ? "Reconvoquer" : mainWord)
if self.teams.count == 1 {
if simpleMode {
Text("\(callWord) cette paire par")
@ -313,16 +299,19 @@ struct CallView: View {
self._summonMenu(byMessage: true)
self._summonMenu(byMessage: false)
} label: {
VStack(alignment: .leading) {
let callWord : String = summonType.mainWord()
if self.teams.count == 1 {
let callWord : String = (reSummon ? "Reconvoquer" : mainWord)
if self.teams.count == 1 {
if simpleMode {
Text("\(callWord) cette paire")
} else {
Text("\(callWord) ces \(self.teams.count) paires")
}
if let caption = summonType.caption() {
Text(caption).foregroundStyle(.secondary).font(.caption)
if let previousCallDate = teams.first?.callDate, Calendar.current.compare(previousCallDate, to: callDate, toGranularity: .minute) != .orderedSame {
Text("Reconvoquer \(self.callDate.localizedDate())")
} else {
Text("\(callWord) cette paire")
}
}
} else {
Text("\(callWord) ces \(self.teams.count) paires")
}
}
}
@ -330,45 +319,21 @@ struct CallView: View {
@ViewBuilder
private func _summonMenu(byMessage: Bool) -> some View {
if displayContext == .menu {
Button {
switch summonType {
case .contact:
self._summon(byMessage: byMessage, summonType: .contact, forcedEmptyMessage: true)
case .summon:
self._summon(byMessage: byMessage, summonType: .summon)
case .summonWalkoutFollowUp:
self._summon(byMessage: byMessage, summonType: .summonWalkoutFollowUp)
case .summonErrorFollowUp:
self._summon(byMessage: byMessage, summonType: .summonErrorFollowUp)
case .contactWithoutSignature:
self._summon(byMessage: byMessage, summonType: .contactWithoutSignature, forcedEmptyMessage: true)
}
} label: {
Text(byMessage ? "sms" : "mail")
.underline()
}
} else if summonType.isRecall() {
if self.reSummon {
Menu {
Button(mainWord) {
self._summon(byMessage: byMessage, summonType: simpleMode ? .contact : .summon)
}
Button("Re-convoquer suite à des forfaits") {
self._summon(byMessage: byMessage, summonType: .summonWalkoutFollowUp)
self._summon(byMessage: byMessage, reSummon: false)
}
Button("Re-convoquer suite à une erreur") {
self._summon(byMessage: byMessage, summonType: .summonErrorFollowUp)
Button("Re-convoquer") {
self._summon(byMessage: byMessage, reSummon: true)
}
Divider()
Button("Contacter") {
self._summon(byMessage: byMessage, summonType: .contact, forcedEmptyMessage: true)
}
Button("Contacter sans texte par défaut") {
self._summon(byMessage: byMessage, summonType: .contactWithoutSignature, forcedEmptyMessage: true)
if simpleMode == false {
Divider()
Button("Contacter") {
self._summon(byMessage: byMessage, reSummon: false, forcedEmptyMessage: true)
}
}
} label: {
@ -377,19 +342,19 @@ struct CallView: View {
}
} else {
FooterButtonView(byMessage ? "sms" : "mail") {
self._summon(byMessage: byMessage, summonType: summonType)
self._summon(byMessage: byMessage, reSummon: false)
}
}
}
private func _summon(byMessage: Bool, summonType: SummonType, forcedEmptyMessage: Bool = false) {
private func _summon(byMessage: Bool, reSummon: Bool, forcedEmptyMessage: Bool = false) {
self.summonParamByMessage = byMessage
self.summonParamReSummon = summonType
self.summonParamReSummon = reSummon
self._verifyUser {
if byMessage {
self._contactByMessage(summonType: summonType, forcedEmptyMessage: forcedEmptyMessage)
self._contactByMessage(reSummon: reSummon, forcedEmptyMessage: forcedEmptyMessage)
} else {
self._contactByMail(summonType: summonType, forcedEmptyMessage: forcedEmptyMessage)
self._contactByMail(reSummon: reSummon, forcedEmptyMessage: forcedEmptyMessage)
}
}
}
@ -411,18 +376,18 @@ struct CallView: View {
// }
// }
fileprivate func _contactByMessage(summonType: SummonType, forcedEmptyMessage: Bool) {
fileprivate func _contactByMessage(reSummon: Bool, forcedEmptyMessage: Bool) {
self.contactType = .message(date: callDate,
recipients: teams.flatMap { $0.getPhoneNumbers() },
body: finalMessage(summonType: summonType, forcedEmptyMessage: forcedEmptyMessage),
body: finalMessage(reSummon: reSummon, forcedEmptyMessage: forcedEmptyMessage),
tournamentBuild: nil)
}
fileprivate func _contactByMail(summonType: SummonType, forcedEmptyMessage: Bool) {
fileprivate func _contactByMail(reSummon: Bool, forcedEmptyMessage: Bool) {
self.contactType = .mail(date: callDate,
recipients: tournament.umpireMail(),
bccRecipients: teams.flatMap { $0.getMail() },
body: finalMessage(summonType: summonType, forcedEmptyMessage: forcedEmptyMessage),
body: finalMessage(reSummon: reSummon, forcedEmptyMessage: forcedEmptyMessage),
subject: tournament.mailSubject(),
tournamentBuild: nil)
}

@ -43,11 +43,9 @@ struct MenuWarningView: View {
}
}
} label: {
Label("Prévenir", systemImage: "phone")
.labelStyle(.iconOnly)
Text("Prévenir")
.underline()
}
.menuStyle(.button)
.buttonStyle(.borderedProminent)
.sheet(isPresented: self.$showSubscriptionView, content: {
NavigationStack {
SubscriptionView(isPresented: self.$showSubscriptionView, showLackOfPlanMessage: true)
@ -161,16 +159,14 @@ struct MenuWarningView: View {
}
}
// fileprivate func _payTournamentAndExecute(_ handler: () -> ()) {
// Task {
// do {
// try await tournament.payIfNecessary()
// handler()
// } catch {
// self.showSubscriptionView = true
// }
// }
// }
fileprivate func _payTournamentAndExecute(_ handler: () -> ()) {
do {
try tournament.payIfNecessary()
handler()
} catch {
self.showSubscriptionView = true
}
}
}

@ -14,7 +14,7 @@ struct PlayersWithoutContactView: View {
var body: some View {
Section {
let withoutEmails = players.filter({ $0.hasMail() == false })
let withoutEmails = players.filter({ $0.email?.isEmpty == true || $0.email == nil })
DisclosureGroup {
ForEach(withoutEmails) { player in
NavigationLink {
@ -32,7 +32,7 @@ struct PlayersWithoutContactView: View {
}
}
let withoutPhones = players.filter({ $0.hasMobilePhone() == false })
let withoutPhones = players.filter({ $0.phoneNumber?.isEmpty == true || $0.phoneNumber == nil || $0.phoneNumber?.isMobileNumber() == false })
DisclosureGroup {
ForEach(withoutPhones) { player in
NavigationLink {
@ -46,7 +46,7 @@ struct PlayersWithoutContactView: View {
LabeledContent {
Text(withoutPhones.count.formatted())
} label: {
Text(Locale.current.region?.identifier == "FR" ? "Joueurs sans téléphone portable français" : "Joueurs sans téléphone")
Text("Joueurs sans téléphone portable français")
}
}
} header: {
@ -54,4 +54,3 @@ struct PlayersWithoutContactView: View {
}
}
}

@ -14,16 +14,14 @@ struct SendToAllView: View {
@Environment(\.dismiss) var dismiss
@EnvironmentObject var dataStore: DataStore
@Environment(Tournament.self) var tournament: Tournament
@EnvironmentObject var networkMonitor: NetworkMonitor
@State private var contactType: ContactType? = nil
@State private var contactMethod: Int = 1
@State private var contactRecipients: Set<String> = Set()
@State private var sentError: ContactManagerError? = nil
var event: Event?
var tournament: Tournament?
var addLink: Bool
let addLink: Bool
// @State var cannotPayForTournament: Bool = false
@State private var pageLink: PageLink = .matches
@State private var includeWaitingList: Bool = false
@ -35,19 +33,8 @@ struct SendToAllView: View {
@State var summonParamByMessage: Bool = false
@State var summonParamReSummon: Bool = false
init(event: Event) {
self.event = event
self.addLink = false
_contactRecipients = .init(wrappedValue: Set(event.confirmedTournaments().map(\.id)))
}
init(tournament: Tournament, addLink: Bool) {
self.tournament = tournament
self.addLink = addLink
}
var tournamentStore: TournamentStore? {
return self.tournament?.tournamentStore
return self.tournament.tournamentStore
}
var messageSentFailed: Binding<Bool> {
@ -73,52 +60,40 @@ struct SendToAllView: View {
.labelsHidden()
.pickerStyle(.inline)
}
if let event {
LabeledContent {
Text(event.selectedTeams().filter({ contactRecipients.isEmpty || contactRecipients.contains($0.tournament) }).count.formatted())
} label: {
Text("Participants")
}
let confirmedTournaments = event.confirmedTournaments()
ForEach(confirmedTournaments) { tournament in
TournamentCellView(tournament: tournament).tag(tournament.id)
}
} else if let tournament {
Section {
ForEach(tournament.groupStages()) { groupStage in
let teams = groupStage.teams()
if teams.isEmpty == false {
LabeledContent {
Text(teams.count.formatted() + " équipe" + teams.count.pluralSuffix)
} label: {
Text(groupStage.groupStageTitle())
}
.tag(groupStage.id)
Section {
ForEach(tournament.groupStages()) { groupStage in
let teams = groupStage.teams()
if teams.isEmpty == false {
LabeledContent {
Text(teams.count.formatted() + " équipe" + teams.count.pluralSuffix)
} label: {
Text(groupStage.groupStageTitle())
}
.tag(groupStage.id)
}
ForEach(tournament.rounds()) { round in
let teams = round.teams()
if teams.isEmpty == false {
LabeledContent {
Text(teams.count.formatted() + " équipe" + teams.count.pluralSuffix)
} label: {
Text(round.roundTitle())
}
.tag(round.id)
}
ForEach(tournament.rounds()) { round in
let teams = round.teams()
if teams.isEmpty == false {
LabeledContent {
Text(teams.count.formatted() + " équipe" + teams.count.pluralSuffix)
} label: {
Text(round.roundTitle())
}
.tag(round.id)
}
}
Toggle("Inclure la liste d'attente", isOn: $includeWaitingList)
if includeWaitingList {
Toggle("Seulement la liste d'attente", isOn: $onlyWaitingList)
}
} footer: {
Text("Si vous ne souhaitez pas contacter toutes les équipes, choisissez un ou plusieurs groupes d'équipes manuellement.")
Toggle("Inclure la liste d'attente", isOn: $includeWaitingList)
if includeWaitingList {
Toggle("Seulement la liste d'attente", isOn: $onlyWaitingList)
}
} footer: {
Text("Si vous ne souhaitez pas contacter toutes les équipes, choisissez un ou plusieurs groupes d'équipes manuellement.")
}
if addLink, event == nil {
if addLink {
Section {
let links : [PageLink] = [.teams, .summons, .groupStages, .matches, .rankings]
Picker(selection: $pageLink) {
@ -160,7 +135,7 @@ struct SendToAllView: View {
Button("OK") {
}
if case .uncalledTeams(let uncalledTeams) = sentError, let tournament {
if case .uncalledTeams(let uncalledTeams) = sentError {
NavigationLink("Voir les équipes non contactées") {
TeamsCallingView(teams: uncalledTeams)
.environment(tournament)
@ -249,11 +224,6 @@ struct SendToAllView: View {
}
func _teams() -> [TeamRegistration] {
if let event {
return event.selectedTeams().filter({ contactRecipients.isEmpty || contactRecipients.contains($0.tournament) })
}
guard let tournament else { return [] }
let selectedSortedTeams = tournament.selectedSortedTeams()
if onlyWaitingList {
return tournament.waitingListSortedTeams(selectedSortedTeams: selectedSortedTeams)
@ -288,10 +258,8 @@ struct SendToAllView: View {
func finalMessage() -> String {
var message = [String?]()
message.append("\n\n")
if let tournament, addLink, event == nil {
if addLink {
message.append(tournament.shareURL(pageLink)?.absoluteString)
} else if let event {
message.append(event.shareURL()?.absoluteString)
}
let signature = dataStore.user.getSummonsMessageSignature() ?? dataStore.user.defaultSignature(tournament)
@ -305,11 +273,9 @@ struct SendToAllView: View {
self._verifyUser {
if contactMethod == 0 {
contactType = .message(date: nil, recipients: _teams().flatMap { $0.unsortedPlayers() }.flatMap { [$0.phoneNumber, $0.contactPhoneNumber] }.compactMap({ $0 }), body: finalMessage(), tournamentBuild: nil)
contactType = .message(date: nil, recipients: _teams().flatMap { $0.unsortedPlayers() }.compactMap { $0.phoneNumber }, body: finalMessage(), tournamentBuild: nil)
} else {
let umpireMail = tournament?.umpireMail() ?? event?.umpireMail()
let subject = tournament?.mailSubject() ?? event?.mailSubject()
contactType = .mail(date: nil, recipients: umpireMail, bccRecipients: _teams().flatMap { $0.unsortedPlayers() }.flatMap { [$0.email, $0.contactEmail] }.compactMap({ $0 }), body: finalMessage(), subject: subject, tournamentBuild: nil)
contactType = .mail(date: nil, recipients: tournament.umpireMail(), bccRecipients: _teams().flatMap { $0.unsortedPlayers() }.compactMap { $0.email }, body: finalMessage(), subject: tournament.mailSubject(), tournamentBuild: nil)
}
}

@ -129,28 +129,21 @@ struct CallMenuOptionsView: View {
@Environment(Tournament.self) var tournament: Tournament
let team: TeamRegistration
let action: (() -> Void)?
@State private var callDate: Date
init(team: TeamRegistration, action: (() -> Void)? = nil) {
self.team = team
self.action = action
_callDate = .init(wrappedValue: team.expectedSummonDate() ?? team.tournamentObject()?.startDate ?? Date())
}
var confirmed: Binding<Bool> {
Binding {
team.confirmed()
} set: { _ in
team.toggleSummonConfirmation()
_save()
do {
try self.tournament.tournamentStore?.teamRegistrations.addOrUpdate(instance: team)
} catch {
Logger.error(error)
}
action?()
}
}
private func _save() {
self.tournament.tournamentStore?.teamRegistrations.addOrUpdate(instance: team)
}
var body: some View {
List {
Section {
@ -158,36 +151,11 @@ struct CallMenuOptionsView: View {
Toggle(isOn: confirmed) {
Text("Confirmation reçue")
}
DatePicker(selection: $callDate) {
if callDate != team.expectedSummonDate() {
HStack {
Button("Valider", systemImage: "checkmark.circle") {
team.callDate = callDate
_save()
}
.tint(.green)
Divider()
Button("Annuler", systemImage: "xmark.circle", role: .cancel) {
callDate = team.expectedSummonDate() ?? tournament.startDate
}
.tint(.logoRed)
}
.labelStyle(.iconOnly)
.buttonStyle(.borderedProminent)
} else {
Text("Heure de convocation")
}
}
if team.expectedSummonDate() != nil {
CallView(team: team, displayContext: .menu, summonType: .summon)
CallView(team: team, displayContext: .menu, summonType: .summonWalkoutFollowUp)
CallView(team: team, displayContext: .menu, summonType: .summonErrorFollowUp)
CallView(team: team, displayContext: .menu)
}
CallView(team: team, displayContext: .menu, summonType: .contact)
CallView(team: team, displayContext: .menu, summonType: .contactWithoutSignature)
} footer: {
CallView(teams: [team])
}
Section {
@ -202,7 +170,11 @@ struct CallMenuOptionsView: View {
Section {
RowButtonView("Effacer la date de convocation", role: .destructive) {
team.callDate = nil
_save()
do {
try self.tournament.tournamentStore?.teamRegistrations.addOrUpdate(instance: team)
} catch {
Logger.error(error)
}
action?()
dismiss()
}
@ -211,7 +183,11 @@ struct CallMenuOptionsView: View {
Section {
RowButtonView("Indiquer comme convoquée", role: .destructive) {
team.callDate = team.initialMatch()?.startDate ?? tournament.startDate
_save()
do {
try self.tournament.tournamentStore?.teamRegistrations.addOrUpdate(instance: team)
} catch {
Logger.error(error)
}
action?()
dismiss()
}

@ -127,47 +127,49 @@ struct CashierSettingsView: View {
}
}
ToolbarItemGroup(placement: .keyboard) {
if focusedField == ._entryFee {
if tournament.isFree() {
ForEach(priceTags, id: \.self) { priceTag in
Button(priceTag.formatted(.currency(code: tournament.defaultCurrency()))) {
entryFee = priceTag
tournament.entryFee = priceTag
ToolbarItem(placement: .keyboard) {
HStack {
if focusedField == ._entryFee {
if tournament.isFree() {
ForEach(priceTags, id: \.self) { priceTag in
Button(priceTag.formatted(.currency(code: tournament.defaultCurrency()))) {
entryFee = priceTag
tournament.entryFee = priceTag
focusedField = nil
}
.buttonStyle(.bordered)
}
} else {
Button("Gratuit") {
entryFee = nil
tournament.entryFee = nil
focusedField = nil
}
.buttonStyle(.borderedProminent)
.buttonStyle(.bordered)
}
} else {
Button("Gratuit") {
entryFee = nil
tournament.entryFee = nil
focusedField = nil
} else if focusedField == ._clubMemberFeeDeduction {
ForEach(deductionTags, id: \.self) { deductionTag in
Button(deductionTag.formatted(.currency(code: tournament.defaultCurrency()).precision(.fractionLength(0)))) {
clubMemberFeeDeduction = deductionTag
tournament.clubMemberFeeDeduction = deductionTag
focusedField = nil
}
.buttonStyle(.bordered)
}
.buttonStyle(.borderedProminent)
}
} else if focusedField == ._clubMemberFeeDeduction {
ForEach(deductionTags, id: \.self) { deductionTag in
Button(deductionTag.formatted(.currency(code: tournament.defaultCurrency()).precision(.fractionLength(0)))) {
clubMemberFeeDeduction = deductionTag
tournament.clubMemberFeeDeduction = deductionTag
Button("Gratuit") {
clubMemberFeeDeduction = entryFee
tournament.clubMemberFeeDeduction = clubMemberFeeDeduction
focusedField = nil
}
.buttonStyle(.borderedProminent)
.buttonStyle(.bordered)
}
Button("Gratuit") {
clubMemberFeeDeduction = entryFee
tournament.clubMemberFeeDeduction = clubMemberFeeDeduction
Spacer()
Button("Valider") {
focusedField = nil
}
.buttonStyle(.borderedProminent)
}
Spacer()
Button("Valider") {
focusedField = nil
.buttonStyle(.bordered)
}
.buttonStyle(.borderedProminent)
}
}
}

@ -18,7 +18,7 @@ struct ShareableObject {
func sharedData() async -> Data? {
let _players = players.filter({ cashierViewModel._shouldDisplayPlayer($0) })
.map {
[$0.pasteData(type: .payment)]
[$0.pasteData()]
.compacted()
.joined(separator: "\n")
}
@ -51,7 +51,6 @@ class CashierViewModel: ObservableObject {
@Published var sortOrder: PadelClubData.SortOrder = .ascending
@Published var searchText: String = ""
@Published var isSearching: Bool = false
@Published var paymentType: PlayerPaymentType? = nil
func _shouldDisplayTeam(_ team: TeamRegistration) -> Bool {
team.unsortedPlayers().anySatisfy({
@ -66,7 +65,6 @@ class CashierViewModel: ObservableObject {
sortOption.shouldDisplayPlayer(player)
&& filterOption.shouldDisplayPlayer(player)
&& presenceFilterOption.shouldDisplayPlayer(player)
&& (paymentType == nil || player.paymentType == paymentType)
}
}
@ -263,16 +261,6 @@ struct CashierView: View {
} label: {
Text("Statut du règlement")
}
Picker(selection: $cashierViewModel.paymentType) {
Text("N'importe").tag(nil as PlayerPaymentType?)
ForEach(PlayerPaymentType.allCases) { paymentType in
Text(paymentType.localizedLabel()).tag(paymentType)
}
} label: {
Text("Type de règlement")
}
}
Picker(selection: $cashierViewModel.sortOption) {

@ -73,12 +73,14 @@ struct EventCreationView: View {
.focused($textFieldIsFocus)
.toolbar {
if textFieldIsFocus {
ToolbarItemGroup(placement: .keyboard) {
Spacer()
Button("Valider") {
textFieldIsFocus = false
ToolbarItem(placement: .keyboard) {
HStack {
Spacer()
Button("Valider") {
textFieldIsFocus = false
}
.buttonStyle(.bordered)
}
.buttonStyle(.borderedProminent)
}
}
}

@ -16,7 +16,6 @@ struct EventSettingsView: View {
@State private var pageLink: PageLink = .teams
@State private var tournamentInformation: String = ""
@State private var eventStartDate: Date
@State private var showSendToAllView: Bool = false
@FocusState private var focusedField: Tournament.CodingKeys?
var visibleOnPadelClub: Binding<Bool> {
@ -91,14 +90,6 @@ struct EventSettingsView: View {
}
}
_linkLabel()
Section {
RowButtonView("Contactez toutes les équipes") {
showSendToAllView = true
}
}
Section {
DatePicker(selection: $eventStartDate) {
Text(eventStartDate.formatted(.dateTime.weekday(.wide)).capitalized).lineLimit(1)
@ -179,10 +170,6 @@ struct EventSettingsView: View {
}
}
}
.sheet(isPresented: $showSendToAllView) {
SendToAllView(event: event)
.tint(.master)
}
.navigationBarBackButtonHidden(focusedField != nil)
.toolbar(content: {
if focusedField != nil {
@ -195,25 +182,31 @@ struct EventSettingsView: View {
})
.toolbarBackground(.visible, for: .navigationBar)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
_linkLabel()
}
if focusedField != nil {
ToolbarItemGroup(placement: .keyboard) {
if focusedField == ._name, eventName.isEmpty == false {
Button("Effacer") {
event.name = nil
eventName = ""
ToolbarItem(placement: .keyboard) {
HStack {
if focusedField == ._name, eventName.isEmpty == false {
Button("Effacer") {
event.name = nil
eventName = ""
}
.buttonStyle(.borderless)
} else if focusedField == ._information, tournamentInformation.isEmpty == false {
Button("Effacer") {
tournamentInformation = ""
}
.buttonStyle(.borderless)
}
.buttonStyle(.borderedProminent)
} else if focusedField == ._information, tournamentInformation.isEmpty == false {
Button("Effacer") {
tournamentInformation = ""
Spacer()
Button("Valider") {
focusedField = nil
}
.buttonStyle(.borderedProminent)
}
Spacer()
Button("Valider") {
focusedField = nil
.buttonStyle(.bordered)
}
.buttonStyle(.borderedProminent)
}
}
}
@ -284,7 +277,7 @@ struct EventSettingsView: View {
}
}
} label: {
Text("Liens à partager")
Text("Liens")
}
}

@ -15,7 +15,6 @@ struct EventTournamentsView: View {
let event: Event
@State private var newTournament: Tournament?
@State private var mainTournament: Tournament?
@State private var showTournamentPicker: Bool = false
var presentTournamentCreationView: Binding<Bool> { Binding(
get: { newTournament != nil },
@ -123,35 +122,13 @@ struct EventTournamentsView: View {
}
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
BarButtonView("Importer un tournoi", icon: "square.and.arrow.down") {
showTournamentPicker = true
}
}
if #available(iOS 26.0, *) {
ToolbarSpacer(placement: .topBarTrailing)
}
ToolbarItem(placement: .topBarTrailing) {
if #available(iOS 26.0, *) {
BarButtonView("Ajouter une indisponibilité", icon: "plus") {
let tournament = Tournament.newEmptyInstance()
newTournament = tournament
}
} else {
BarButtonView("Ajouter une indisponibilité", icon: "plus.circle.fill") {
let tournament = Tournament.newEmptyInstance()
newTournament = tournament
}
BarButtonView("Ajouter un tournoi", icon: "plus.circle.fill") {
let tournament = Tournament.newEmptyInstance()
newTournament = tournament
}
}
}
.headerProminence(.increased)
.sheet(isPresented: $showTournamentPicker, content: {
NavigationStack {
TournamentPickerView(event: event)
.environmentObject(dataStore)
}
})
.sheet(isPresented: presentTournamentCreationView) {
if let newTournament {
NavigationStack {

@ -76,7 +76,6 @@ enum EventDestination: Identifiable, Selectable, Equatable {
struct EventView: View {
let event: Event
@State private var selectedDestination: EventDestination?
@State private var presentSearchView: Bool = false
init(event: Event) {
self.event = event
@ -111,16 +110,6 @@ struct EventView: View {
}
}
}
.toolbar(content: {
ToolbarItem(placement: .topBarTrailing) {
Button("Recherche", systemImage: "magnifyingglass") {
presentSearchView = true
}
}
})
.sheet(isPresented: $presentSearchView, content: {
PlayerSearchView(event: event)
})
.headerProminence(.increased)
.toolbarBackground(.visible, for: .navigationBar)
.navigationBarTitleDisplayMode(.inline)

@ -1,91 +0,0 @@
//
// TournamentPickerView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 29/09/2025.
//
import SwiftUI
import LeStorage
import PadelClubData
import TipKit
struct TournamentPickerView: View {
@EnvironmentObject var dataStore: DataStore
@Environment(\.dismiss) private var dismiss
let mergeTournamentTip = MergeTournamentTip()
let event: Event
@State private var selectedTournamentIds: Set<String> = Set()
@State private var shouldEraseEmptyEvents: Bool = false
var tournaments: [Tournament] {
dataStore.tournaments.filter({ $0.isDeleted == false && $0.event?.id != event.id }).sorted(by: \.startDate, order: .descending)
}
var body: some View {
List(selection: $selectedTournamentIds) {
Section {
TipView(mergeTournamentTip)
.tipStyle(tint: .green)
}
Section {
Toggle(isOn: $shouldEraseEmptyEvents) {
Text("Effacer les événements vides")
Text("Les événements qui n'ont plus de tournois seront effacés automatiquement.")
}
}
ForEach(tournaments) { tournament in
TournamentCellView(tournament: tournament).tag(tournament.id)
}
}
.environment(\.editMode, Binding.constant(EditMode.active))
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button("Annuler") {
dismiss()
}
}
ToolbarItem(placement: .topBarTrailing) {
ButtonValidateView {
_transferTournaments()
dismiss()
}
.disabled(selectedTournamentIds.isEmpty)
}
}
.navigationTitle("Transfert de tournois")
}
private func _transferTournaments() {
let tournaments = tournaments
var eventIdsToCheck = Set<String>()
var tournamentsToSave = [Tournament]()
selectedTournamentIds.forEach { id in
if let tournament = tournaments.first(where: { $0.id == id }) {
if let eventId = tournament.event{
eventIdsToCheck.insert(eventId)
}
tournament.event = event.id
tournamentsToSave.append(tournament)
}
}
dataStore.tournaments.addOrUpdate(contentOfs: tournamentsToSave)
if shouldEraseEmptyEvents {
var eventsToDelete = [Event]()
eventIdsToCheck.forEach { eventId in
if let eventToCheck = dataStore.events.first(where: { $0.id == eventId }) {
if eventToCheck.tournaments.isEmpty && shouldEraseEmptyEvents {
eventsToDelete.append(eventToCheck)
}
}
}
dataStore.events.delete(contentOfs: eventsToDelete)
}
}
}

@ -223,12 +223,13 @@ struct ClubDetailView: View {
.navigationBarBackButtonHidden(focusedField != nil)
.toolbar(content: {
if focusedField != nil {
ToolbarItemGroup(placement: .keyboard) {
Button("Fermer", role: .cancel) {
focusedField = nil
ToolbarItem(placement: .keyboard) {
HStack {
Button("Fermer", role: .cancel) {
focusedField = nil
}
Spacer()
}
.buttonStyle(.borderedProminent)
Spacer()
}
}
})

@ -28,19 +28,19 @@ struct ClubsView: View {
var body: some View {
List {
// #if DEBUG
// Section {
// RowButtonView("Delete unexisted clubs", action: {
// let ids = dataStore.user.clubs
// ids.forEach { clubId in
// if dataStore.clubs.findById(clubId) == nil {
// dataStore.user.clubs.removeAll(where: { $0 == clubId })
// }
// }
// dataStore.saveUser()
// })
// }
// #endif
#if DEBUG
Section {
RowButtonView("Delete unexisted clubs", action: {
let ids = dataStore.user.clubs
ids.forEach { clubId in
if dataStore.clubs.findById(clubId) == nil {
dataStore.user.clubs.removeAll(where: { $0 == clubId })
}
}
dataStore.saveUser()
})
}
#endif
let clubs : [Club] = dataStore.user.clubsObjects(includeCreated: false)
let onlyCreatedClubs : [Club] = dataStore.user.createdClubsObjectsNotFavorite()
@ -106,6 +106,7 @@ struct ClubsView: View {
}
}
.navigationTitle(selection == nil ? "Clubs favoris" : "Choisir un club")
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
.sheet(isPresented: presentClubCreationView) {
if let newClub {
@ -128,41 +129,23 @@ struct ClubsView: View {
.tint(.master)
}
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
if #available(iOS 26.0, *) {
Button("Chercher", systemImage: "magnifyingglass") {
presentClubSearchView = true
}
} else {
Button {
presentClubSearchView = true
} label: {
Image(systemName: "magnifyingglass.circle.fill")
.resizable()
.scaledToFit()
.frame(minHeight: 28)
}
ToolbarItemGroup(placement: .topBarTrailing) {
Button {
presentClubSearchView = true
} label: {
Image(systemName: "magnifyingglass.circle.fill")
.resizable()
.scaledToFit()
.frame(minHeight: 28)
}
}
if #available(iOS 26.0, *) {
ToolbarSpacer(placement: .topBarTrailing)
}
ToolbarItem(placement: .topBarTrailing) {
if #available(iOS 26.0, *) {
Button("Ajouter", systemImage: "plus") {
newClub = Club.newEmptyInstance()
}
} else {
Button {
newClub = Club.newEmptyInstance()
} label: {
Image(systemName: "plus.circle.fill")
.resizable()
.scaledToFit()
.frame(minHeight: 28)
}
Button {
newClub = Club.newEmptyInstance()
} label: {
Image(systemName: "plus.circle.fill")
.resizable()
.scaledToFit()
.frame(minHeight: 28)
}
}
}

@ -23,17 +23,10 @@ struct ClubCourtSetupView: View {
.disabled(displayContext == .lockedForEditing)
.onChange(of: club.courtCount) {
if displayContext != .addition {
dataStore.clubs.addOrUpdate(instance: club)
dataStore.events.filter { event in
event.club?.id == club.id
}.forEach { event in
let tournaments = event.tournaments.filter({ tournament in
tournament.startDate > Date()
})
tournaments.forEach { tournament in
tournament.courtCount = club.courtCount
}
dataStore.tournaments.addOrUpdate(contentOfs: tournaments)
do {
try dataStore.clubs.addOrUpdate(instance: club)
} catch {
Logger.error(error)
}
}
}

@ -22,14 +22,23 @@ struct BarButtonView: View {
Button(action: {
action()
}) {
if #available(iOS 26.0, *) {
Label(accessibilityLabel, systemImage: icon)
} else {
Image(systemName: icon)
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
Image(systemName: icon)
.resizable()
.scaledToFit()
.frame(minHeight: 28)
/*
Label {
Text(accessibilityLabel)
} icon: {
Image(systemName: icon)
.resizable()
.scaledToFit()
.frame(minHeight: 36)
}
.labelStyle(.iconOnly)
//todo: resizing not working when label used
*/
}
}
}

@ -13,16 +13,10 @@ struct ButtonValidateView: View {
let action: () -> ()
var body: some View {
if #available(iOS 26.0, *) {
Button(title, systemImage: "checkmark", role: role) {
action()
}
.buttonStyle(.borderedProminent)
} else {
Button(title, role: role) {
action()
}
Button(title, role: role) {
action()
}
.clipShape(Capsule())
.buttonStyle(.bordered)
}
}

@ -157,7 +157,6 @@ struct SpinDrawView: View {
ToolbarItem(placement: .status) {
Text("Tous les tirages sont terminés")
.frame(maxWidth: .infinity)
}
}
}
@ -221,7 +220,6 @@ struct FortuneWheelContainerView: View {
.frame(width: 20, height: 20)
.rotationEffect(.degrees(180))
}
.frame(maxWidth: 600, maxHeight: 600)
.onAppear {
if autoMode {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {

@ -9,11 +9,7 @@ import SwiftUI
struct LabelOptions: View {
var body: some View {
if #available(iOS 26.0, *) {
Label("Options", systemImage: "ellipsis")
} else {
Label("Options", systemImage: "ellipsis.circle")
}
Label("Options", systemImage: "ellipsis.circle")
}
}
@ -43,10 +39,6 @@ struct ShareLabel: View {
struct LabelFilter: View {
var body: some View {
if #available(iOS 26.0, *) {
Label("Filtrer", systemImage: "line.3.horizontal.decrease")
} else {
Label("Filtrer", systemImage: "line.3.horizontal.decrease.circle")
}
Label("Filtrer", systemImage: "line.3.horizontal.decrease.circle")
}
}

@ -67,14 +67,15 @@ struct StepperView: View {
}
.multilineTextAlignment(.trailing)
.toolbar {
ToolbarItemGroup(placement: .keyboard) {
ToolbarItem(placement: .keyboard) {
if amountIsFocused {
Spacer()
Button("Confirmer") {
amountIsFocused = false
_validate()
HStack {
Spacer()
Button("Confirmer") {
amountIsFocused = false
_validate()
}
}
.buttonStyle(.borderedProminent)
}
}
}
@ -94,7 +95,7 @@ struct StepperView: View {
}
fileprivate func _plusIsDisabled() -> Bool {
count >= (maximum ?? 92_327)
count >= (maximum ?? 90_415)
}
fileprivate func _add() {

@ -126,7 +126,17 @@ struct GroupStageSettingsView: View {
Section {
RowButtonView("Retirer tout le monde", role: .destructive) {
groupStage.removeAllTeams()
let teams = groupStage.teams()
teams.forEach { team in
team.groupStagePosition = nil
team.groupStage = nil
groupStage._matches().forEach({ $0.updateTeamScores() })
}
do {
try tournamentStore?.teamRegistrations.addOrUpdate(contentOfs: teams)
} catch {
Logger.error(error)
}
}
} footer: {
Text("Toutes les équipes seront retirées et les scores des matchs seront perdus.")
@ -178,14 +188,6 @@ struct GroupStageSettingsView: View {
} footer: {
Text("Mets à jour les équipes de la poule si jamais une erreur est persistante.")
}
if tournament.lastStep() == 0 {
RowButtonView("Effacer la poule", role: .destructive) {
tournament.deleteGroupStage(groupStage)
dismiss()
dataStore.tournaments.addOrUpdate(instance: self.tournament)
}
}
}
.onChange(of: size) {
if size != groupStage.size {

@ -70,7 +70,7 @@ struct GroupStageView: View {
}
Section {
MatchListView(section: "à lancer", matches: groupStage.readyMatches(playedMatches: playedMatches, runningMatches: runningMatches), hideWhenEmpty: true)
MatchListView(section: "à lancer", matches: groupStage.readyMatches(playedMatches: playedMatches), hideWhenEmpty: true)
}
Section {
@ -96,9 +96,6 @@ struct GroupStageView: View {
}
}
.onAppear(perform: {
groupStage.clearScoreCache()
})
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
_groupStageMenuView()
@ -245,6 +242,7 @@ struct GroupStageView: View {
Text("#\(index + 1)")
.font(.caption)
TeamPickerView(groupStagePosition: index, pickTypeContext: .groupStage, teamPicked: { team in
print(team.pasteData())
team.groupStage = groupStage.id
team.groupStagePosition = index
groupStage._matches().forEach({ $0.updateTeamScores() })

@ -99,14 +99,6 @@ struct GroupStagesSettingsView: View {
}
if tournament.lastStep() == 0, step == 0 {
Section {
RowButtonView("Ajouter une poule", role: .destructive) {
self.tournament.addGroupStage()
dataStore.tournaments.addOrUpdate(instance: self.tournament)
}
}
Section {
RowButtonView("Ajouter une phase de poule", role: .destructive) {
tournament.addNewGroupStageStep()

@ -234,7 +234,7 @@ struct GroupStagesView: View {
Section {
MatchListView(section: "à lancer", matches: Tournament.readyMatches(allMatches, runningMatches: runningMatches), isExpanded: false)
MatchListView(section: "à lancer", matches: Tournament.readyMatches(allMatches), isExpanded: false)
}
Section {
@ -256,10 +256,5 @@ struct GroupStagesView: View {
.environment(tournament)
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
$0.navigationSubtitle(tournament.tournamentTitle())
}
}
}
}

@ -1,18 +0,0 @@
//
// RankingGroupStageSetupView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 30/09/2025.
//
import SwiftUI
struct RankingGroupStageSetupView: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
#Preview {
RankingGroupStageSetupView()
}

@ -42,16 +42,6 @@ struct MatchDateView: View {
let estimatedDuration = match.getDuration()
if isReady {
Section {
Button("Démarrer il y a 5 minutes") {
if let updatedField {
match.setCourt(updatedField)
}
match.updateStartDate(Calendar.current.date(byAdding: .minute, value: -5, to: currentDate), keepPlannedStartDate: true)
match.endDate = nil
match.confirmed = true
_save()
}
Button("Démarrer maintenant") {
if let updatedField {
match.setCourt(updatedField)

@ -77,7 +77,7 @@ struct PlayerBlockView: View {
VStack(alignment: .leading) {
ZStack(alignment: .leading) {
VStack {
if let teamName = team?.name, teamName.isEmpty == false {
if let teamName = team?.name {
Text(teamName).foregroundStyle(.secondary).font(.footnote)
}
Text("longLabelPlayerOne").lineLimit(1)
@ -91,7 +91,7 @@ struct PlayerBlockView: View {
Text("Repêchée").italic().font(.caption)
}
if let teamName = team.name, teamName.isEmpty == false {
if let teamName = team.name {
Text(teamName).foregroundStyle(.secondary).font(.footnote)
} else if team.players().isEmpty {
if team.isWildCard() {

@ -309,13 +309,6 @@ struct MatchDetailView: View {
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink {
ShareModelView(instance: self.match)
} label: {
Label("Partager", systemImage: "square.and.arrow.up")
}
Toggle(isOn: .init(get: {
return match.confirmed
}, set: { value in
@ -325,17 +318,6 @@ struct MatchDetailView: View {
Text(match.confirmed ? "Confirmé" : "Non confirmé")
}
if match.hasWalkoutTeam() == true {
Divider()
Button(role: .destructive) {
match.removeWalkOut()
save()
} label: {
Text("Annuler le forfait")
}
}
Divider()
if match.courtIndex != nil {
@ -372,33 +354,6 @@ struct MatchDetailView: View {
Text("Remise-à-zéro")
}
Menu {
Button("Effacer le nom") {
match.name = nil
tournamentStore?.matches.addOrUpdate(instance: match)
}
if let tournament = match.currentTournament() {
Menu {
ForEach(tournament.generateSeedGroups(base: 16, teamCount: 8), id: \.self) { seedGroup in
Button {
match.name = seedGroup.localizedInterval()
tournamentStore?.matches.addOrUpdate(instance: match)
} label: {
Text(seedGroup.localizedInterval())
}
}
} label: {
Text("Choisir un nom")
}
}
} label: {
Text("[Site] Nom du match")
if let name = match.name {
Text("(\(name))")
}
}
if match.teamScores.isEmpty == false {
Divider()
Menu {
@ -427,13 +382,7 @@ struct MatchDetailView: View {
.navigationTitle(match.matchTitle())
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
if let tournament = match.currentTournament() {
$0.navigationSubtitle(tournament.tournamentTitle())
}
}
}
}
var quickLookHeader: some View {
@ -632,20 +581,9 @@ struct MatchDetailView: View {
}
self._verifyUser {
Task {
do {
try await self._payTournamentAndExecute()
self.scoreType = .edition
} catch {
self.showSubscriptionView = true
}
self._payTournamentAndExecute {
self.scoreType = .edition
}
// self._payTournamentAndExecute {
// self.scoreType = .edition
// }
}
}
@ -657,9 +595,15 @@ struct MatchDetailView: View {
}
}
fileprivate func _payTournamentAndExecute() async throws {
fileprivate func _payTournamentAndExecute(_ handler: () -> ()) {
guard let tournament = match.currentTournament() else { fatalError("missing tournament") }
try await tournament.payIfNecessary()
do {
try tournament.payIfNecessary()
handler()
} catch {
self.showSubscriptionView = true
}
}
private func save() {

@ -65,6 +65,7 @@ struct MatchSetupView: View {
HStack {
let luckyLosers = walkOutSpot ? match.luckyLosers() : []
TeamPickerView(shouldConfirm: shouldConfirm, round: match.roundObject, pickTypeContext: matchTypeContext == .bracket ? .bracket : .loserBracket, luckyLosers: luckyLosers, teamPicked: { team in
print(team.pasteData())
if walkOutSpot || team.bracketPosition != nil || matchTypeContext == .loserBracket {
match.setLuckyLoser(team: team, teamPosition: teamPosition)
do {

@ -25,7 +25,6 @@ struct ActivityView: View {
@State private var quickAccessScreen: QuickAccessScreen? = nil
@State private var displaySearchView: Bool = false
@State private var pasteString: String? = nil
@State private var presentOnboarding: Bool = false
enum QuickAccessScreen : Identifiable, Hashable {
case inscription
@ -39,17 +38,17 @@ struct ActivityView: View {
}
var runningTournaments: [FederalTournamentHolder] {
return dataStore.tournaments.filter({ $0.endDate == nil && $0.sharing != .granted })
return dataStore.tournaments.filter({ $0.endDate == nil })
.filter({ federalDataViewModel.isTournamentValidForFilters($0) })
}
func getRunningTournaments() -> [Tournament] {
return dataStore.tournaments.filter({ $0.endDate == nil && $0.sharing != .granted })
return dataStore.tournaments.filter({ $0.endDate == nil })
.filter({ federalDataViewModel.isTournamentValidForFilters($0) })
}
var endedTournaments: [Tournament] {
return dataStore.tournaments.filter({ $0.endDate != nil && $0.sharing != .granted })
return dataStore.tournaments.filter({ $0.endDate != nil })
.filter({ federalDataViewModel.isTournamentValidForFilters($0) })
}
//
@ -78,21 +77,15 @@ struct ActivityView: View {
@ViewBuilder
private func _pasteView() -> some View {
if #available(iOS 26.0, *) {
Button("Ajouter une équipe", systemImage: "person.badge.plus") {
quickAccessScreen = .inscription
}
} else {
Button {
quickAccessScreen = .inscription
} label: {
Image(systemName: "person.crop.circle.badge.plus")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
.accessibilityLabel("Ajouter une équipe")
Button {
quickAccessScreen = .inscription
} label: {
Image(systemName: "person.crop.circle.badge.plus")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
.accessibilityLabel("Ajouter une équipe")
// if pasteButtonIsDisplayed == nil || pasteButtonIsDisplayed == true {
// PasteButton(payloadType: String.self) { strings in
@ -113,8 +106,6 @@ struct ActivityView: View {
@Bindable var navigation = navigation
NavigationStack(path: $navigation.path) {
VStack(spacing: 0) {
Color.clear.frame(height: 1)
.background(Material.ultraThinMaterial)
GenericDestinationPickerView(selectedDestination: $navigation.agendaDestination, destinations: AgendaDestination.allCases, nilDestinationIsValid: false)
ScrollViewReader { proxy in
@ -226,124 +217,85 @@ struct ActivityView: View {
.navigationDestination(for: Tournament.self) { tournament in
TournamentView(tournament: tournament)
}
.navigationDestination(for: SubScreen.self) { build in
switch build {
case .subscription(let federalTournament, let build):
TournamentSubscriptionView(federalTournament: federalTournament, build: build, user: dataStore.user)
}
}
// .onDisappear(perform: {
// pasteButtonIsDisplayed = nil
// print("disappearing", "pasteButtonIsDisplayed", pasteButtonIsDisplayed)
// })
.toolbar {
ToolbarItem(placement: .topBarLeading) {
if #available(iOS 26.0, *) {
if viewStyle == .calendar {
Button("Vue calendrier", systemImage: "calendar") {
switch viewStyle {
case .list:
viewStyle = .calendar
case .calendar:
viewStyle = .list
}
}
.buttonStyle(.borderedProminent)
} else {
Button("Vue calendrier", systemImage: "calendar") {
switch viewStyle {
case .list:
viewStyle = .calendar
case .calendar:
viewStyle = .list
}
}
}
} else {
Button {
switch viewStyle {
case .list:
viewStyle = .calendar
case .calendar:
viewStyle = .list
}
} label: {
Image(systemName: "calendar.circle")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
ToolbarItemGroup(placement: .topBarLeading) {
Button {
switch viewStyle {
case .list:
viewStyle = .calendar
case .calendar:
viewStyle = .list
}
.symbolVariant(viewStyle == .calendar ? .fill : .none)
} label: {
Image(systemName: "calendar.circle")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
}
if #available(iOS 26.0, *) {
ToolbarSpacer(placement: .topBarLeading)
}
ToolbarItem(placement: .topBarLeading) {
if #available(iOS 26.0, *) {
if federalDataViewModel.areFiltersEnabled() {
Button("Filtre", systemImage: "line.3.horizontal.decrease") {
presentFilterView.toggle()
}
.buttonStyle(.borderedProminent)
} else {
Button("Filtre", systemImage: "line.3.horizontal.decrease") {
presentFilterView.toggle()
}
}
} else {
Button {
presentFilterView.toggle()
} label: {
Image(systemName: "line.3.horizontal.decrease.circle")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
.symbolVariant(federalDataViewModel.areFiltersEnabled() ? .fill : .none)
.symbolVariant(viewStyle == .calendar ? .fill : .none)
Button {
presentFilterView.toggle()
} label: {
Image(systemName: "line.3.horizontal.decrease.circle")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
}
if #available(iOS 26.0, *) {
ToolbarSpacer(placement: .topBarLeading)
}
.symbolVariant(federalDataViewModel.areFiltersEnabled() ? .fill : .none)
ToolbarItem(placement: .topBarLeading) {
_pasteView()
}
ToolbarItem(placement: .topBarTrailing) {
if #available(iOS 26.0, *) {
Button("Ajouter", systemImage: "plus") {
newTournament = Tournament.newEmptyInstance()
}
} else {
Button {
newTournament = Tournament.newEmptyInstance()
} label: {
Image(systemName: "plus.circle.fill")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
Button {
newTournament = Tournament.newEmptyInstance()
} label: {
Image(systemName: "plus.circle.fill")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
}
if #unavailable(iOS 26.0) {
if _shouldDisplaySearchStatus() {
ToolbarItemGroup(placement: .bottomBar) {
_searchBoxView()
if tournaments.isEmpty == false, federalDataViewModel.areFiltersEnabled() || navigation.agendaDestination == .around {
ToolbarItemGroup(placement: .bottomBar) {
VStack(spacing: 0) {
let searchStatus = _searchStatus()
if searchStatus.isEmpty == false {
Text(_searchStatus())
.font(.footnote)
.foregroundStyle(.secondary)
}
HStack {
if navigation.agendaDestination == .around {
FooterButtonView("modifier votre recherche") {
displaySearchView = true
}
if federalDataViewModel.areFiltersEnabled() {
Text("ou")
}
}
if federalDataViewModel.areFiltersEnabled() {
FooterButtonView(_filterButtonTitle()) {
presentFilterView = true
}
}
}
.padding(.bottom, 8)
}
}
}
}
.sheet(isPresented: $presentOnboarding, content: {
OnboardingView()
.environmentObject(dataStore)
})
.sheet(isPresented: $presentFilterView) {
TournamentFilterView(federalDataViewModel: federalDataViewModel)
.environment(navigation)
@ -445,41 +397,6 @@ struct ActivityView: View {
}
}
private func _shouldDisplaySearchStatus() -> Bool {
tournaments.isEmpty == false && (federalDataViewModel.areFiltersEnabled() || navigation.agendaDestination == .around)
}
private func _searchBoxView() -> some View {
VStack(spacing: 0) {
let searchStatus = _searchStatus()
if searchStatus.isEmpty == false {
Text(_searchStatus())
.font(.footnote)
.foregroundStyle(.secondary)
}
HStack {
if navigation.agendaDestination == .around {
FooterButtonView("modifier votre recherche") {
displaySearchView = true
}
if federalDataViewModel.areFiltersEnabled() {
Text("ou")
}
}
if federalDataViewModel.areFiltersEnabled() {
FooterButtonView(_filterButtonTitle()) {
presentFilterView = true
}
}
}
.padding(.bottom, 8)
}
}
private func _searchStatus() -> String {
var searchStatus : [String] = []
if navigation.agendaDestination == .around, federalDataViewModel.searchedFederalTournaments.isEmpty == false {
@ -548,7 +465,7 @@ struct ActivityView: View {
.frame(width: 100)
}
} description: {
Text("Aucun événement dans votre agenda.")
Text("Aucun événement en cours ou à venir dans votre agenda.")
} actions: {
RowButtonView("Créer un nouvel événement") {
newTournament = Tournament.newEmptyInstance()
@ -556,12 +473,7 @@ struct ActivityView: View {
RowButtonView("Importer via Tenup") {
navigation.agendaDestination = .tenup
}
SupportButtonView(supportButtonType: .contentIsUnavailable)
FooterButtonView("Vous n'êtes pas un juge-arbitre ou un organisateur de tournoi ? En savoir plus") {
presentOnboarding = true
}
.tint(.logoBackground)
SupportButtonView(contentIsUnavailable: true)
}
}
@ -573,7 +485,6 @@ struct ActivityView: View {
}
}
@ViewBuilder
private func _tenupEmptyView() -> some View {
if dataStore.user.hasTenupClubs() == false {
ContentUnavailableView {
@ -585,10 +496,6 @@ struct ActivityView: View {
presentClubSearchView = true
}
.padding()
FooterButtonView("Cette app est dédié aux juge-arbitres et organisateurs de tournoi. Vous êtes un joueur à la recherche d'un tournoi homologué ? Utilisez notre outil de recherche") {
navigation.agendaDestination = .around
}
.tint(.logoBackground)
}
} else {
ContentUnavailableView {
@ -611,16 +518,13 @@ struct ActivityView: View {
ContentUnavailableView {
Label("Recherche de tournoi", systemImage: "magnifyingglass")
} description: {
Text("Chercher les tournois homologués autour de vous. Padel Club vous facilite même l'inscription !")
Text("Chercher les tournois autour de vous pour mieux décider les tournois à proposer dans votre club. Padel Club vous facilite même l'inscription !")
} actions: {
RowButtonView("Chercher un tournoi") {
RowButtonView("Lancer la recherche") {
displaySearchView = true
}
.padding()
}
.onAppear {
displaySearchView = true
}
} else {
if federalDataViewModel.lastError == nil {
ContentUnavailableView {
@ -657,8 +561,3 @@ struct ActivityView: View {
//#Preview {
// ActivityView()
//}
enum SubScreen: Hashable {
case subscription(FederalTournament, TournamentBuild)
}

@ -95,15 +95,10 @@ struct CalendarView: View {
if federalDataViewModel.isFederalTournamentValidForFilters(tournament, build: build) {
if navigation.agendaDestination == .around {
if #available(iOS 26.0, *) {
NavigationLink(build.buildHolderTitle(.wide), value: SubScreen.subscription(tournament, build as! TournamentBuild))
} else {
NavigationLink(build.buildHolderTitle(.wide)) {
TournamentSubscriptionView(federalTournament: tournament, build: build, user: dataStore.user)
}
NavigationLink(build.buildHolderTitle(.wide)) {
TournamentSubscriptionView(federalTournament: tournament, build: build, user: dataStore.user)
}
} else {
} else {
Button(build.buildHolderTitle(.wide)) {
_createOrShow(federalTournament: tournament, existingTournament: event(forTournament: tournament)?.existingBuild(build), build: build)
}

@ -37,15 +37,7 @@ struct EventListView: View {
if let _tournaments = groupedTournamentsByDate[section]?.sorted(by: sortAscending ? { $0.startDate < $1.startDate } : { $0.startDate > $1.startDate }
) {
Section {
if sectionImporting == sectionIndex {
LabeledContent {
ProgressView()
} label: {
Text("Récupération en cours")
}
} else {
_listView(_tournaments)
}
_listView(_tournaments)
} header: {
HStack {
Text(section.monthYearFormatted)
@ -58,16 +50,21 @@ struct EventListView: View {
if let pcTournaments = _tournaments as? [Tournament] {
_menuOptions(pcTournaments)
} else if let federalTournaments = _tournaments as? [FederalTournament], navigation.agendaDestination == .tenup {
FooterButtonView("Tout récupérer", role: .destructive) {
Task {
sectionImporting = sectionIndex
for federalTournament in federalTournaments {
await _importFederalTournamentBatch(federalTournament: federalTournament)
HStack {
FooterButtonView("Tout récupérer", role: .destructive) {
Task {
sectionImporting = sectionIndex
for federalTournament in federalTournaments {
await _importFederalTournamentBatch(federalTournament: federalTournament)
}
sectionImporting = nil
}
sectionImporting = nil
}
if sectionImporting == sectionIndex {
Spacer()
ProgressView()
}
}
.disabled(sectionImporting == sectionIndex)
}
}
}
@ -161,29 +158,6 @@ struct EventListView: View {
}
Divider()
}
Menu {
Picker("Choix du montant", selection: Binding<Double>(get: {
// If all tournaments share the same price, show it; otherwise default to 0
let prices = Set(pcTournaments.compactMap { $0.entryFee })
return prices.count == 1 ? prices.first ?? 0.0 : 0.0
}, set: { (newValue: Double) in
// Apply the chosen price to every tournament
pcTournaments.forEach { tournament in
tournament.entryFee = newValue
}
dataStore.tournaments.addOrUpdate(contentOfs: pcTournaments)
})) {
ForEach([Double](stride(from: 0.0, through: 50.0, by: 5.0)), id: \.self) { (price: Double) in
Text(price.formatted(.currency(code: Locale.current.currency?.identifier ?? "EUR"))).tag(price as Double)
}
}
} label: {
Text("Montant de l'inscription")
}
Divider()
Menu {
Button {
pcTournaments.forEach { tournament in
@ -207,15 +181,15 @@ struct EventListView: View {
}
Divider()
Menu {
// Button {
// Task {
// await pcTournaments.concurrentForEach { tournament in
// await tournament.refreshTeamList(forced: true)
// }
// }
// } label: {
// Text("M-à-j des inscriptions")
// }
Button {
Task {
await pcTournaments.concurrentForEach { tournament in
await tournament.refreshTeamList(forced: true)
}
}
} label: {
Text("M-à-j des inscriptions")
}
Button {
pcTournaments.forEach { tournament in
@ -376,18 +350,6 @@ struct EventListView: View {
} label: {
Text("Terminer les tournois encore ouverts")
}
#if DEBUG
Button {
Task {
await pcTournaments.concurrentForEach { tournament in
dataStore.deleteTournament(tournament)
}
}
} label: {
Text("(DEBUG) Tout effacer")
}
#endif
} label: {
Text("Options avancées")
}
@ -428,27 +390,27 @@ struct EventListView: View {
private func _tournamentView(_ tournament: Tournament) -> some View {
NavigationLink(value: tournament) {
TournamentCellView(tournament: tournament)
// .onReceive(NotificationCenter.default.publisher(for: NSNotification.Name.CollectionDidLoad), perform: { notification in
//
// if let store = notification.object as? SyncedCollection<TeamRegistration> {
// if store.storeId == tournament.id {
// if tournament.store?.fileCollectionsAllLoaded() == true {
// tournament.lastTeamRefresh = nil
// }
// }
// }
// if let store = notification.object as? SyncedCollection<PlayerRegistration> {
// if store.storeId == tournament.id {
// if tournament.store?.fileCollectionsAllLoaded() == true {
// tournament.lastTeamRefresh = nil
// }
// }
// }
// })
// .id(tournament.lastTeamRefresh)
// .task(priority: .background) {
// await tournament.refreshTeamList(forced: false)
// }
.onReceive(NotificationCenter.default.publisher(for: NSNotification.Name.CollectionDidLoad), perform: { notification in
if let store = notification.object as? SyncedCollection<TeamRegistration> {
if store.storeId == tournament.id {
if tournament.store?.fileCollectionsAllLoaded() == true {
tournament.lastTeamRefresh = nil
}
}
}
if let store = notification.object as? SyncedCollection<PlayerRegistration> {
if store.storeId == tournament.id {
if tournament.store?.fileCollectionsAllLoaded() == true {
tournament.lastTeamRefresh = nil
}
}
}
})
.id(tournament.lastTeamRefresh)
.task(priority: .background) {
await tournament.refreshTeamList(forced: false)
}
}
.listRowView(isActive: tournament.enableOnlineRegistration, color: .green, hideColorVariation: true)
.onChange(of: tournament.isTemplate) {
@ -463,17 +425,25 @@ struct EventListView: View {
Divider()
if tournament.hasEnded() == false {
Button {
navigation.openTournamentInOrganizer(tournament)
} label: {
Label("Afficher dans le gestionnaire", systemImage: "line.diagonal.arrow")
}
Divider()
_options([tournament])
}
}
#if DEBUG
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
if tournament.sharing == nil {
Button(role: .destructive) {
dataStore.deleteTournament(tournament)
} label: {
LabelDelete()
}
Button(role: .destructive) {
dataStore.deleteTournament(tournament)
} label: {
LabelDelete()
}
Button() {
dataStore.deleteTournament(tournament, noSync: true)
@ -537,15 +507,11 @@ struct EventListView: View {
if federalTournament.umpireLabel().isEmpty == false {
newTournament.umpireCustomContact = federalTournament.umpireLabel()
} else {
newTournament.umpireCustomContact = DataStore.shared.user.fullName()
}
if federalTournament.mailLabel().isEmpty == false {
newTournament.umpireCustomMail = federalTournament.mailLabel()
} else {
newTournament.umpireCustomMail = DataStore.shared.user.email
}
newTournament.umpireCustomPhone = DataStore.shared.user.phone
do {
let umpireData = try await NetworkFederalService.shared.getUmpireData(idTournament: federalTournament.id)
if let email = umpireData.email {
@ -568,4 +534,3 @@ struct EventListView: View {
//#Preview {
// EventListView(tournaments: [], viewStyle: .calendar, sortAscending: true)
//}

@ -30,18 +30,6 @@ struct TournamentLookUpView: View {
@State private var confirmSearch: Bool = false
@State private var locationRequested = false
@State private var apiError: StoreError?
@State private var quickOption: QuickDateOption? = nil
enum QuickDateOption: String, Identifiable, Hashable {
case thisMonth
case thisWeek
case nextWeek
case nextMonth
case twoWeeks
case nextThreeMonth
var id: String { self.rawValue }
}
var tournaments: [FederalTournament] {
federalDataViewModel.searchedFederalTournaments
@ -152,28 +140,23 @@ struct TournamentLookUpView: View {
}
.toolbarTitleDisplayMode(.large)
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button("Annuler", systemImage: "xmark", role: .cancel) {
dismiss()
}
}
ToolbarItem(placement: .bottomBar) {
if revealSearchParameters {
Button("Lancer la recherche") {
FooterButtonView("Lancer la recherche") {
if dataStore.appSettings.city.isEmpty {
confirmSearch = true
} else {
runSearch()
}
}
.buttonStyle(.borderedProminent)
.disabled(searching)
} else if searching {
HStack(spacing: 20) {
Spacer()
ProgressView()
if total > 0 {
Text("\(total) tournois en cours de récupération")
let percent = Double(tournaments.count) / Double(total)
Text(percent.formatted(.percent.precision(.significantDigits(1...3))) + " en récupération de Tenup")
.font(.caption)
}
Spacer()
@ -210,12 +193,11 @@ struct TournamentLookUpView: View {
revealSearchParameters = true
federalDataViewModel.searchedFederalTournaments = []
federalDataViewModel.searchAttemptCount = 0
federalDataViewModel.removeFilters()
} label: {
Text("Ré-initialiser la recherche")
}
} label: {
LabelOptions()
Label("Options", systemImage: "ellipsis.circle")
}
}
}
@ -237,50 +219,28 @@ struct TournamentLookUpView: View {
}
private func _gatherNumbers() {
searching = true
Task {
print("Doing.....")
let tournamentsToFetch = tournaments.enumerated().filter { (idx, tournament) in
tournament.japPhoneNumber == nil || tournament.japPhoneNumber?.isEmpty == true
}
let idIndexPairs: [(Int, String)] = tournamentsToFetch.map { ($0.offset, $0.element.id) }
let tournamentIDs: [String] = idIndexPairs.map { $0.1 }
guard !tournamentIDs.isEmpty else {
print("All numbers already gathered.")
return
}
// Split into batches of 100
let batchSize = 100
let batches = idIndexPairs.chunked(into: batchSize)
print("Processing \(idIndexPairs.count) tournaments in \(batches.count) batches of \(batchSize)")
// Process each batch sequentially
for (batchIndex, batch) in batches.enumerated() {
print("Starting batch \(batchIndex + 1) of \(batches.count) (\(batch.count) tournaments)")
await withTaskGroup(of: (Int, String?).self) { group in
for (index, tournamentID) in batch {
group.addTask {
print("Starting task for tournament \(index) / \(self.tournaments.count)")
let phone = try? await NetworkFederalService.shared.getUmpireData(idTournament: tournamentID).phone
return (index, phone) // Return the index along with the phone number
}
}
await withTaskGroup(of: (Int, String?).self) { group in
for i in 0..<tournaments.count {
let tournamentID = tournaments[i].id
let index = i // Capture index for use in the child task
// Process results as they complete
for await (index, phone) in group {
var tournamentData = federalDataViewModel.searchedFederalTournaments[index] // Get a mutable copy
tournamentData.updateJapPhoneNumber(phone: phone) // Mutate the copy
federalDataViewModel.searchedFederalTournaments[index] = tournamentData // Assign back
group.addTask {
print("Starting task for tournament \(index) / \(self.tournaments.count)")
let phone = try? await NetworkFederalService.shared.getUmpireData(idTournament: tournamentID).phone
return (index, phone) // Return the index along with the phone number
}
}
print("Completed batch \(batchIndex + 1) of \(batches.count)")
// Process results as they complete
for await (index, phone) in group {
var tournamentData = federalDataViewModel.searchedFederalTournaments[index] // Get a mutable copy
tournamentData.updateJapPhoneNumber(phone: phone) // Mutate the copy
federalDataViewModel.searchedFederalTournaments[index] = tournamentData // Assign back
}
}
searching = false
print(".....Done")
}
}
@ -360,7 +320,7 @@ struct TournamentLookUpView: View {
print("count", count, total, tournaments.count, page)
total = count
if total - tournaments.count > count / 50 && page < total / 30 {
if tournaments.count < count && page < total / 30 {
if total < 200 || requestedToGetAllPages {
page += 1
await getNewPage()
@ -380,54 +340,8 @@ struct TournamentLookUpView: View {
var searchParametersView: some View {
@Bindable var appSettings = dataStore.appSettings
Section {
Picker(selection: $quickOption) {
Text("Libre").tag(nil as QuickDateOption?)
Text("Cette semaine").tag(QuickDateOption.thisWeek as QuickDateOption?)
Text("2 prochaines semaines").tag(QuickDateOption.twoWeeks as QuickDateOption?)
Text("La semaine prochaine").tag(QuickDateOption.nextWeek as QuickDateOption?)
Text("Ce mois-ci").tag(QuickDateOption.thisMonth as QuickDateOption?)
Text("2 prochains mois").tag(QuickDateOption.nextMonth as QuickDateOption?)
Text("3 prochains mois").tag(QuickDateOption.nextThreeMonth as QuickDateOption?)
} label: {
Text("Choix de dates")
}
.pickerStyle(.menu)
.onChange(of: quickOption) { oldValue, newValue in
switch newValue {
case nil:
break
case .twoWeeks:
appSettings.startDate = Date().startOfDay
appSettings.endDate = Date().endOfWeek.addingTimeInterval(14 * 24 * 60 * 60)
case .nextWeek:
appSettings.startDate = Date().endOfWeek.nextDay.startOfDay
appSettings.endDate = Date().endOfWeek.addingTimeInterval(7 * 24 * 60 * 60)
case .thisMonth:
appSettings.startDate = Date().startOfDay
appSettings.endDate = Date().endOfMonth.endOfDay()
case .thisWeek:
appSettings.startDate = Date().startOfDay
appSettings.endDate = Date().endOfWeek
case .nextMonth:
appSettings.startDate = Date().startOfDay
appSettings.endDate = Date().endOfMonth.nextDay.endOfMonth
case .nextThreeMonth:
appSettings.startDate = Date().startOfDay
appSettings.endDate = Date().endOfMonth.nextDay.endOfMonth.nextDay.endOfMonth
}
}
DatePicker(selection: $appSettings.startDate, displayedComponents: .date) {
Text("Début")
.onTapGesture(count: 2) {
appSettings.startDate = appSettings.startDate.startOfCurrentMonth
}
}
DatePicker(selection: $appSettings.endDate, displayedComponents: .date) {
Text("Fin")
.onTapGesture(count: 2) {
appSettings.endDate = appSettings.endDate.nextDay.endOfMonth
}
}
DatePicker("Début", selection: $appSettings.startDate, displayedComponents: .date)
DatePicker("Fin", selection: $appSettings.endDate, displayedComponents: .date)
Picker(selection: $appSettings.dayDuration) {
Text("Aucune").tag(nil as Int?)
Text(1.formatted()).tag(1 as Int?)
@ -437,9 +351,6 @@ struct TournamentLookUpView: View {
Text("Durée souhaitée (en jours)")
}
@Bindable var federalDataViewModel = federalDataViewModel
WeekdayselectionView(weekdays: $federalDataViewModel.weekdays)
Picker(selection: $appSettings.dayPeriod) {
ForEach(DayPeriod.allCases) {
Text($0.localizedDayPeriodLabel().capitalized).tag($0)
@ -481,12 +392,12 @@ struct TournamentLookUpView: View {
}
.symbolVariant(.fill)
.foregroundColor (Color.white)
.cornerRadius (20)
.font(.system(size: 12))
}
}
Picker(selection: $appSettings.distance) {
Text(distanceLimit(distance:15).formatted()).tag(15.0)
Text(distanceLimit(distance:30).formatted()).tag(30.0)
Text(distanceLimit(distance:50).formatted()).tag(50.0)
Text(distanceLimit(distance:60).formatted()).tag(60.0)

@ -22,7 +22,6 @@ struct TournamentSubscriptionView: View {
@State private var didSendMessage: Bool = false
@State private var didSaveInCalendar: Bool = false
@State private var phoneNumber: String? = nil
@State private var errorWhenGatheringPhone: Bool = false
init(federalTournament: FederalTournament, build: any TournamentBuildHolder, user: CustomUser) {
self.federalTournament = federalTournament
@ -112,13 +111,9 @@ struct TournamentSubscriptionView: View {
Text(federalTournament.phoneLabel())
}
LabeledContent("Téléphone JAP") {
if let phoneNumber {
if let phoneNumber {
LabeledContent("Téléphone JAP") {
Text(phoneNumber)
} else if errorWhenGatheringPhone == false {
ProgressView()
} else {
Image(systemName: "exclamationmark.triangle")
}
}
} header: {
@ -168,15 +163,8 @@ struct TournamentSubscriptionView: View {
CopyPasteButtonView(pasteValue: messageBody)
}
}
.ifAvailableiOS26 { view in
view.toolbar(.hidden, for: .tabBar)
}
.task {
do {
self.phoneNumber = try await NetworkFederalService.shared.getUmpireData(idTournament: federalTournament.id).phone
} catch {
self.errorWhenGatheringPhone = true
}
self.phoneNumber = try? await NetworkFederalService.shared.getUmpireData(idTournament: federalTournament.id).phone
}
.toolbarBackground(.visible, for: .bottomBar)
.toolbarBackground(.visible, for: .navigationBar)
@ -188,61 +176,51 @@ struct TournamentSubscriptionView: View {
}
}
.toolbar(content: {
if #available(iOS 26.0, *) {
ToolbarSpacer(placement: .bottomBar)
}
ToolbarItem(placement: .bottomBar) {
ToolbarItem(placement: .status) {
Menu {
Menu {
if let courrielEngagement = federalTournament.courrielEngagement {
Button("Email", systemImage: "envelope") {
if let courrielEngagement = federalTournament.courrielEngagement {
Section {
RowButtonView("S'inscrire par email", systemImage: "envelope") {
contactType = .mail(date: nil, recipients: [courrielEngagement], bccRecipients: nil, body: messageBody, subject: messageSubject, tournamentBuild: build as? TournamentBuild)
}
}
}
if let telephone = phoneNumber {
if telephone.isMobileNumber() {
Button("Message", systemImage: "message") {
if let telephone = phoneNumber {
if telephone.isMobileNumber() {
Section {
RowButtonView("S'inscrire par message", systemImage: "message") {
contactType = .message(date: nil, recipients: [telephone], body: messageBodyShort, tournamentBuild: build as? TournamentBuild)
}
}
let number = telephone.replacingOccurrences(of: " ", with: "")
if let url = URL(string: "tel:\(number)") {
Link(destination: url) {
Label("Appeler le JAP", systemImage: "phone")
}
}
let number = telephone.replacingOccurrences(of: " ", with: "")
if let url = URL(string: "tel:\(number)") {
Link(destination: url) {
Label("Appeler le JAP", systemImage: "phone")
}
}
} label: {
Label("Inscription", systemImage: "pencil.and.list.clipboard")
}
Menu {
if let installation = federalTournament.installation, let telephone = installation.telephone {
Button("Email", systemImage: "envelope") {
if let installation = federalTournament.installation, let telephone = installation.telephone {
Section {
RowButtonView("Contacter le club", systemImage: "house.and.flag") {
contactType = .message(date: nil, recipients: [telephone], body: messageBodyShort, tournamentBuild: build as? TournamentBuild)
}
let number = telephone.replacingOccurrences(of: " ", with: "")
if let url = URL(string: "tel:\(number)") {
Link(destination: url) {
Label("Appeler", systemImage: "phone")
}
}
let number = telephone.replacingOccurrences(of: " ", with: "")
if let url = URL(string: "tel:\(number)") {
Link(destination: url) {
Label("Appeler le club", systemImage: "phone")
}
}
} label: {
Label("Contacter le club", systemImage: "house.and.flag")
}
} label: {
Text("S'inscrire")
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
Text("Contact et inscription")
}
.menuStyle(.button)
.buttonStyle(.borderedProminent)
}
if #available(iOS 26.0, *) {
ToolbarSpacer(placement: .bottomBar)
.offset(y:-2)
}
ToolbarItem(placement: .topBarTrailing) {

@ -1,36 +0,0 @@
//
// WeekdayselectionView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 24/09/2025.
//
import SwiftUI
import PadelClubData
import LeStorage
struct WeekdayselectionView: View {
@Binding var weekdays: Set<Int>
var body: some View {
NavigationLink {
List((1...7), selection: $weekdays) { type in
Text(Date.weekdays[type - 1]).tag(type as Int)
}
.navigationTitle("Jour de la semaine")
.environment(\.editMode, Binding.constant(EditMode.active))
} label: {
HStack {
Text("Jour de la semaine")
Spacer()
if weekdays.isEmpty || weekdays.count == 7 {
Text("N'importe")
.foregroundStyle(.secondary)
} else {
Text(weekdays.sorted().map({ Date.weekdays[$0 - 1] }).joined(separator: ", "))
.foregroundStyle(.secondary)
}
}
}
}
}

@ -17,15 +17,8 @@ struct MainView: View {
@Environment(NavigationViewModel.self) private var navigation: NavigationViewModel
@Environment(ImportObserver.self) private var importObserver: ImportObserver
@State private var federalDataViewModel: FederalDataViewModel = FederalDataViewModel.shared
@State private var mainViewId: UUID = UUID()
@State private var presentOnboarding: Bool = false
@State private var canPresentOnboarding: Bool = false
@State private var presentFilterView: Bool = false
@State private var displaySearchView: Bool = false
@AppStorage("didSeeOnboarding") private var didSeeOnboarding: Bool = false
var lastDataSource: String? {
dataStore.appSettings.lastDataSource
@ -80,52 +73,23 @@ struct MainView: View {
}
.toolbarBackground(.visible, for: .tabBar)
TournamentOrganizerView()
.tabItem(for: .tournamentOrganizer)
.toolbarBackground(.visible, for: .tabBar)
OngoingContainerView()
.tabItem(for: .ongoing)
.badge(self.dataStore.runningMatches().count)
.toolbarBackground(.visible, for: .tabBar)
UmpireOptionsView()
.tabItem(for: .umpire)
.toolbarBackground(.visible, for: .tabBar)
// TournamentOrganizerView()
// .tabItem(for: .tournamentOrganizer)
// .toolbarBackground(.visible, for: .tabBar)
ToolboxView()
.tabItem(for: .toolbox)
.toolbarBackground(.visible, for: .tabBar)
MyAccountView()
.tabItem(for: .myAccount)
.toolbarBackground(.visible, for: .tabBar)
UmpireView()
.tabItem(for: .umpire)
.badge(badgeText)
.toolbarBackground(.visible, for: .tabBar)
// PadelClubView()
// .tabItem(for: .padelClub)
}
.applyTabViewBottomAccessory(isVisible: (navigation.selectedTab == .activity || navigation.selectedTab == nil) && _shouldDisplaySearchStatus(), content: {
_searchBoxView()
})
.sheet(isPresented: $presentFilterView) {
TournamentFilterView(federalDataViewModel: federalDataViewModel)
.environment(navigation)
.tint(.master)
}
.sheet(isPresented: $displaySearchView) {
NavigationStack {
TournamentLookUpView()
.environment(federalDataViewModel)
.environment(navigation)
}
}
.onAppear {
if canPresentOnboarding || StoreCenter.main.userId != nil {
if didSeeOnboarding == false {
presentOnboarding = true
}
}
}
.sheet(isPresented: $presentOnboarding, content: {
OnboardingView()
.environmentObject(dataStore)
})
.id(mainViewId)
.onChange(of: dataStore.user.id) {
print("dataStore.user.id = ", dataStore.user.id)
@ -134,8 +98,6 @@ struct MainView: View {
navigation.path.removeLast(navigation.path.count)
mainViewId = UUID()
}
canPresentOnboarding = true
}
.environmentObject(dataStore)
.task {
@ -285,85 +247,8 @@ struct MainView: View {
}
}
}
private func _searchStatus() -> String {
var searchStatus : [String] = []
if navigation.agendaDestination == .around, federalDataViewModel.searchedFederalTournaments.isEmpty == false {
let filteredSearchedFederalTournaments = federalDataViewModel.filteredSearchedFederalTournaments
let status : String = filteredSearchedFederalTournaments.count.formatted() + " tournoi" + filteredSearchedFederalTournaments.count.pluralSuffix
searchStatus.append(status)
}
if federalDataViewModel.areFiltersEnabled() {
searchStatus.append(federalDataViewModel.filterStatus())
}
return searchStatus.joined(separator: " ")
}
private func _shouldDisplaySearchStatus() -> Bool {
guard navigation.path.count == 0 else { return false }
return federalDataViewModel.areFiltersEnabled() || (navigation.agendaDestination == .around && federalDataViewModel.searchedFederalTournaments.isEmpty == false)
}
private func _searchBoxView() -> some View {
VStack(spacing: 0) {
let searchStatus = _searchStatus()
if searchStatus.isEmpty == false {
Text(_searchStatus())
.font(.footnote)
.foregroundStyle(.secondary)
}
HStack {
if navigation.agendaDestination == .around {
FooterButtonView("modifier votre recherche") {
displaySearchView = true
}
if federalDataViewModel.areFiltersEnabled() {
Text("ou")
}
}
if federalDataViewModel.areFiltersEnabled() {
FooterButtonView(_filterButtonTitle()) {
presentFilterView = true
}
}
}
}
}
private func _filterButtonTitle() -> String {
var prefix = "modifier "
if navigation.agendaDestination == .around, federalDataViewModel.searchedFederalTournaments.isEmpty == false {
prefix = ""
}
return prefix + "vos filtres"
}
}
//#Preview {
// MainView()
//}
fileprivate extension View {
@ViewBuilder
func applyTabViewBottomAccessory<Content: View>(isVisible: Bool,
@ViewBuilder content: () -> Content
) -> some View {
if #available(iOS 26.0, *), isVisible {
self.tabViewBottomAccessory {
content()
}
} else {
self
}
}
}

@ -1,226 +0,0 @@
//
// MyAccountView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 01/03/2024.
//
import SwiftUI
import CoreLocation
import LeStorage
import StoreKit
import PadelClubData
struct MyAccountView: View {
@Environment(NavigationViewModel.self) private var navigation: NavigationViewModel
@EnvironmentObject var dataStore: DataStore
@State private var showSubscriptions: Bool = false
@State private var showProductIds: Bool = false
@FocusState private var focusedField: CustomUser.CodingKeys?
// @State var isConnected: Bool = false
enum AccountScreen {
case login
}
var body: some View {
@Bindable var navigation = navigation
NavigationStack(path: $navigation.accountPath) {
List {
Section {
SupportButtonView(supportButtonType: .bugReport, showIcon: true)
}
PurchaseListView()
Section {
Button {
self.showSubscriptions = true
} label: {
Label("Les offres", systemImage: "bookmark.fill")
}.simultaneousGesture(
LongPressGesture()
.onEnded { _ in
self.showProductIds = true
}
)
.highPriorityGesture(
TapGesture()
.onEnded { _ in
self.showSubscriptions = true
}
)
}
if StoreCenter.main.isAuthenticated {
NavigationLink {
AccountView(user: dataStore.user) { }
} label: {
AccountRowView(userName: dataStore.user.username)
}
} else {
NavigationLink(value: AccountScreen.login) {
AccountRowView(userName: dataStore.user.username)
}
}
if StoreCenter.main.isAuthenticated {
let onlineRegPaymentMode = dataStore.user.registrationPaymentMode
Section {
LabeledContent {
switch onlineRegPaymentMode {
case .corporate:
Text("Activé")
.bold()
.foregroundStyle(.green)
case .disabled:
Text("Désactivé")
.bold()
case .noFee:
Text("Activé")
.bold()
.foregroundStyle(.green)
case .stripe:
Text("Activé")
.bold()
.foregroundStyle(.green)
}
} label: {
Text("Option 'Paiement en ligne'")
if onlineRegPaymentMode == .corporate {
Text("Mode Padel Club")
.foregroundStyle(.secondary)
} else if onlineRegPaymentMode == .noFee {
Text("Commission Stripe")
.foregroundStyle(.secondary)
} else if onlineRegPaymentMode == .stripe {
Text("Commission Stripe et Padel Club")
.foregroundStyle(.secondary)
}
}
} footer: {
if onlineRegPaymentMode == .disabled {
FooterButtonView("Contactez nous pour activer cette option.") {
let emailTo: String = "support@padelclub.app"
let subject: String = "Activer l'option de paiment en ligne : \(dataStore.user.email)"
if let url = URL(string: "mailto:\(emailTo)?subject=\(subject)"), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
.font(.callout)
.multilineTextAlignment(.leading)
} else {
Text("Permet de proposer le paiement de vos tournois en ligne.")
}
}
Section {
SupportButtonView(supportButtonType: .sharingRequest)
} header: {
Text("Partage et délégation de compte")
} footer: {
Text("Vous souhaitez partager la supervision d'un tournoi à un autre compte ? Vous avez plusieurs juge-arbitres dans votre club ?")
}
}
Section {
Link(destination: URLs.appReview.url) {
Text("Partagez vos impressions !")
}
Link(destination: URLs.instagram.url) {
Text("Compte Instagram PadelClub.app")
}
Link(destination: URLs.appDescription.url) {
Text("Page de présentation de Padel Club")
}
}
Section {
Link(destination: URLs.privacy.url) {
Text("Politique de confidentialité")
}
Link(destination: URLs.eula.url) {
Text("Contrat d'utilisation")
}
}
}
.sheet(isPresented: self.$showSubscriptions, content: {
NavigationStack {
SubscriptionView(isPresented: self.$showSubscriptions)
.environment(\.colorScheme, .light)
}
})
.sheet(isPresented: self.$showProductIds, content: {
ProductIdsView()
})
.navigationDestination(for: AccountScreen.self) { screen in
switch screen {
case .login:
LoginView {_ in }
}
}
.navigationTitle("Mon compte")
}
}
}
struct AccountRowView: View {
@EnvironmentObject var dataStore: DataStore
var userName: String
var body: some View {
let isAuthenticated = StoreCenter.main.isAuthenticated
LabeledContent {
if isAuthenticated {
Text(self.userName)
} else if StoreCenter.main.userName != nil {
Image(systemName: "xmark.circle.fill")
.foregroundStyle(.logoRed)
}
} label: {
Label("Mon compte", systemImage: "person.fill")
if isAuthenticated && dataStore.user.email.isEmpty == false {
Text(dataStore.user.email)
}
}
}
}
struct ProductIdsView: View {
@State var transactions: [StoreKit.Transaction] = []
var body: some View {
VStack {
List {
LabeledContent("count", value: String(self.transactions.count))
ForEach(self.transactions) { transaction in
if #available(iOS 17.2, *) {
if let offer = transaction.offer {
LabeledContent(transaction.productID, value: "\(offer.type)")
} else {
LabeledContent(transaction.productID, value: "no offer")
}
} else {
Text("need ios 17.2")
}
}
}.onAppear {
Task {
self.transactions = Array(Guard.main.purchasedTransactions)
}
}
}
}
}

@ -1,239 +0,0 @@
import SwiftUI
struct OnboardingView: View {
@Environment(NavigationViewModel.self) private var navigation: NavigationViewModel
@State private var selection = 0
@Environment(\.openURL) var openURL
@Environment(\.dismiss) private var dismiss
@AppStorage("didSeeOnboarding") private var didSeeOnboarding: Bool = false
var steps: [OnboardingStep] {
[
// Écran 1 Bienvenue
.single(
title: "Bienvenue sur Padel Club",
description: "L’outil idéal des juges-arbitres et organisateurs pour gérer leurs tournois de A à Z.",
image: .padelClubLogoFondclairTransparent,
imageSystem: nil,
buttonTitle: "Suivant",
action: { selection += 1 }
),
// Écran 2 Juges arbitres
.single(
title: "Pour les Juges-Arbitres",
description: "Planification, convocations, tirages, résultats… Tout ce qu’il faut pour organiser un tournoi de padel.",
image: nil,
imageSystem: "calendar.badge.clock",
buttonTitle: "Suivant",
action: { selection += 1 }
),
// Écran 3 Joueurs (Multi boutons)
.multi(
title: "Vous êtes joueur ?",
description: "Cette app a été pensée faite pour les organisateurs.\nPour suivre vos tournois et convocations, rendez-vous sur https://padelclub.app",
image: nil,
imageSystem: "person.fill.questionmark",
tools: [
("Aller sur le site joueur", {
if let url = URL(string: "https://padelclub.app") {
openURL(url)
}
})
],
finalButtonTitle: "Continuer",
finalAction: {
selection += 1
}
),
// Écran 4 Outils utiles aux joueurs
.multi(
title: "Quelques outils utiles",
description: "Même si pensée pour les organisateurs, vous trouverez aussi quelques fonctions pratiques en tant que joueur.",
image: nil,
imageSystem: "wrench.and.screwdriver",
tools: [
("Chercher un tournoi Ten'Up", {
dismiss()
navigation.agendaDestination = .around
}),
("Accès au classement mensuel", {
dismiss()
navigation.selectedTab = .toolbox
}),
("Calculateur de points", {
dismiss()
navigation.selectedTab = .toolbox
}),
("Consulter les règles du jeu", {
dismiss()
navigation.selectedTab = .toolbox
}),
("Créer vos animations amicales", {
dismiss()
navigation.agendaDestination = .activity
})
],
finalButtonTitle: "J'ai compris",
finalAction: {
UserDefaults.standard.set(true, forKey: "didSeeOnboarding")
dismiss()
}
)
]
}
var body: some View {
NavigationStack {
TabView(selection: $selection) {
ForEach(Array(steps.enumerated()), id: \.offset) { index, step in
switch step {
case let .single(title, description, image, imageSystem, buttonTitle, action):
OnboardingPage(
title: title,
description: description,
image: image,
imageSystem: imageSystem,
buttonTitle: buttonTitle,
action: action
)
.tag(index)
case let .multi(title, description, image, imageSystem, tools, finalButtonTitle, finalAction):
OnboardingMultiButtonPage(
title: title,
description: description,
image: image,
imageSystem: imageSystem,
tools: tools,
finalButtonTitle: finalButtonTitle,
finalAction: finalAction
)
.tag(index)
}
}
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
.indexViewStyle(.page(backgroundDisplayMode: .always)) // <- ensures background
.tint(.black) // <- sets the indicator color
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button {
didSeeOnboarding = true
dismiss()
} label: {
Text("Plus tard")
}
}
}
}
.tint(.master)
}
}
// MARK: - Enum de configuration
enum OnboardingStep {
case single(title: String, description: String, image: ImageResource?, imageSystem: String?, buttonTitle: String, action: () -> Void)
case multi(title: String, description: String, image: ImageResource?, imageSystem: String?, tools: [(String, () -> Void)], finalButtonTitle: String?, finalAction: () -> Void)
}
// MARK: - Vue de base commune
struct OnboardingBasePage<Content: View>: View {
var title: String
var description: String
var image: ImageResource?
var imageSystem: String?
@ViewBuilder var content: () -> Content
var body: some View {
VStack(spacing: 20) {
Spacer()
if let imageSystem {
Image(systemName: imageSystem)
.resizable()
.scaledToFit()
.frame(width: 100, height: 100)
} else if let image {
Image(image)
.resizable()
.scaledToFit()
.frame(width: 100, height: 100)
}
Text(title)
.font(.title)
.fontWeight(.bold)
.multilineTextAlignment(.center)
Text(description)
.font(.body)
.multilineTextAlignment(.center)
.padding(.horizontal, 30)
.lineLimit(nil)
.fixedSize(horizontal: false, vertical: true)
Spacer()
content()
Spacer(minLength: 40)
}
}
}
// MARK: - Page avec un bouton
struct OnboardingPage: View {
var title: String
var description: String
var image: ImageResource?
var imageSystem: String?
var buttonTitle: String
var action: () -> Void
var body: some View {
OnboardingBasePage(title: title, description: description, image: image, imageSystem: imageSystem) {
RowButtonView(buttonTitle) {
action()
}
.padding()
}
}
}
// MARK: - Page avec plusieurs boutons
struct OnboardingMultiButtonPage: View {
var title: String
var description: String
var image: ImageResource?
var imageSystem: String?
var tools: [(String, () -> Void)]
var finalButtonTitle: String?
var finalAction: () -> Void
var body: some View {
OnboardingBasePage(title: title, description: description, image: image, imageSystem: imageSystem) {
VStack(spacing: 12) {
ForEach(Array(tools.enumerated()), id: \.offset) { _, tool in
FooterButtonView(tool.0) {
tool.1()
}
.tint(.master)
}
}
if let finalButtonTitle = finalButtonTitle {
RowButtonView(finalButtonTitle) {
finalAction()
}
.padding()
}
}
}
}
#Preview {
OnboardingView()
}

@ -16,11 +16,6 @@ class OngoingViewModel {
var destination: OngoingDestination? = .running
var hideUnconfirmedMatches: Bool = false
var hideNotReadyMatches: Bool = false
var selectedTournaments: Set<String> = Set()
func tournaments() -> [Tournament] {
Set(DataStore.shared.runningAndNextMatches().compactMap({ $0.currentTournament() })).sorted(by: \.startDate)
}
func areFiltersEnabled() -> Bool {
hideUnconfirmedMatches || hideNotReadyMatches
@ -29,7 +24,7 @@ class OngoingViewModel {
let defaultSorting : [MySortDescriptor<Match>] = [.keyPath(\Match.startDate!), .keyPath(\Match.index), .keyPath(\Match.courtIndexForSorting)]
var runningAndNextMatches: [Match] {
DataStore.shared.runningAndNextMatches(selectedTournaments).sorted(using: defaultSorting, order: .ascending)
DataStore.shared.runningAndNextMatches().sorted(using: defaultSorting, order: .ascending)
}
var filteredRunningAndNextMatches: [Match] {
@ -62,36 +57,32 @@ struct OngoingContainerView: View {
.toolbarBackground(.visible, for: .navigationBar)
.navigationTitle("Programmation")
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Menu {
NavigationLink {
List(selection: $ongoingViewModel.selectedTournaments) {
ForEach(ongoingViewModel.tournaments()) { tournament in
TournamentCellView(tournament: tournament)
.tag(tournament.id)
}
}
.onChange(of: ongoingViewModel.selectedTournaments, { oldValue, newValue in
DataStore.shared.resetOngoingCache()
})
.environment(\.editMode, Binding.constant(EditMode.active))
.navigationTitle("Tournois à masquer")
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
} label: {
Label("Masquer des tournois", systemImage: "circle.grid.2x2.topleft.checkmark.filled")
}
if ongoingViewModel.destination == .followUp {
Divider()
if ongoingViewModel.destination == .followUp {
ToolbarItem(placement: .topBarLeading) {
Menu {
Toggle(isOn: $ongoingViewModel.hideUnconfirmedMatches) {
Text("Masquer non confirmés")
Text("masquer non confirmés")
}
Toggle(isOn: $ongoingViewModel.hideNotReadyMatches) {
Text("Masquer incomplets")
Text("masquer incomplets")
}
} label: {
Image(systemName: "line.3.horizontal.decrease.circle")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
.symbolVariant(ongoingViewModel.areFiltersEnabled() ? .fill : .none)
}
}
ToolbarItem(placement: .topBarTrailing) {
Button {
showMatchPicker = true
} label: {
Image(systemName: "line.3.horizontal.decrease")
Image(systemName: "rectangle.stack.badge.plus")
.resizable()
.scaledToFit()
.frame(minHeight: 32)
}
}
}

@ -31,7 +31,7 @@ struct TournamentOrganizerView: View {
.toolbarBackground(.visible, for: .navigationBar)
}
}
let tournaments = dataStore.tournaments.filter({ $0.hasEnded() == false && $0.isDeleted == false && $0.isCanceled == false && $0.sharing != .granted }).sorted(by: \.startDate).reversed()
let tournaments = dataStore.tournaments.filter({ $0.hasEnded() == false && $0.isDeleted == false && $0.isCanceled == false }).sorted(by: \.startDate).reversed()
if tournaments.isEmpty == false {
Divider()
HStack {

@ -12,27 +12,20 @@ import PadelClubData
struct APICallsListView: View {
@State var descriptors: [CollectionDescriptor] = []
@State var total = 0
var body: some View {
List {
Section {
LabeledContent("Total count", value: "\(total)")
}
ForEach(self.descriptors) { descriptor in
Section {
ForEach(self.descriptors) { descriptor in
NavigationLink {
if let syncedType = descriptor.type as? any SyncedStorable.Type {
APICallsView(name: descriptor.name, type: syncedType)
}
} label: {
LabeledContent(descriptor.name, value: descriptor.count.string)
NavigationLink {
if let syncedType = descriptor.type as? any SyncedStorable.Type {
APICallsView(name: descriptor.name, type: syncedType)
}
} label: {
LabeledContent(descriptor.name, value: descriptor.count.string)
}
}
}.onAppear {
self.load()
@ -56,8 +49,6 @@ struct APICallsListView: View {
func loadCount<T: SyncedStorable>(_ type: T.Type, _ descriptor: CollectionDescriptor) async {
let calls = await StoreCenter.main.apiCalls(type: type)
descriptor.count = calls.count
self.total = total + descriptor.count
// Logger.log("\(descriptor.name), count = \(calls.count)")
}

@ -10,10 +10,6 @@ import LeStorage
import PadelClubData
struct DebugSettingsView: View {
@State private var errorMessage: String?
@State private var showingError = false
@State private var isSynchronizing = false
var body: some View {
List {
@ -21,23 +17,7 @@ struct DebugSettingsView: View {
LabeledContent("Has Websocket Manager", value: self._hasWebSocketManager)
LabeledContent("Websocket ping", value: self._wsPingStatus)
LabeledContent("Websocket failure", value: self._wsFailure)
if let error = self._wsError {
LabeledContent("Websocket error", value: error)
LabeledContent("Reconnect attempts", value: StoreCenter.main.websocketReconnectAttempts.formatted())
}
LabeledContent("Last synced object date", value: self._lastSyncDate)
if isSynchronizing {
HStack {
ProgressView()
.scaleEffect(0.8)
Text("Synchronizing...")
.foregroundColor(.secondary)
}
} else {
Button("Synchronize") {
self._synchronize()
}
}
LabeledContent("Last sync date", value: self._lastSyncDate)
}
Section("Settings") {
@ -60,11 +40,6 @@ struct DebugSettingsView: View {
}
}
.alert("Synchronization Error", isPresented: $showingError) {
Button("OK") { }
} message: {
Text(errorMessage ?? "An unknown error occurred")
}
}
fileprivate var _userId: String {
@ -98,39 +73,12 @@ struct DebugSettingsView: View {
fileprivate var _wsFailure: String {
return "\(StoreCenter.main.websocketFailure)"
}
fileprivate var _wsError: String? {
if let error = StoreCenter.main.websocketError {
return error.localizedDescription
}
return nil
}
fileprivate var _hasWebSocketManager: String {
return "\(StoreCenter.main.hasWebSocketManager)"
}
fileprivate var _lastSyncDate: String {
return "\(StoreCenter.main.lastSyncDate)"
}
fileprivate func _synchronize() {
Logger.log("launch sync...")
Task {
await MainActor.run {
isSynchronizing = true
}
let error = await StoreCenter.main.synchronizeLastUpdates()
if let error {
await MainActor.run {
errorMessage = error.localizedDescription
showingError = true
}
}
await MainActor.run {
isSynchronizing = false
}
}
}
}
struct DebugPurchaseView: View {

@ -21,7 +21,6 @@ struct ToolboxView: View {
@State private var tapCount = 0
@State private var lastTapTime: Date? = nil
private let tapTimeThreshold: TimeInterval = 1.0
@State private var displaySearchPlayer: Bool = false
var lastDataSource: String? {
dataStore.appSettings.lastDataSource
@ -40,6 +39,43 @@ struct ToolboxView: View {
@Bindable var navigation = navigation
NavigationStack(path: $navigation.toolboxPath) {
List {
Section {
Link(destination: URLs.main.url) {
Text("Accéder à padelclub.app")
}
.contextMenu {
ShareLink(item: URLs.main.url)
}
SupportButtonView(contentIsUnavailable: false)
Link(destination: URLs.appReview.url) {
Text("Partagez vos impressions !")
}
Link(destination: URLs.instagram.url) {
Text("Compte Instagram PadelClub.app")
}
}
if self.showDebugViews {
DebugView()
}
Section {
NavigationLink {
SelectablePlayerListView(isPresented: false, lastDataSource: true)
} label: {
Label("Rechercher un joueur", systemImage: "person.fill.viewfinder")
}
NavigationLink {
RankCalculatorView()
} label: {
Label("Calculateur de points", systemImage: "scalemass")
}
}
Section {
NavigationLink {
PadelClubView()
@ -49,7 +85,8 @@ struct ToolboxView: View {
Image(systemName: "checkmark.circle.fill")
.foregroundStyle(.green)
} label: {
Label(_lastDataSourceDate.monthYearFormatted, systemImage: "calendar.badge.checkmark")
Text(_lastDataSourceDate.monthYearFormatted)
Text("Classement mensuel utilisé")
}
} else {
LabeledContent {
@ -57,50 +94,14 @@ struct ToolboxView: View {
.tint(.logoRed)
} label: {
if let _mostRecentDateAvailable {
Label(_mostRecentDateAvailable.monthYearFormatted, systemImage: "calendar.badge")
Text(_mostRecentDateAvailable.monthYearFormatted)
} else {
Label("Aucun", systemImage: "calendar.badge.exclamationmark")
Text("Aucun")
}
Text("Classement mensuel disponible")
}
}
}
} header: {
Text("Classement mensuel utilisé")
}
Section {
Button {
displaySearchPlayer = true
} label: {
Label("Rechercher un joueur", systemImage: "person.fill.viewfinder")
}
NavigationLink {
RankCalculatorView()
} label: {
Label("Calculateur de points", systemImage: "scalemass")
}
NavigationLink {
MatchFormatGuideView()
} label: {
Label("Formats et limites", systemImage: "clock")
}
}
Section {
Link(destination: URLs.main.url) {
Label("Padel Club sur le Web", systemImage: "link")
}
.contextMenu {
ShareLink(item: URLs.main.url)
}
ShareLink(item: URLs.appStore.url) {
Label("Padel Club sur l'App Store", systemImage: "square.and.arrow.up")
}
}
Section {
@ -117,8 +118,19 @@ struct ToolboxView: View {
}
}
if self.showDebugViews {
DebugView()
Section {
Link(destination: URLs.appDescription.url) {
Text("Page de présentation de Padel Club")
}
}
Section {
Link(destination: URLs.privacy.url) {
Text("Politique de confidentialité")
}
Link(destination: URLs.eula.url) {
Text("Contrat d'utilisation")
}
}
Section {
@ -128,19 +140,6 @@ struct ToolboxView: View {
}
}
}
.fullScreenCover(isPresented: $displaySearchPlayer, content: {
NavigationStack {
SelectablePlayerListView(isPresented: false, lastDataSource: true)
.toolbar(.hidden, for: .tabBar)
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button("Fermer") {
displaySearchPlayer = false
}
}
}
}
})
.onAppear {
#if DEBUG
self.showDebugViews = true
@ -163,9 +162,16 @@ struct ToolboxView: View {
}
}
}
.navigationBarTitleDisplayMode(.large)
.navigationTitle(TabDestination.toolbox.title)
// .navigationBarTitleDisplayMode(.large)
// .navigationTitle(TabDestination.toolbox.title)
.toolbar {
ToolbarItem(placement: .principal) {
Text(TabDestination.toolbox.title)
.font(.headline)
.onTapGesture {
_handleTitleTap()
}
}
ToolbarItem(placement: .topBarLeading) {
Link(destination: URLs.appStore.url) {
Text("v\(PadelClubApp.appVersion)")
@ -173,16 +179,15 @@ struct ToolboxView: View {
}
ToolbarItem(placement: .topBarTrailing) {
Menu {
ShareLink(item: ZipLog(), preview: .init("Mon archive")) {
Text("Archiver mes données")
ShareLink(item: URLs.appStore.url) {
Label("Lien AppStore", systemImage: "link")
}
Divider()
Toggle("Outils avancées", isOn: $showDebugViews)
ShareLink(item: ZipLog(), preview: .init("Mon archive")) {
Label("Mes données", systemImage: "server.rack")
}
} label: {
LabelOptions()
Label("Partagez", systemImage: "square.and.arrow.up").labelStyle(.iconOnly)
}
}
}
@ -239,6 +244,66 @@ struct DebugView: View {
Logger.log("Api calls reset")
}
}
Section {
RowButtonView("Fix Names") {
for tournament in dataStore.tournaments {
if let store = tournament.tournamentStore {
let playerRegistrations = store.playerRegistrations
playerRegistrations.forEach { player in
player.firstName = player.firstName.trimmed.capitalized
player.lastName = player.lastName.trimmed.uppercased()
}
do {
try store.playerRegistrations.addOrUpdate(contentOfs: playerRegistrations)
} catch {
Logger.error(error)
}
}
}
}
}
Section {
RowButtonView("Delete teams") {
for tournament in DataStore.shared.tournaments {
if let store: TournamentStore = tournament.tournamentStore {
let teamRegistrations = store.teamRegistrations.filter({ $0.tournamentObject() == nil })
do {
try store.teamRegistrations.delete(contentOfs: teamRegistrations)
} catch {
Logger.error(error)
}
}
}
}
}
Section {
// TODO
RowButtonView("Delete players") {
for tournament in DataStore.shared.tournaments {
if let store: TournamentStore = tournament.tournamentStore {
let playersRegistrations = store.playerRegistrations.filter({ $0.team() == nil })
do {
try store.playerRegistrations.delete(contentOfs: playersRegistrations)
} catch {
Logger.error(error)
}
}
}
}
}
}
}

@ -160,7 +160,7 @@ struct PadelClubView: View {
if let maleUnrankedValue = monthData.maleUnrankedValue {
Text(maleUnrankedValue.formatted())
} else {
Text(92_327.formatted())
Text(90_415.formatted())
}
} label: {
Text("Rang d'un non classé")

@ -1,68 +0,0 @@
//
// UmpireOptionsView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 06/10/2025.
//
import SwiftUI
import PadelClubData
struct UmpireOptionsView: View {
@Environment(NavigationViewModel.self) private var navigation: NavigationViewModel
@State private var umpireOption: UmpireOption? = .umpire
var body: some View {
@Bindable var navigation = navigation
NavigationStack {
VStack(spacing: 0) {
GenericDestinationPickerView(selectedDestination: $umpireOption, destinations: UmpireOption.allCases, nilDestinationIsValid: true)
switch umpireOption {
case .none:
UmpireSettingsView()
.navigationTitle("Préférences")
case .umpire:
UmpireView()
.navigationTitle("Juge-Arbitre")
case .clubs:
ClubsView()
}
}
.navigationBarTitleDisplayMode(.large)
.navigationTitle("Juge-Arbitre")
.toolbarBackground(.visible, for: .navigationBar)
}
}
}
enum UmpireOption: Int, CaseIterable, Identifiable, Selectable, Equatable {
func badgeValue() -> Int? {
nil
}
func badgeImage() -> PadelClubData.Badge? {
nil
}
func badgeValueColor() -> Color? {
nil
}
var id: Int { self.rawValue }
case umpire
case clubs
var localizedTitleKey: String {
switch self {
case .umpire:
return "Juge-Arbitre"
case .clubs:
return "Clubs Favoris"
}
}
func selectionLabel(index: Int) -> String {
localizedTitleKey
}
}

@ -1,85 +0,0 @@
//
// UmpireSettingsView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 06/10/2025.
//
import SwiftUI
import CoreLocation
import LeStorage
import StoreKit
import PadelClubData
struct UmpireSettingsView: View {
@EnvironmentObject var dataStore: DataStore
var body: some View {
List {
if dataStore.user.canEnableOnlinePayment() {
Section {
if let tournamentTemplate = Tournament.getTemplateTournament() {
NavigationLink {
RegistrationSetupView(tournament: tournamentTemplate)
} label: {
Text("Référence")
Text(tournamentTemplate.tournamentTitle()).foregroundStyle(.secondary)
}
} else {
Text("Aucun tournoi référence. Choisissez-en un dans la liste d'activité")
}
} header: {
Text("Inscription et paiement en ligne")
} footer: {
Text("Tournoi référence utilisé pour les réglages des inscriptions en ligne")
}
}
Section {
@Bindable var user = dataStore.user
Toggle(isOn: $user.disableRankingFederalRuling) {
Text("Désactiver la règle fédérale")
}
.onChange(of: user.disableRankingFederalRuling) {
dataStore.saveUser()
}
} header: {
Text("Règle fédérale classement final")
} footer: {
Text("Dernier de poule ≠ dernier du tournoi")
}
Section {
@Bindable var user = dataStore.user
Picker(selection: $user.loserBracketMode) {
ForEach(LoserBracketMode.allCases) {
Text($0.localizedLoserBracketMode()).tag($0)
}
} label: {
Text("Position des perdants")
}
.onChange(of: user.loserBracketMode) {
dataStore.saveUser()
}
} header: {
Text("Matchs de classement")
}
Section {
NavigationLink {
GlobalSettingsView()
} label: {
Label("Formats de jeu par défaut", systemImage: "megaphone")
}
NavigationLink {
DurationSettingsView()
} label: {
Label("Définir les durées moyennes", systemImage: "deskclock")
}
} footer: {
Text("Vous pouvez définir vos propres estimations de durées de match en fonction du format de jeu.")
}
}
}
}

@ -17,6 +17,8 @@ struct UmpireView: View {
@EnvironmentObject var dataStore: DataStore
@State private var presentSearchView: Bool = false
@State private var showSubscriptions: Bool = false
@State private var showProductIds: Bool = false
@State private var umpireCustomMail: String
@State private var umpireCustomPhone: String
@State private var umpireCustomContact: String
@ -36,9 +38,101 @@ struct UmpireView: View {
_umpireCustomContact = State(wrappedValue: DataStore.shared.user.umpireCustomContact ?? "")
}
enum UmpireScreen {
case login
}
var body: some View {
List {
if StoreCenter.main.isAuthenticated {
@Bindable var navigation = navigation
NavigationStack(path: $navigation.umpirePath) {
List {
PurchaseListView()
if Guard.main.currentPlan != .monthlyUnlimited {
Section {
Button {
self.showSubscriptions = true
} label: {
Label("Les offres", systemImage: "bookmark.fill")
}.simultaneousGesture(
LongPressGesture()
.onEnded { _ in
self.showProductIds = true
}
)
.highPriorityGesture(
TapGesture()
.onEnded { _ in
self.showSubscriptions = true
}
)
}
}
if StoreCenter.main.isAuthenticated {
NavigationLink {
AccountView(user: dataStore.user) { }
} label: {
AccountRowView(userName: dataStore.user.username)
}
let onlineRegPaymentMode = dataStore.user.registrationPaymentMode
Section {
LabeledContent {
switch onlineRegPaymentMode {
case .corporate:
Text("Activé")
.bold()
.foregroundStyle(.green)
case .disabled:
Text("Désactivé")
.bold()
case .noFee:
Text("Activé")
.bold()
.foregroundStyle(.green)
case .stripe:
Text("Activé")
.bold()
.foregroundStyle(.green)
}
} label: {
Text("Option 'Paiement en ligne'")
if onlineRegPaymentMode == .corporate {
Text("Mode Padel Club")
.foregroundStyle(.secondary)
} else if onlineRegPaymentMode == .noFee {
Text("Commission Stripe")
.foregroundStyle(.secondary)
} else if onlineRegPaymentMode == .stripe {
Text("Commission Stripe et Padel Club")
.foregroundStyle(.secondary)
}
}
} footer: {
if onlineRegPaymentMode == .disabled {
FooterButtonView("Contactez nous pour activer cette option.") {
let emailTo: String = "support@padelclub.app"
let subject: String = "Activer l'option de paiment en ligne : \(dataStore.user.email)"
if let url = URL(string: "mailto:\(emailTo)?subject=\(subject)"), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
.font(.callout)
.multilineTextAlignment(.leading)
} else {
Text("Permet de proposer le paiement de vos tournois en ligne.")
}
}
} else {
NavigationLink(value: UmpireScreen.login) {
AccountRowView(userName: dataStore.user.username)
}
}
let currentPlayerData = dataStore.user.currentPlayerData()
Section {
if let reason = licenseMessage {
@ -47,11 +141,11 @@ struct UmpireView: View {
if let currentPlayerData {
//todo palmares
ImportedPlayerView(player: currentPlayerData, showProgression: true)
// NavigationLink {
//
// } label: {
// ImportedPlayerView(player: currentPlayerData)
// }
// NavigationLink {
//
// } label: {
// ImportedPlayerView(player: currentPlayerData)
// }
} else {
RowButtonView("Ma fiche joueur", systemImage: "person.bust") {
presentSearchView = true
@ -63,8 +157,6 @@ struct UmpireView: View {
.autocorrectionDisabled()
.frame(maxWidth: .infinity)
}
} header: {
Text("Mes infos licencié")
} footer: {
if dataStore.user.licenceId == nil {
Text("Si vous avez participé à un tournoi dans les 12 derniers mois, Padel Club peut vous retrouver.")
@ -91,119 +183,245 @@ struct UmpireView: View {
}
}
}
_customUmpireView()
Section {
@Bindable var user = dataStore.user
if dataStore.user.hideUmpireMail, dataStore.user.hideUmpirePhone {
Text("Attention, les emails envoyés automatiquement au regard des inscriptions en ligne ne contiendront aucun moyen de vous contacter.").foregroundStyle(.logoRed)
NavigationLink {
ClubsView()
} label: {
LabeledContent {
Text(dataStore.user.clubs.count.formatted())
} label: {
Label("Clubs favoris", systemImage: "house.and.flag")
}
}
} footer: {
Text("Il s'agit des clubs qui sont utilisés pour récupérer les tournois tenup.")
}
Toggle(isOn: $user.hideUmpireMail) {
Text("Masquer l'email")
// Section {
// NavigationLink {
// UmpireStatisticView()
// } label: {
// Text("Statistiques de participations")
// }
// }
//
if StoreCenter.main.isAuthenticated {
_customUmpireView()
Section {
@Bindable var user = dataStore.user
if dataStore.user.hideUmpireMail, dataStore.user.hideUmpirePhone {
Text("Attention, les emails envoyés automatiquement au regard des inscriptions en ligne ne contiendront aucun moyen de vous contacter.").foregroundStyle(.logoRed)
}
Toggle(isOn: $user.hideUmpireMail) {
Text("Masquer l'email")
}
Toggle(isOn: $user.hideUmpirePhone) {
Text("Masquer le téléphone")
}
} footer: {
Text("Ces informations ne seront pas affichées sur la page d'information des tournois sur Padel Club et dans les emails envoyés automatiquement au regard des inscriptions en lignes.")
}
Toggle(isOn: $user.hideUmpirePhone) {
Text("Masquer le téléphone")
}
if dataStore.user.canEnableOnlinePayment() {
Section {
if let tournamentTemplate = Tournament.getTemplateTournament() {
NavigationLink {
RegistrationSetupView(tournament: tournamentTemplate)
} label: {
Text("Référence")
Text(tournamentTemplate.tournamentTitle()).foregroundStyle(.secondary)
}
} else {
Text("Aucun tournoi référence. Choisissez-en un dans la liste d'activité")
}
} header: {
Text("Inscription et paiement en ligne")
} footer: {
Text("Tournoi référence utilisé pour les réglages des inscriptions en ligne")
}
}
Section {
@Bindable var user = dataStore.user
Toggle(isOn: $user.disableRankingFederalRuling) {
Text("Désactiver la règle fédéral")
}
.onChange(of: user.disableRankingFederalRuling) {
dataStore.saveUser()
}
} header: {
Text("Règle fédérale classement finale")
} footer: {
Text("Ces informations ne seront pas affichées sur la page d'information des tournois sur Padel Club et dans les emails envoyés automatiquement au regard des inscriptions en lignes.")
Text("Dernier de poule ≠ dernier du tournoi")
}
}
}
.overlay(content: {
if StoreCenter.main.isAuthenticated == false {
ContentUnavailableView {
Label("Aucun compte", systemImage: "person.crop.circle.badge.exclamationmark")
} description: {
Text("Créer un compte Padel Club pour personnaliser vos informations de Juge-Arbitre")
} actions: {
RowButtonView("Créer un compte") {
_openCreateAccountView()
Section {
@Bindable var user = dataStore.user
Picker(selection: $user.loserBracketMode) {
ForEach(LoserBracketMode.allCases) {
Text($0.localizedLoserBracketMode()).tag($0)
}
} label: {
Text("Position des perdants")
}
.onChange(of: user.loserBracketMode) {
dataStore.saveUser()
}
} header: {
Text("Matchs de classement")
}
}
})
.onChange(of: StoreCenter.main.userId) {
license = dataStore.user.licenceId ?? ""
licenseMessage = nil
}
.navigationBarBackButtonHidden(focusedField != nil)
.toolbarBackground(.visible, for: .navigationBar)
.toolbar(content: {
if focusedField != nil {
ToolbarItem(placement: .topBarLeading) {
Button("Annuler", role: .cancel) {
focusedField = nil
Section {
NavigationLink {
GlobalSettingsView()
} label: {
Label("Formats de jeu par défaut", systemImage: "megaphone")
}
NavigationLink {
DurationSettingsView()
} label: {
Label("Définir les durées moyennes", systemImage: "deskclock")
}
} footer: {
Text("Vous pouvez définir vos propres estimations de durées de match en fonction du format de jeu.")
}
// Section {
// Text("Tenup ID")
// }
//
// Section {
// Text("Tournois")
// }
//
// Section {
// NavigationLink {
//
// } label: {
// Text("Favori")
// }
// NavigationLink {
//
// } label: {
// Text("Black list")
// }
// }
}
.onChange(of: StoreCenter.main.userId) {
license = dataStore.user.licenceId ?? ""
licenseMessage = nil
}
.navigationTitle("Juge-Arbitre")
.toolbar {
#if DEBUG
ToolbarItem(placement: .topBarTrailing) {
NetworkStatusView()
// if StoreCenter.main.collectionsCanSynchronize {
// Image(systemName: "checkmark.icloud")
// } else {
// Image(systemName: "icloud.slash")
// }
}
#endif
}
})
.toolbar {
if focusedField != nil {
ToolbarItemGroup(placement: .keyboard) {
if focusedField == ._umpireCustomMail, umpireCustomMail.isEmpty == false {
Button("Effacer") {
_deleteUmpireMail()
}
.buttonStyle(.borderedProminent)
} else if focusedField == ._umpireCustomPhone, umpireCustomPhone.isEmpty == false {
Button("Effacer") {
_deleteUmpirePhone()
}
.buttonStyle(.borderedProminent)
} else if focusedField == ._umpireCustomContact, umpireCustomContact.isEmpty == false {
Button("Effacer") {
_deleteUmpireContact()
.navigationBarBackButtonHidden(focusedField != nil)
.toolbar(content: {
if focusedField != nil {
ToolbarItem(placement: .topBarLeading) {
Button("Annuler", role: .cancel) {
focusedField = nil
}
.buttonStyle(.borderedProminent)
}
Spacer()
Button("Valider") {
focusedField = nil
}
})
.toolbar {
if focusedField != nil {
ToolbarItem(placement: .keyboard) {
HStack {
if focusedField == ._umpireCustomMail, umpireCustomMail.isEmpty == false {
Button("Effacer") {
_deleteUmpireMail()
}
.buttonStyle(.borderless)
} else if focusedField == ._umpireCustomPhone, umpireCustomPhone.isEmpty == false {
Button("Effacer") {
_deleteUmpirePhone()
}
.buttonStyle(.borderless)
} else if focusedField == ._umpireCustomContact, umpireCustomContact.isEmpty == false {
Button("Effacer") {
_deleteUmpireContact()
}
.buttonStyle(.borderless)
}
Spacer()
Button("Valider") {
focusedField = nil
}
.buttonStyle(.bordered)
}
}
.buttonStyle(.borderedProminent)
}
}
}
.onChange(of: [dataStore.user.umpireCustomMail, dataStore.user.umpireCustomPhone, dataStore.user.umpireCustomContact]) {
self.dataStore.saveUser()
}
.onChange(of: [dataStore.user.hideUmpireMail, dataStore.user.hideUmpirePhone]) {
self.dataStore.saveUser()
}
.onChange(of: focusedField) { old, new in
if old == ._umpireCustomMail {
_confirmUmpireMail()
} else if old == ._umpireCustomPhone {
_confirmUmpirePhone()
} else if old == ._umpireCustomContact {
_confirmUmpireContact()
} else if old == ._licenceId {
_confirmlicense()
.onChange(of: [dataStore.user.umpireCustomMail, dataStore.user.umpireCustomPhone, dataStore.user.umpireCustomContact]) {
self.dataStore.saveUser()
}
}
.sheet(isPresented: $presentSearchView) {
let user = dataStore.user
NavigationStack {
SelectablePlayerListView(allowSelection: 1, searchField: user.firstName + " " + user.lastName, playerSelectionAction: { players in
if let player = players.first {
if user.clubsObjects().contains(where: { $0.code == player.clubCode }) == false {
let userClub = Club.findOrCreate(name: player.clubName!, code: player.clubCode)
if userClub.hasBeenCreated(by: StoreCenter.main.userId) {
dataStore.clubs.addOrUpdate(instance: userClub)
.onChange(of: [dataStore.user.hideUmpireMail, dataStore.user.hideUmpirePhone]) {
self.dataStore.saveUser()
}
.onChange(of: focusedField) { old, new in
if old == ._umpireCustomMail {
_confirmUmpireMail()
} else if old == ._umpireCustomPhone {
_confirmUmpirePhone()
} else if old == ._umpireCustomContact {
_confirmUmpireContact()
} else if old == ._licenceId {
_confirmlicense()
}
}
.sheet(isPresented: self.$showSubscriptions, content: {
NavigationStack {
SubscriptionView(isPresented: self.$showSubscriptions)
.environment(\.colorScheme, .light)
}
})
.sheet(isPresented: self.$showProductIds, content: {
ProductIdsView()
})
.sheet(isPresented: $presentSearchView) {
let user = dataStore.user
NavigationStack {
SelectablePlayerListView(allowSelection: 1, searchField: user.firstName + " " + user.lastName, playerSelectionAction: { players in
if let player = players.first {
if user.clubsObjects().contains(where: { $0.code == player.clubCode }) == false {
let userClub = Club.findOrCreate(name: player.clubName!, code: player.clubCode)
if userClub.hasBeenCreated(by: StoreCenter.main.userId) {
dataStore.clubs.addOrUpdate(instance: userClub)
}
user.setUserClub(userClub)
}
user.setUserClub(userClub)
self._updateUserLicense(license: player.license?.computedLicense)
}
self._updateUserLicense(license: player.license?.computedLicense)
})
}
.task {
do {
try await dataStore.clubs.loadDataFromServerIfAllowed()
} catch {
Logger.error(error)
}
})
}
}
.task {
do {
try await dataStore.clubs.loadDataFromServerIfAllowed()
} catch {
Logger.error(error)
.navigationDestination(for: UmpireScreen.self) { screen in
switch screen {
case .login:
LoginView {_ in }
}
}
}
@ -221,10 +439,6 @@ struct UmpireView: View {
}
private func _openCreateAccountView() {
navigation.selectedTab = .myAccount
}
private func _updateUserLicense(license: String?) {
guard let license else { return }
@ -332,10 +546,67 @@ struct UmpireView: View {
} }
} header: {
Text("Mes infos juge-arbitre")
Text("Juge-arbitre")
} footer: {
Text("Par défaut, les informations de Tenup sont récupérés, et si ce n'est pas le cas, ces informations seront utilisées pour vous contacter. Vous pouvez les modifier si vous souhaitez utiliser les informations de contact différentes de votre compte Padel Club.")
}
}
}
struct AccountRowView: View {
@EnvironmentObject var dataStore: DataStore
var userName: String
var body: some View {
let isAuthenticated = StoreCenter.main.isAuthenticated
LabeledContent {
if isAuthenticated {
Text(self.userName)
} else if StoreCenter.main.userName != nil {
Image(systemName: "xmark.circle.fill")
.foregroundStyle(.logoRed)
}
} label: {
Label("Mon compte", systemImage: "person.fill")
if isAuthenticated && dataStore.user.email.isEmpty == false {
Text(dataStore.user.email)
}
}
}
}
struct ProductIdsView: View {
@State var transactions: [StoreKit.Transaction] = []
var body: some View {
VStack {
List {
LabeledContent("count", value: String(self.transactions.count))
ForEach(self.transactions) { transaction in
if #available(iOS 17.2, *) {
if let offer = transaction.offer {
LabeledContent(transaction.productID, value: "\(offer.type)")
} else {
LabeledContent(transaction.productID, value: "no offer")
}
} else {
Text("need ios 17.2")
}
}
}.onAppear {
Task {
self.transactions = Array(Guard.main.purchasedTransactions)
}
}
}
}
}
//#Preview {
// UmpireView()
//}

@ -111,14 +111,8 @@ struct CourtAvailabilitySettingsView: View {
}
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
if #available(iOS 26.0, *) {
BarButtonView("Ajouter une indisponibilité", icon: "plus") {
showingPopover = true
}
} else {
BarButtonView("Ajouter une indisponibilité", icon: "plus.circle.fill") {
showingPopover = true
}
BarButtonView("Ajouter une indisponibilité", icon: "plus.circle.fill") {
showingPopover = true
}
}
}

@ -56,18 +56,6 @@ struct PlanningSettingsView: View {
DatePicker(selection: $tournament.startDate) {
Text(tournament.startDate.formatted(.dateTime.weekday(.wide)).capitalized).lineLimit(1)
}
NavigationLink {
TournamentMatchFormatsSettingsView()
.environment(tournament)
} label: {
VStack(alignment: .leading) {
Text(tournament.formatSummary())
Text("Formats par défaut").foregroundStyle(.secondary).font(.caption)
}
}
LabeledContent {
StepperView(count: $tournament.dayDuration, minimum: 1)
} label: {

@ -27,14 +27,10 @@ struct PlanningView: View {
init(matches: [Match], selectedScheduleDestination: Binding<ScheduleDestination?>, event: Event? = nil) {
self.event = event
if let event {
let allMatches = event.confirmedTournaments().flatMap { $0.allMatches() }
self.allMatches = allMatches
_showFinishedMatches = .init(wrappedValue: !allMatches.anySatisfy({ $0.hasEnded() == false && $0.plannedStartDate != nil }))
self.allMatches = event.confirmedTournaments().flatMap { $0.allMatches() }
} else {
self.allMatches = matches
_showFinishedMatches = .init(wrappedValue: !matches.anySatisfy({ $0.hasEnded() == false && $0.plannedStartDate != nil }))
}
_selectedScheduleDestination = selectedScheduleDestination
}
@ -88,7 +84,7 @@ struct PlanningView: View {
let keys = self.keys(timeSlots: timeSlots)
let days = self.days(timeSlots: timeSlots)
let matches = matches
let notSlots = matches.allSatisfy({ $0.plannedStartDate == nil })
let notSlots = matches.allSatisfy({ $0.startDate == nil })
BySlotView(
days: days, keys: keys, timeSlots: timeSlots, matches: matches, selectedDay: selectedDay
)
@ -154,7 +150,7 @@ struct PlanningView: View {
Button {
_planEvent(event: event)
} label: {
Text("Tout planifier")
Text("Planifier")
}
} label: {
Text("Planifier l'événement")
@ -172,28 +168,29 @@ struct PlanningView: View {
.popoverTip(timeSlotMoveOptionTip)
.disabled(_confirmationMode())
Toggle(isOn: enableEditionBinding) {
Label("Modifier un horaire", systemImage: "clock.arrow.trianglehead.2.counterclockwise.rotate.90")
Text("Modifier un horaire")
}
.disabled(_confirmationMode())
}
Divider()
Section {
Picker(selection: $showFinishedMatches) {
Label("Afficher tous les matchs", systemImage: "eye").tag(true)
Label("Masquer les matchs terminés", systemImage: "eye.slash").tag(false)
} label: {
Menu {
Section {
Picker(selection: $showFinishedMatches) {
Text("Afficher tous les matchs").tag(true)
Text("Masquer les matchs terminés").tag(false)
} label: {
Text("Option de filtrage")
}
.labelsHidden()
.pickerStyle(.inline)
} header: {
Text("Option de filtrage")
}
.labelsHidden()
.pickerStyle(.inline)
} header: {
Text("Option de filtrage")
}
Divider()
Menu {
Divider()
Section {
Picker(selection: $filterOption) {
ForEach(PlanningFilterOption.allCases) {
@ -209,14 +206,14 @@ struct PlanningView: View {
}
} label: {
Label("Trier", systemImage: "line.3.horizontal.decrease")
Label("Trier", systemImage: "line.3.horizontal.decrease.circle")
.symbolVariant(
filterOption == .byCourt || showFinishedMatches ? .fill : .none)
}
Divider()
Button("Mettre à jour", systemImage: "arrow.trianglehead.2.clockwise.rotate.90.icloud") {
Button("Mettre à jour", systemImage: "arrow.trianglehead.2.clockwise.rotate.90.circle") {
let now = Date()
matches.forEach {
if let startDate = $0.startDate, startDate > now {
@ -241,20 +238,7 @@ struct PlanningView: View {
}
})
.overlay {
if notSlots, showFinishedMatches == false, self.allMatches.isEmpty == false {
ContentUnavailableView {
Label("Aucun match à jouer", systemImage: "clock.badge.checkmark")
} description: {
Text(
"Tous les matchs plannifiés sont terminés."
)
} actions: {
RowButtonView("Afficher tous les matchs") {
showFinishedMatches = true
}
}
} else if notSlots {
if notSlots {
ContentUnavailableView {
Label("Aucun horaire défini", systemImage: "clock.badge.questionmark")
} description: {
@ -331,9 +315,8 @@ struct PlanningView: View {
matchesToUpdate = matches.filter({ selectedIds.contains($0.stringId) })
} label: {
Text("Modifier")
.frame(maxWidth: .infinity)
}
.buttonStyle(.borderedProminent)
.buttonStyle(.borderless)
.disabled(selectedIds.isEmpty)
}
}
@ -517,7 +500,6 @@ struct PlanningView: View {
}
CourtOptionsView(timeSlots: timeSlots, underlined: true)
.labelStyle(.titleOnly)
}
}
.onChange(of: selectAll, { oldValue, newValue in
@ -745,6 +727,9 @@ struct PlanningView: View {
}
}
private func _eventCourtCount() -> Int { timeSlots.first?.value.first?.currentTournament()?.eventObject()?.eventCourtCount() ?? 2
}
private func _save() {
let groupByTournaments = allMatches.grouped { match in
match.currentTournament()
@ -764,26 +749,15 @@ struct PlanningView: View {
Button("Tirer au sort") {
_removeCourts()
let eventCourtCount = _eventCourtCount()
for slot in timeSlots {
var courtsAvailable = Array(0...eventCourtCount)
let matches = slot.value
var courtsByTournament: [String: Set<Int>] = [:]
for match in matches {
if let tournament = match.currentTournament(),
let available = tournament.matchScheduler()?.courtsAvailable {
courtsByTournament[tournament.id, default: []].formUnion(available)
}
}
for match in matches {
guard let tournament = match.currentTournament() else { continue }
// Get current set of available courts for this tournament id
guard var courts = courtsByTournament[tournament.id], !courts.isEmpty else { continue }
// Pick a random court
if let rand = courts.randomElement() {
matches.forEach { match in
if let rand = courtsAvailable.randomElement() {
match.courtIndex = rand
// Remove from local copy and assign back into the dictionary
courts.remove(rand)
courtsByTournament[tournament.id] = courts
courtsAvailable.remove(elements: [rand])
}
}
}
@ -794,33 +768,22 @@ struct PlanningView: View {
Button("Fixer par ordre croissant") {
_removeCourts()
let eventCourtCount = _eventCourtCount()
for slot in timeSlots {
var courtsAvailable = Array(0..<eventCourtCount)
let matches = slot.value.sorted(by: \.computedOrder)
var courtsByTournament: [String: Set<Int>] = [:]
for match in matches {
if let tournament = match.currentTournament(),
let available = tournament.matchScheduler()?.courtsAvailable {
courtsByTournament[tournament.id, default: []].formUnion(available.sorted())
}
}
for i in 0..<matches.count {
guard let tournament = matches[i].currentTournament() else { continue }
// Get current set of available courts for this tournament id
guard var courts = courtsByTournament[tournament.id]?.sorted(), !courts.isEmpty else { continue }
if courts.isEmpty == false {
let court = courts.removeFirst()
if !courtsAvailable.isEmpty {
let court = courtsAvailable.removeFirst()
matches[i].courtIndex = court
// Remove from local copy and assign back into the dictionary
courtsByTournament[tournament.id] = Set(courts)
}
}
}
_save()
}
} label: {
Label("Pistes", systemImage: "123.rectangle")
Text("Pistes")
.underline(underlined)
}
@ -1020,4 +983,3 @@ extension EnvironmentValues {
set { self[EnableMoveKey.self] = newValue }
}
}

@ -172,7 +172,7 @@ struct SchedulerView: View {
Text("Match de classement \(round.roundTitle(.short))")
} footer: {
if tournament.isAnimation() == false, round.index == 1, let semi = round.loserRounds().first {
let federalFormat = tournament.loserBracketSmartMatchFormat()
let federalFormat = tournament.loserBracketSmartMatchFormat(1)
if semi.matchFormat.weight > federalFormat.weight {
Button {
round.updateMatchFormatAndAllMatches(federalFormat)

@ -202,25 +202,27 @@ struct PlayerPopoverView: View {
}
if licenseIsFocused || amountIsFocused {
ToolbarItemGroup(placement: .keyboard) {
Spacer()
Button("Confirmer") {
if licenseIsFocused {
license = license.trimmedMultiline
if requiredField.contains(.license) {
if license.isLicenseNumber {
amountIsFocused = true
ToolbarItem(placement: .keyboard) {
HStack {
Spacer()
Button("Confirmer") {
if licenseIsFocused {
license = license.trimmedMultiline
if requiredField.contains(.license) {
if license.isLicenseNumber {
amountIsFocused = true
} else {
displayWrongLicenceError = true
}
} else {
displayWrongLicenceError = true
amountIsFocused = true
}
} else {
amountIsFocused = true
amountIsFocused = false
}
} else {
amountIsFocused = false
}
.buttonStyle(.bordered)
}
.buttonStyle(.borderedProminent)
}
}
}

@ -30,20 +30,6 @@ struct PlayerDetailView: View {
return self.tournament.tournamentStore
}
var unranked: Binding<Bool> {
Binding {
player.isUnranked()
} set: { isUnranked in
player.rank = nil
player.setComputedRank(in: tournament)
if let team = player.team() {
team.setWeight(from: team.players(), inTournamentCategory: tournament.category)
}
_save()
}
}
init(player: PlayerRegistration) {
self.player = player
_licenceId = .init(wrappedValue: player.licenceId ?? "")
@ -144,11 +130,6 @@ struct PlayerDetailView: View {
}
Section {
Toggle(isOn: unranked) {
Text("Non classé\(player.sex == .female ? "e" : "")")
}
LabeledContent {
TextField("Rang", value: $player.rank, format: .number)
.keyboardType(.decimalPad)
@ -166,7 +147,7 @@ struct PlayerDetailView: View {
}
}
let maxMaleUnrankedValue: Int = tournament.maleUnrankedValue ?? 92_327
let maxMaleUnrankedValue: Int = tournament.maleUnrankedValue ?? 90_415
if player.isMalePlayer() == false && tournament.tournamentCategory == .men && (player.rank == maxMaleUnrankedValue || player.rank == nil) {
Section {
@ -305,7 +286,7 @@ struct PlayerDetailView: View {
}
LabeledContent {
TextField("Téléphone", text: $contactPhoneNumber)
TextField("Téléphone contact", text: $contactPhoneNumber)
.focused($focusedField, equals: ._contactPhoneNumber)
.keyboardType(.namePhonePad)
.textContentType(nil)
@ -334,12 +315,12 @@ struct PlayerDetailView: View {
CopyPasteButtonView(pasteValue: player.contactPhoneNumber)
PasteButtonView(text: $contactPhoneNumber)
} label: {
Text("Téléphone")
Text("Téléphone contact")
}
}
LabeledContent {
TextField("Email", text: $contactEmail)
TextField("Email contact", text: $contactEmail)
.focused($focusedField, equals: ._contactEmail)
.keyboardType(.emailAddress)
.textContentType(nil)
@ -361,7 +342,7 @@ struct PlayerDetailView: View {
CopyPasteButtonView(pasteValue: player.contactEmail)
PasteButtonView(text: $contactEmail)
} label: {
Text("Email")
Text("Email contact")
}
}
} header: {
@ -391,7 +372,7 @@ struct PlayerDetailView: View {
.toolbarBackground(.visible, for: .navigationBar)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
ShareLink(item: player.pasteData(type: .sharing)) {
ShareLink(item: player.pasteData()) {
Label("Partager", systemImage: "square.and.arrow.up")
}
}
@ -420,7 +401,6 @@ struct PlayerDetailView: View {
}
focusedField = nil
}
.buttonStyle(.borderedProminent)
}
}
}

@ -52,7 +52,11 @@ struct DrawLogsView: View {
Divider()
Button("Tout effacer", role: .destructive) {
tournament.tournamentStore?.drawLogs.reset()
do {
try tournament.tournamentStore?.drawLogs.deleteAll()
} catch {
Logger.error(error)
}
}
} label: {
LabelOptions()

@ -103,9 +103,6 @@ struct LoserRoundView: View {
}
.onAppear(perform: {
updateDisplayedMatches()
self.loserBracket.rounds.forEach({ round in
round.invalidateCache()
})
})
.onChange(of: isEditingTournamentSeed.wrappedValue) {
updateDisplayedMatches()

@ -297,12 +297,5 @@ struct LoserRoundsView: View {
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
.navigationTitle(upperBracketRound.correspondingLoserRoundTitle)
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
if let tournament = upperBracketRound.round.tournamentObject() {
$0.navigationSubtitle(tournament.tournamentTitle())
}
}
}
}
}

@ -160,7 +160,14 @@ struct RoundSettingsView: View {
}
private func _removeRound(_ lastRound: Round) async {
await tournament.removeRound(lastRound)
await MainActor.run {
let teams = lastRound.seeds()
teams.forEach { team in
team.resetBracketPosition()
}
tournamentStore?.teamRegistrations.addOrUpdate(contentOfs: teams)
tournamentStore?.rounds.delete(instance: lastRound)
}
}
}

@ -29,7 +29,6 @@ struct RoundView: View {
func _refreshRound() {
self.upperRound.playedMatches = self.upperRound.round.playedMatches()
self.upperRound.round.invalidateCache()
}
init(upperRound: UpperRound) {
@ -80,11 +79,9 @@ struct RoundView: View {
}
}
if let disabledMatchesCount {
if disabledMatchesCount > 0 {
let bracketTip = BracketEditTip(nextRoundName: upperRound.round.nextRound()?.roundTitle())
TipView(bracketTip).tipStyle(tint: .green, asSection: true)
}
if let disabledMatchesCount, disabledMatchesCount > 0 {
let bracketTip = BracketEditTip(nextRoundName: upperRound.round.nextRound()?.roundTitle())
TipView(bracketTip).tipStyle(tint: .green, asSection: true)
let leftToPlay = (RoundRule.numberOfMatches(forRoundIndex: upperRound.round.index) - disabledMatchesCount)
@ -96,9 +93,7 @@ struct RoundView: View {
Text("Match\(leftToPlay.pluralSuffix) à jouer en \(upperRound.title)")
}
} footer: {
if disabledMatchesCount > 0 {
Text("\(disabledMatchesCount) match\(disabledMatchesCount.pluralSuffix) désactivé\(disabledMatchesCount.pluralSuffix) automatiquement")
}
Text("\(disabledMatchesCount) match\(disabledMatchesCount.pluralSuffix) désactivé\(disabledMatchesCount.pluralSuffix) automatiquement")
}
}
}

@ -48,17 +48,11 @@ struct RoundsView: View {
case .some(let selectedRound):
RoundView(upperRound: selectedRound).id(selectedRound.id)
.navigationTitle(selectedRound.round.roundTitle())
}
}
.environment(\.isEditingTournamentSeed, $isEditingTournamentSeed)
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
$0.navigationSubtitle(tournament.tournamentTitle())
}
}
}
}

@ -139,15 +139,13 @@ struct EditScoreView: View {
Text(matchDescriptor.teamLabelTwo)
}
if self.matchDescriptor.match?.hasWalkoutTeam() == true {
Divider()
Divider()
Button {
self.matchDescriptor.match?.removeWalkOut()
save()
} label: {
Text("Annuler un forfait")
}
Button {
self.matchDescriptor.match?.removeWalkOut()
save()
} label: {
Text("Annuler un forfait")
}
} label: {
Text("Forfait d'une équipe ?")
@ -176,13 +174,6 @@ struct EditScoreView: View {
}
if matchDescriptor.hasEnded {
if self.matchDescriptor.match?.hasWalkoutTeam() == true {
RowButtonView("Annuler le forfait", role: .destructive) {
self.matchDescriptor.match?.removeWalkOut()
save()
}
}
Section {
HStack {
Spacer()
@ -244,13 +235,6 @@ struct EditScoreView: View {
matchDescriptor.setDescriptors.removeAll()
matchDescriptor.addNewSet()
}
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
if let tournament = matchDescriptor.match?.currentTournament() {
$0.navigationBarTitle(tournament.tournamentTitle())
}
}
}
}
func save() {

@ -88,7 +88,7 @@ struct FollowUpMatchView: View {
let allMatches = currentTournament?.allMatches() ?? []
self.matchesLeft = Tournament.matchesLeft(allMatches)
let runningMatches = Tournament.runningMatches(allMatches)
let readyMatches = Tournament.readyMatches(allMatches, runningMatches: runningMatches)
let readyMatches = Tournament.readyMatches(allMatches)
self.readyMatches = Tournament.availableToStart(readyMatches, in: runningMatches, checkCanPlay: false)
self.isFree = currentTournament?.isFree() ?? true
}
@ -100,7 +100,7 @@ struct FollowUpMatchView: View {
self.autoDismiss = autoDismiss
self.matchesLeft = Tournament.matchesLeft(allMatches)
let runningMatches = Tournament.runningMatches(allMatches)
let readyMatches = Tournament.readyMatches(allMatches, runningMatches: runningMatches)
let readyMatches = Tournament.readyMatches(allMatches)
self.readyMatches = Tournament.availableToStart(readyMatches, in: runningMatches, checkCanPlay: false)
self.isFree = false
}
@ -156,7 +156,7 @@ struct FollowUpMatchView: View {
case .index:
return matches
case .restingTime:
return readyMatches.sorted(by: \.restingTimeForSorting)
return matches.sorted(by: \.restingTimeForSorting)
case .court:
return matchesLeft.filter({ $0.courtIndex == selectedCourt })
case .winner:
@ -292,13 +292,6 @@ struct FollowUpMatchView: View {
}
}
}
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
if let tournament = match?.currentTournament() {
$0.navigationBarTitle(tournament.tournamentTitle())
}
}
}
.onChange(of: readyMatches) {
dismissWhenPresentFollowUpMatchIsDismissed = true
if autoDismiss {

@ -234,11 +234,7 @@ struct SetInputView: View {
} else if newValue == setFormat.scoreToWin - 2 && setFormat.tieBreak == 8 {
otherTeamValueBinding.wrappedValue = setFormat.scoreToWin
} else if newValue == setFormat.scoreToWin - 1 {
if setFormat == .three {
otherTeamValueBinding.wrappedValue = setFormat.scoreToWin
} else {
otherTeamValueBinding.wrappedValue = setFormat.scoreToWin + 1
}
otherTeamValueBinding.wrappedValue = setFormat.scoreToWin + 1
} else if newValue <= setFormat.scoreToWin - 2 {
otherTeamValueBinding.wrappedValue = setFormat.scoreToWin
} else if newValue > 10 && setFormat == .superTieBreak {

@ -28,7 +28,7 @@ struct LearnMoreSheetView: View {
""")
} actions: {
ShareLink(item: tournament.pasteDataForImporting(type: .sharing).createFile(tournament.tournamentTitle(.short))) {
ShareLink(item: tournament.pasteDataForImporting().createFile(tournament.tournamentTitle(.short))) {
Text("Exporter les inscriptions")
}

@ -96,27 +96,16 @@ struct SelectablePlayerListView: View {
var body: some View {
VStack(spacing: 0) {
if importObserver.isImportingFile() == false {
VStack {
HStack {
Picker(selection: $searchViewModel.filterOption) {
ForEach(PlayerFilterOption.allCases, id: \.self) { scope in
Text(scope.icon().capitalized)
}
} label: {
}
.pickerStyle(.segmented)
Picker(selection: $searchViewModel.dataSet) {
ForEach(DataSet.allCases) { dataSet in
Text(searchViewModel.label(forDataSet: dataSet)).tag(dataSet)
}
} label: {
}
}
if searchViewModel.isPresented == false {
if searchViewModel.filterSelectionEnabled == false {
VStack {
HStack {
Picker(selection: $searchViewModel.filterOption) {
ForEach(PlayerFilterOption.allCases, id: \.self) { scope in
Text(scope.icon().capitalized)
}
} label: {
}
.pickerStyle(.segmented)
Menu {
if let lastDataSource = dataStore.appSettings.localizedLastDataSource() {
Section {
@ -143,7 +132,7 @@ struct SelectablePlayerListView: View {
}
Divider()
Menu {
Section {
Picker(selection: $searchViewModel.selectedAgeCategory) {
ForEach(FederalTournamentAge.allCases) { ageCategory in
Text(ageCategory.localizedFederalAgeLabel(.title)).tag(ageCategory)
@ -152,7 +141,7 @@ struct SelectablePlayerListView: View {
Text("Catégorie d'âge")
}
} label: {
} header: {
Text("Catégorie d'âge")
}
Divider()
@ -176,36 +165,23 @@ struct SelectablePlayerListView: View {
Text("Assimilés")
}
} label: {
Text("tri par " + searchViewModel.sortTitle().lowercased())
.underline()
.font(.caption)
// Label("Filtre", systemImage: "line.3.horizontal.decrease")
// .labelsHidden()
}
if searchViewModel.selectedPlayers.count > 0 {
Divider()
Button {
searchViewModel.filterSelectionEnabled.toggle()
} label: {
Text("\(searchViewModel.filterSelectionEnabled ? "masquer" : "voir") la sélection")
.underline()
.font(.caption)
VStack(alignment: .trailing) {
Label(searchViewModel.sortOption.localizedLabel(), systemImage: searchViewModel.ascending ? "chevron.up" : "chevron.down")
if searchViewModel.selectedAgeCategory != .unlisted {
Text(searchViewModel.selectedAgeCategory.localizedFederalAgeLabel()).font(.caption)
}
}
}
}
.fixedSize()
}
.padding(.bottom)
.padding(.horizontal)
.background(Material.thick)
Divider()
}
.padding(.bottom)
.padding(.horizontal)
.background(Material.thick)
Divider()
MySearchView(searchViewModel: searchViewModel, contentUnavailableAction: contentUnavailableAction)
.environment(\.editMode, searchViewModel.allowMultipleSelection ? .constant(.active) : .constant(.inactive))
.searchable(text: $searchViewModel.debouncableText, tokens: $searchViewModel.tokens, suggestedTokens: $searchViewModel.suggestedTokens, isPresented: $searchViewModel.isPresented, placement: .toolbar, prompt: searchViewModel.prompt(forDataSet: searchViewModel.dataSet), token: { token in
.searchable(text: $searchViewModel.debouncableText, tokens: $searchViewModel.tokens, suggestedTokens: $searchViewModel.suggestedTokens, isPresented: $searchViewModel.isPresented, placement: .navigationBarDrawer(displayMode: .always), prompt: searchViewModel.prompt(forDataSet: searchViewModel.dataSet), token: { token in
Text(token.shortLocalizedLabel)
})
.keyboardType(.alphabet)
@ -236,10 +212,11 @@ struct SelectablePlayerListView: View {
}
.scrollDismissesKeyboard(.immediately)
.navigationBarBackButtonHidden(searchViewModel.allowMultipleSelection)
.toolbarBackground(.hidden, for: .bottomBar)
.toolbarBackground(searchViewModel.allowMultipleSelection ? .visible : .hidden, for: .bottomBar)
.toolbarBackground(.visible, for: .navigationBar)
// .toolbarRole(searchViewModel.allowMultipleSelection ? .navigationStack : .editor)
.interactiveDismissDisabled(searchViewModel.selectedPlayers.isEmpty == false)
.navigationTitle(searchViewModel.label(forDataSet: searchViewModel.dataSet))
.navigationBarTitleDisplayMode(.inline)
} else {
List {
@ -307,7 +284,7 @@ struct SelectablePlayerListView: View {
searchViewModel.selectedPlayers.removeAll()
dismiss()
} label: {
Label("Annuler", systemImage: "xmark")
Text("Annuler")
}
}
@ -320,16 +297,28 @@ struct SelectablePlayerListView: View {
}
.disabled(searchViewModel.selectedPlayers.isEmpty)
}
}
if #available(iOS 26.0, *) {
DefaultToolbarItem(kind: .search, placement: .bottomBar)
ToolbarItem(placement: .status) {
let count = searchViewModel.selectedPlayers.count
VStack(spacing: 0) {
Text(count.formatted() + " joueur" + count.pluralSuffix + " séléctionné" + count.pluralSuffix).font(.footnote).foregroundStyle(.secondary)
FooterButtonView("\(searchViewModel.filterSelectionEnabled ? "masquer" : "voir") la liste") {
searchViewModel.filterSelectionEnabled.toggle()
}
}
}
}
}
.navigationTitle("Recherche")
.navigationBarTitleDisplayMode(.large)
// .modifierWithCondition(searchViewModel.user != nil) { thisView in
// thisView
.toolbarTitleMenu {
Picker(selection: $searchViewModel.dataSet) {
ForEach(DataSet.allCases) { dataSet in
Text(searchViewModel.label(forDataSet: dataSet)).tag(dataSet)
}
} label: {
}
}
// }
// .bottomBarAlternative(hide: searchViewModel.selectedPlayers.isEmpty) {
// ZStack {
@ -502,6 +491,7 @@ struct MySearchView: View {
headerView()
}
}
.id(UUID())
}
} else {
let filteredPlayers = searchedPlayers()

@ -15,43 +15,8 @@ extension URL: Identifiable {
return self.absoluteString
}
}
enum SupportButtonType {
case contentIsUnavailable
case supervisorRequest
case bugReport
case sharingRequest
var localizedPrefix: String {
switch self {
case .contentIsUnavailable:
return "Décrivez votre problème"
case .supervisorRequest:
return localizedTopic
case .bugReport:
return "Décrivez votre problème"
case .sharingRequest:
return localizedTopic
}
}
var localizedTopic: String {
switch self {
case .contentIsUnavailable:
return "Support Padel Club"
case .supervisorRequest:
return "Demande d'ajout de superviseur"
case .bugReport:
return "Support Padel Club"
case .sharingRequest:
return "Demande de partage"
}
}
}
struct SupportButtonView: View {
let supportButtonType: SupportButtonType
var showIcon: Bool = false
let contentIsUnavailable: Bool
@State private var sentError: ContactManagerError? = nil
@State private var zipFilePath: URL?
@ -69,36 +34,13 @@ struct SupportButtonView: View {
var body: some View {
Group {
switch supportButtonType {
case .sharingRequest:
Button("Nous contacter") {
_zip()
}
case .supervisorRequest:
if showIcon {
Button("Demande d'ajout de superviseur", systemImage: "person.badge.plus") {
_zip()
}
.labelStyle(.iconOnly)
} else {
Button("Demande d'ajout de superviseur") {
_zip()
}
}
case .contentIsUnavailable:
if contentIsUnavailable {
FooterButtonView("Besoin d'aide ? Un problème ? Contactez-nous !") {
_zip()
}
case .bugReport:
if showIcon {
Button("Signaler un problème", systemImage: "square.and.pencil") {
_zip()
}
.labelStyle(.titleAndIcon)
} else {
Button("Signaler un problème") {
_zip()
}
} else {
Button("Signaler un problème") {
_zip()
}
}
}
@ -132,14 +74,14 @@ struct SupportButtonView: View {
private func _getSubject() -> String {
let device = UIDevice.current
let iOSVersion = device.systemVersion
return "[\(PadelClubApp.appVersion), \(iOSVersion), \(_getDeviceIdentifier())] \(supportButtonType.localizedTopic)"
return "[\(PadelClubApp.appVersion), \(iOSVersion), \(_getDeviceIdentifier())] Support Padel Club"
}
private func _getBody() -> String {
let separator = "---------------------------------------------"
let token = try? StoreCenter.main.token()
return [supportButtonType.localizedPrefix, "\n\n\n", separator, "token", token ?? "", separator, "userId", StoreCenter.main.userId, separator, "dataStore userId", DataStore.shared.user.id].compacted().joined(separator: "\n")
return ["Décrivez votre problème", "\n\n\n", separator, "token", token ?? "", separator, "userId", StoreCenter.main.userId, separator, "dataStore userId", DataStore.shared.user.id].compacted().joined(separator: "\n")
}
private func _getDeviceIdentifier() -> String {
@ -154,17 +96,9 @@ struct SupportButtonView: View {
}
private func _zip() {
var urls: [URL] = []
if let dir: URL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first {
urls.append(dir.appending(path: "appsettings.json"))
urls.append(dir.appending(path: "settings.json"))
urls.append(dir.appending(path: "storage"))
}
do {
// let filePath = try StoreCenter.main.directoryURL()
self.zipFilePath = try Zip.quickZipFiles(urls, fileName: "backup") // Zip
let filePath = try StoreCenter.main.directoryURL()
self.zipFilePath = try Zip.quickZipFiles([filePath], fileName: "backup") // Zip
} catch {
Logger.error(error)
}

@ -47,8 +47,6 @@ struct TournamentFilterView: View {
} label: {
Text("En semaine ou week-end")
}
WeekdayselectionView(weekdays: $federalDataViewModel.weekdays)
}
Section {

@ -31,7 +31,6 @@ struct EditingTeamView: View {
@State private var registrationDateModified: Date
@State private var uniqueRandomIndex: Int
@State private var isDeleting: Bool = false
@State private var showPaymentLinkManager: Bool = false
var messageSentFailed: Binding<Bool> {
Binding {
@ -89,57 +88,8 @@ struct EditingTeamView: View {
team.uniqueRandomIndex = 0
}
var hasRegisteredOnline: Binding<Bool> {
Binding {
team.hasRegisteredOnline()
} set: { hasRegisteredOnline in
let players = team.players()
players.forEach { player in
player.registeredOnline = hasRegisteredOnline
}
tournamentStore?.playerRegistrations.addOrUpdate(contentOfs: players)
}
}
var body: some View {
List {
#if PRODTEST
if let pid = team.players().first(where: { $0.paymentId != nil })?.paymentId {
Section {
Text(pid)
} footer: {
CopyPasteButtonView(pasteValue: pid)
}
}
// } else {
// if let paste = UIPasteboard.general.string {
// RowButtonView("Coller le payment id de l'équipe", role: .destructive) {
// let p = team.players()
// p.forEach { player in
// player.paymentId = UIPasteboard.general.string
// player.paymentType = .creditCard
// }
// team.tournamentStore?.playerRegistrations.addOrUpdate(contentOfs: p)
// }
// }
// }
// } footer: {
// if let paste = UIPasteboard.general.string {
// Text(paste)
// }
// }
#endif
Section {
NavigationLink {
TeamMatchesView(team: team)
} label: {
Text("Voir les matchs de l'équipe")
}
}
Section {
RowButtonView("Modifier la composition de l'équipe", role: (team.hasRegisteredOnline() || team.hasPaidOnline()) ? .destructive : .none, confirmationMessage: "Vous êtes sur le point de modifier une équipe qui s'est inscrite en ligne.") {
editedTeam = team
@ -153,7 +103,7 @@ struct EditingTeamView: View {
}
} footer: {
HStack {
CopyPasteButtonView(pasteValue: team.playersPasteData(type: .sharing))
CopyPasteButtonView(pasteValue: team.playersPasteData())
Spacer()
if team.isWildCard(), team.unsortedPlayers().isEmpty {
TeamPickerView(pickTypeContext: .wildcard) { teamregistration in
@ -176,10 +126,11 @@ struct EditingTeamView: View {
}
.headerProminence(.increased)
if team.hasRegisteredOnline() || team.hasPaidOnline() || tournament.enableOnlineRegistration {
if team.hasRegisteredOnline() || team.hasPaidOnline() {
Section {
Toggle(isOn: hasRegisteredOnline) {
LabeledContent {
Text(team.hasRegisteredOnline() ? "Oui" : "Non")
} label: {
Text("Inscrits en ligne")
}
@ -189,14 +140,6 @@ struct EditingTeamView: View {
} label: {
Text("Payé en ligne")
}
if team.hasPaidOnline() == false {
#if PRODTEST
Button("Récupérer le lien de paiement") {
showPaymentLinkManager = true
}
#endif
}
}
if let refundMessage, refundMessage.isEmpty == false {
@ -217,8 +160,6 @@ struct EditingTeamView: View {
} footer: {
if team.hasPaidOnline() {
Text("Le remboursement passe part le service de Stripe qui re-crédite le moyen de paiement utilisé du montant payé.")
} else {
PaymentRequestButton(teamRegistration: team)
}
}
}
@ -245,12 +186,6 @@ struct EditingTeamView: View {
Text("Équipe sur place")
}
}
NavigationLink {
CallMenuOptionsView(team: team)
.environment(tournament)
} label: {
Text("Modifier la convocation")
}
}
Section {
@ -274,6 +209,11 @@ struct EditingTeamView: View {
Text(registrationDateModified.localizedWeekDay().capitalized)
}
}
#if DEBUG
.disabled(false)
#else
.disabled(team.hasPaidOnline() || team.hasRegisteredOnline())
#endif
Toggle(isOn: $wildCardBracket) {
Text("Wildcard Tableau")
@ -369,11 +309,6 @@ struct EditingTeamView: View {
}
}
}
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
$0.navigationSubtitle(tournament.tournamentTitle())
}
}
.alert("Attention", isPresented: hasChanged, actions: {
Button("Confirmer") {
if walkOut == false && team.walkOut == true {
@ -463,19 +398,6 @@ struct EditingTeamView: View {
}
.tint(.master)
}
.sheet(isPresented: $showPaymentLinkManager) {
NavigationStack {
PaymentLinkManagerView(teamRegistration: team)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("Fermer") {
showPaymentLinkManager = false
}
}
}
}
}
.fullScreenCover(item: $editedTeam) { editedTeam in
NavigationStack {
AddTeamView(tournament: tournament, editedTeam: editedTeam)

@ -1,268 +0,0 @@
//
// PaymentLinkManagerView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 16/10/2025.
//
//
// PaymentLinkManagerView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 01/10/2025.
//
import SwiftUI
import PadelClubData
struct PaymentLinkManagerView: View {
let teamRegistration: TeamRegistration
@State private var isLoading = false
@State private var showAlert = false
@State private var alertMessage = ""
@State private var paymentLink: String?
@State private var showCopiedConfirmation = false
var body: some View {
VStack(spacing: 20) {
// Header
header
// Get Payment Link Button
getPaymentLinkButton
// Payment Link Display and Actions
if let link = paymentLink {
paymentLinkSection(link: link)
}
Spacer()
}
.padding()
.alert("Erreur", isPresented: $showAlert) {
Button("OK") { }
} message: {
Text(alertMessage)
}
}
// MARK: - ViewBuilder Components
@ViewBuilder
private var header: some View {
VStack(spacing: 8) {
Image(systemName: "creditcard.circle.fill")
.font(.system(size: 50))
.foregroundColor(.blue)
Text("Lien de paiement")
.font(.title2)
.fontWeight(.bold)
Text("Obtenez un lien de paiement à partager avec l'équipe")
.font(.subheadline)
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
}
}
@ViewBuilder
private var getPaymentLinkButton: some View {
Button {
getPaymentLink()
} label: {
HStack {
if isLoading {
ProgressView()
.progressViewStyle(CircularProgressViewStyle())
.tint(.white)
} else {
Image(systemName: "link.circle")
}
Text(paymentLink == nil ? "Obtenir le lien de paiement" : "Régénérer le lien")
}
.frame(maxWidth: .infinity)
.padding()
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(12)
}
.disabled(isLoading)
}
@ViewBuilder
private func paymentLinkSection(link: String) -> some View {
VStack(spacing: 16) {
// Success message
HStack {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green)
Text("Lien copié dans le presse-papiers!")
.font(.subheadline)
.foregroundColor(.green)
}
.padding(.vertical, 8)
.padding(.horizontal, 12)
.background(Color.green.opacity(0.1))
.cornerRadius(8)
// Link display
linkDisplayView(link: link)
// Action buttons
actionButtons(link: link)
}
.transition(.move(edge: .top).combined(with: .opacity))
.animation(.spring(response: 0.6, dampingFraction: 0.8), value: paymentLink)
}
@ViewBuilder
private func linkDisplayView(link: String) -> some View {
VStack(alignment: .leading, spacing: 8) {
Text("Lien de paiement:")
.font(.caption)
.fontWeight(.semibold)
.foregroundColor(.secondary)
ScrollView(.horizontal, showsIndicators: false) {
Text(link)
.font(.system(.caption, design: .monospaced))
.padding(12)
.background(Color.gray.opacity(0.1))
.cornerRadius(8)
}
}
}
@ViewBuilder
private func actionButtons(link: String) -> some View {
VStack(spacing: 12) {
// Copy button
copyButton(link: link)
// Share button
shareButton(link: link)
// Open in browser button
openInBrowserButton(link: link)
}
}
@ViewBuilder
private func copyButton(link: String) -> some View {
Button {
UIPasteboard.general.string = link
showCopiedConfirmation = true
// Haptic feedback
let generator = UINotificationFeedbackGenerator()
generator.notificationOccurred(.success)
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
showCopiedConfirmation = false
}
} label: {
HStack {
Image(systemName: showCopiedConfirmation ? "checkmark.circle.fill" : "doc.on.doc.fill")
Text(showCopiedConfirmation ? "Copié !" : "Copier le lien")
.fontWeight(.semibold)
}
.frame(maxWidth: .infinity)
.padding()
.background(showCopiedConfirmation ? Color.green : Color.blue.opacity(0.1))
.foregroundColor(showCopiedConfirmation ? .white : .blue)
.cornerRadius(10)
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(showCopiedConfirmation ? Color.green : Color.blue, lineWidth: 1)
)
}
.disabled(showCopiedConfirmation)
.animation(.easeInOut(duration: 0.2), value: showCopiedConfirmation)
}
@ViewBuilder
private func shareButton(link: String) -> some View {
ShareLink(item: link) {
HStack {
Image(systemName: "square.and.arrow.up.fill")
Text("Partager le lien")
.fontWeight(.semibold)
}
.frame(maxWidth: .infinity)
.padding()
.background(Color.blue.opacity(0.1))
.foregroundColor(.blue)
.cornerRadius(10)
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.blue, lineWidth: 1)
)
}
}
@ViewBuilder
private func openInBrowserButton(link: String) -> some View {
Button {
if let url = URL(string: link) {
UIApplication.shared.open(url)
}
} label: {
HStack {
Image(systemName: "safari.fill")
Text("Ouvrir dans Safari")
.fontWeight(.semibold)
}
.frame(maxWidth: .infinity)
.padding()
.background(Color.blue.opacity(0.1))
.foregroundColor(.blue)
.cornerRadius(10)
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.blue, lineWidth: 1)
)
}
}
// MARK: - Private Methods
private func getPaymentLink() {
isLoading = true
showCopiedConfirmation = false
Task {
do {
let response = try await PaymentService.getPaymentLink(
teamRegistrationId: teamRegistration.id
)
await MainActor.run {
isLoading = false
if response.success, let link = response.paymentLink {
paymentLink = link
// Automatically copy to clipboard
UIPasteboard.general.string = link
// Haptic feedback
let generator = UINotificationFeedbackGenerator()
generator.notificationOccurred(.success)
} else {
alertMessage = response.message ?? "Impossible d'obtenir le lien de paiement"
showAlert = true
}
}
} catch {
await MainActor.run {
isLoading = false
alertMessage = "Erreur lors de la récupération du lien"
showAlert = true
}
}
}
}
}
#Preview {
PaymentLinkManagerView(teamRegistration: TeamRegistration())
}

@ -1,51 +0,0 @@
//
// PaymentRequestButton.swift
// PadelClub
//
// Created by Razmig Sarkissian on 01/10/2025.
//
import SwiftUI
import PadelClubData
struct PaymentRequestButton: View {
let teamRegistration: TeamRegistration
@State private var isLoading = false
@State private var showAlert = false
@State private var alertMessage = ""
var body: some View {
FooterButtonView("Renvoyer l'email de paiement", role: .destructive, confirmationMessage: "Cette action permet de renvoyer le mail de confirmation de sélection de l'équipe incluant la demande du paiement.") {
resendEmail()
}
.disabled(isLoading)
.alert("Résultat", isPresented: $showAlert) {
Button("OK") { }
} message: {
Text(alertMessage)
}
}
private func resendEmail() {
isLoading = true
Task {
do {
let response = try await PaymentService.resendPaymentEmail(
teamRegistrationId: teamRegistration.id
)
await MainActor.run {
isLoading = false
alertMessage = response.message
showAlert = true
}
} catch {
await MainActor.run {
isLoading = false
alertMessage = "Erreur lors de l'envoi"
showAlert = true
}
}
}
}
}

@ -1,24 +0,0 @@
class PaymentService {
static func resendPaymentEmail(teamRegistrationId: String) async throws -> SimpleResponse {
let service = try StoreCenter.main.service()
let urlRequest = try service._baseRequest(
servicePath: "resend-payment-email/\(teamRegistrationId)/",
method: .post,
requiresToken: true
)
let (data, response) = try await URLSession.shared.data(for: urlRequest)
guard let httpResponse = response as? HTTPURLResponse,
httpResponse.statusCode == 200 else {
throw PaymentError.requestFailed
}
return try JSON.decoder.decode(SimpleResponse.self, from: data)
}
}
struct SimpleResponse: Codable {
let success: Bool
let message: String
}

@ -1,52 +0,0 @@
//
// TeamMatchesView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 16/10/2025.
//
import SwiftUI
import LeStorage
import PadelClubData
struct TeamMatchesView: View {
let team: TeamRegistration
var body: some View {
List {
Section {
TeamRowView(team: team)
}
let followingMatches = team.followingMatches()
if let currentMatch = team.currentMatch() {
Section {
MatchRowView(match: currentMatch)
} header: {
Text("Match en cours")
}
} else if let numbers = team.numberOfRotation(in: followingMatches) {
Section {
Text("Joue dans \(numbers.0) rotation\(numbers.0.pluralSuffix)")
Text("Joue dans \(numbers.1) terrain\(numbers.1.pluralSuffix) disponible\(numbers.1.pluralSuffix)")
} footer: {
Text("Indique dans combien de rotations ou terrains disponible cette équipe est sensée jouer.")
}
}
if followingMatches.isEmpty == false {
Section {
ForEach(followingMatches) { match in
MatchRowView(match: match)
}
} header: {
Text("Tous les matchs")
}
} else {
ContentUnavailableView("Aucun match à venir", systemImage: "calendar.badge.exclamation", description: Text("Il n’y a pas de matchs prévus pour cette équipe."))
}
}
.navigationTitle("Liste des matchs")
}
}

@ -90,7 +90,7 @@ struct TeamRestingView: View {
let allMatches = tournament.allMatches()
let matchesLeft = Tournament.matchesLeft(allMatches)
let runningMatches = Tournament.runningMatches(allMatches)
let readyMatches = Tournament.readyMatches(allMatches, runningMatches: runningMatches)
let readyMatches = Tournament.readyMatches(allMatches)
self.readyMatches = Tournament.availableToStart(readyMatches, in: runningMatches, checkCanPlay: false)
self.matchesLeft = matchesLeft
self.teams = tournament.selectedSortedTeams().filter({ $0.restingTime() != nil }).sorted(by: \.restingTimeForSorting)

@ -101,7 +101,7 @@ struct ConsolationTournamentImportView: View {
Picker(selection: $selectedTournament) {
Text("Aucun tournoi").tag(nil as Tournament?)
ForEach(tournaments) { tournament in
TournamentCellView(tournament: tournament, displayContext: .selection).tag(tournament)
TournamentCellView(tournament: tournament).tag(tournament)
}
} label: {
if selectedTournament == nil {
@ -218,8 +218,8 @@ struct ConsolationTournamentImportView: View {
case .losers:
if selectedGroupStagePosition.isEmpty {
return $0.qualified == false
} else if let position = $0.groupStageObject()?.finalPosition(ofTeam: $0) {
return $0.qualified == false && selectedGroupStagePosition.contains(position + 1)
} else if let position = $0.groupStagePosition {
return $0.qualified == false && selectedGroupStagePosition.contains(position)
} else {
return $0.qualified == false
}

@ -231,7 +231,6 @@ struct AddTeamView: View {
.disabled(_limitPlayerCount())
.foregroundStyle(.master)
.labelStyle(.titleAndIcon)
.frame(maxWidth: .infinity)
.buttonBorderShape(.capsule)
}
}
@ -462,7 +461,6 @@ struct AddTeamView: View {
self.editableTextField = pasteString
self.focusedField = nil
}
.buttonStyle(.borderedProminent)
Spacer()
Button("Chercher") {
if editableTextField.count > 1 {
@ -472,7 +470,7 @@ struct AddTeamView: View {
self.displayWarningNotEnoughCharacter = true
}
}
.buttonStyle(.borderedProminent)
.buttonStyle(.bordered)
}
}
} header: {

@ -84,24 +84,6 @@ struct BroadcastView: View {
.tipStyle(tint: nil)
}
if let shareURL = tournament.shareURL(.info) {
Section {
Link(destination: shareURL) {
Text(shareURL.absoluteString)
}
} header: {
Text("Page d'information")
} footer: {
HStack {
CopyPasteButtonView(pasteValue: shareURL.absoluteString)
Spacer()
ShareLink(item: shareURL) {
Label("Partager", systemImage: "square.and.arrow.up")
}
}
}
}
if let url = tournament.shareURL(.clubBroadcast) {
Section {
Link(destination: url) {
@ -131,21 +113,6 @@ struct BroadcastView: View {
}
}
Section {
let links : [PageLink] = [.info, .teams, .summons, .groupStages, .matches, .rankings, .broadcast, .clubBroadcast]
Picker(selection: $pageLink) {
ForEach(links) { pageLink in
Text(pageLink.localizedLabel()).tag(pageLink)
}
} label: {
Text("Page à partager")
}
.pickerStyle(.menu)
actionForURL(title: "Partager la page '" + pageLink.localizedLabel() + "'", url: tournament.shareURL(pageLink))
} header: {
Text("Lien du tournoi à partager")
}
if tournament.isPrivate == false {
Section {
@ -333,9 +300,24 @@ struct BroadcastView: View {
}
}
.toolbar(content: {
if StoreCenter.main.userId != nil, tournament.club() != nil {
if StoreCenter.main.userId != nil, tournament.isPrivate == false, tournament.club() != nil {
ToolbarItem(placement: .topBarTrailing) {
Menu {
Section {
let links : [PageLink] = [.info, .teams, .summons, .groupStages, .matches, .rankings, .broadcast, .clubBroadcast]
Picker(selection: $pageLink) {
ForEach(links) { pageLink in
Text(pageLink.localizedLabel()).tag(pageLink)
}
} label: {
Text("Choisir la page à partager")
}
.pickerStyle(.menu)
actionForURL(title: "Partager la page '" + pageLink.localizedLabel() + "'", url: tournament.shareURL(pageLink))
} header: {
Text("Lien du tournoi à partager")
}
#if DEBUG
Section {
actionForURL(title: "La Boutique", url: URLs.main.url.appending(path: "shop"))
@ -362,11 +344,6 @@ struct BroadcastView: View {
})
.headerProminence(.increased)
.navigationTitle("Publication")
.ifAvailableiOS26 {
if #available(iOS 26.0, *) {
$0.navigationSubtitle(tournament.tournamentTitle())
}
}
.navigationBarTitleDisplayMode(.inline)
.toolbarBackground(.visible, for: .navigationBar)
.sheet(item: $urlToShow) { urlToShow in

@ -1,240 +0,0 @@
//
// HeadManagerView.swift
// PadelClub
//
// Created by Razmig Sarkissian on 09/10/2025.
//
import SwiftUI
import LeStorage
import PadelClubData
struct HeadManagerView: View {
@EnvironmentObject private var dataStore: DataStore
@Environment(\.dismiss) var dismiss
let teamsInBracket: Int
let heads: Int
let initialSeedRepartition: [Int]?
let result: ([Int]) -> Void
@State private var seedRepartition: [Int]
@State private var selectedSeedRound: Int? = nil
init(teamsInBracket: Int, heads: Int, initialSeedRepartition: [Int], result: @escaping ([Int]) -> Void) {
self.teamsInBracket = teamsInBracket
self.heads = heads
self.initialSeedRepartition = initialSeedRepartition
self.result = result
if initialSeedRepartition.isEmpty == false {
_seedRepartition = .init(wrappedValue: initialSeedRepartition)
_selectedSeedRound = .init(wrappedValue: initialSeedRepartition.firstIndex(where: { $0 > 0 }))
} else {
let seedRepartition = Self.place(heads: heads, teamsInBracket: teamsInBracket, initialSeedRound: nil)
_seedRepartition = .init(wrappedValue: seedRepartition)
_selectedSeedRound = .init(wrappedValue: seedRepartition.firstIndex(where: { $0 > 0 }))
}
}
static func leftToPlace(heads: Int, teamsPerRound: [Int]) -> Int {
let re = heads - teamsPerRound.reduce(0, +)
return re
}
static func place(heads: Int, teamsInBracket: Int, initialSeedRound: Int?) -> [Int] {
var teamsPerRound: [Int] = []
let dimension = RoundRule.teamsInFirstRound(forTeams: teamsInBracket)
/*
si 32 = 32, ok si N < 32 alors on mets le max en 16 - ce qui reste à mettre en 32
*/
var startingRound = RoundRule.numberOfRounds(forTeams: dimension) - 1
if let initialSeedRound, initialSeedRound > 0 {
teamsPerRound = Array(repeating: 0, count: initialSeedRound)
startingRound = initialSeedRound
} else {
if dimension != teamsInBracket {
startingRound -= 1
}
if startingRound > 0 {
teamsPerRound = Array(repeating: 0, count: startingRound)
} else {
teamsPerRound = []
}
}
while leftToPlace(heads: heads, teamsPerRound: teamsPerRound) > 0 {
// maxAssignable: On retire toutes les équipes placées dans les tours précédents, pondérées par leur propagation (puissance du tour)
let alreadyPut = teamsPerRound.reduce(0, +)
let headsLeft = heads - alreadyPut
// Calculate how many teams from previous rounds propagate to this round
let currentRound = teamsPerRound.count
var previousTeams = 0
for (i, teams) in teamsPerRound.enumerated() {
previousTeams += teams * (1 << (currentRound - i))
}
let totalAvailable = RoundRule.numberOfMatches(forRoundIndex: currentRound) * 2
let maxAssignable = max(0, totalAvailable - previousTeams)
var valueToAppend = min(max(0, headsLeft), maxAssignable)
if headsLeft - maxAssignable > 0 {
let theory = valueToAppend - (headsLeft - maxAssignable)
if theory > 0 && maxAssignable - theory == 0 {
valueToAppend = theory
} else {
let lastValue = teamsPerRound.last ?? 0
var newValueToAppend = theory == 0 ? maxAssignable / 2 : theory
if theory > maxAssignable || theory < 0 {
newValueToAppend = valueToAppend / 2
}
valueToAppend = lastValue > 0 ? lastValue : newValueToAppend
}
}
teamsPerRound.append(valueToAppend)
}
return teamsPerRound
}
var leftToPlace: Int {
Self.leftToPlace(heads: heads, teamsPerRound: seedRepartition)
}
var body: some View {
List {
Section {
Picker(selection: $selectedSeedRound) {
Text("Choisir").tag(nil as Int?)
ForEach(seedRepartition.indices, id: \.self) { idx in
Text(RoundRule.roundName(fromRoundIndex: idx, displayStyle: .short)).tag(idx)
}
} label: {
Text("Tour de la tête de série n°1")
}
.onChange(of: selectedSeedRound) {
seedRepartition = Self.place(heads: heads, teamsInBracket: teamsInBracket, initialSeedRound: selectedSeedRound)
}
}
Section {
LabeledContent {
Text(heads.formatted())
} label: {
Text("Équipes à placer en tableau")
}
if (teamsInBracket - heads) > 0 {
LabeledContent {
Text((teamsInBracket - heads).formatted())
} label: {
Text("Qualifiés entrants")
}
}
LabeledContent {
Text(leftToPlace.formatted())
} label: {
Text("Restant à placer")
}
LabeledContent {
let matchCount = seedRepartition.enumerated().map { (index, value) in
var result = 0
var count = value
if count == 0, let selectedSeedRound, index < selectedSeedRound {
let t = RoundRule.numberOfMatches(forRoundIndex: index)
result = RoundRule.cumulatedNumberOfMatches(forTeams: t * 2)
} else {
if index == seedRepartition.count - 1 {
count += (teamsInBracket - heads)
} else if index == seedRepartition.count - 2 {
count += ((seedRepartition[index + 1] + (teamsInBracket - heads)) / 2)
} else {
count += (seedRepartition[index + 1])
}
result = RoundRule.cumulatedNumberOfMatches(forTeams: count)
}
// print(index, value, result, count)
return result
}
.reduce(0, +)
Text(matchCount.formatted())
} label: {
Text("Matchs estimés")
}
}
Section {
//
// LabeledContent {
// StepperView(count: $initialSeedCount, minimum: 0, maximum: RoundRule.numberOfMatches(forRoundIndex: initialSeedRound))
// } label: {
// Text("Nombre de tête de série")
// }
//
ForEach(seedRepartition.sorted().indices, id: \.self) { index in
SeedStepperRowView(count: $seedRepartition[index], roundIndex: index, max: leftToPlace + seedRepartition[index])
}
}
if leftToPlace > 0 {
RowButtonView("Ajouter une manche") {
while leftToPlace > 0 {
let headsLeft = heads - seedRepartition.reduce(0, +)
let lastValue = seedRepartition.last ?? 0
let maxAssignable = RoundRule.numberOfMatches(forRoundIndex: seedRepartition.count - 1) * 2 - lastValue
var valueToAppend = min(max(0, headsLeft), maxAssignable * 2)
if headsLeft - maxAssignable > 0 {
valueToAppend = valueToAppend - (headsLeft - maxAssignable)
}
// print("Appending to seedRepartition: headsLeft=\(headsLeft), maxAssignable=\(maxAssignable), valueToAppend=\(valueToAppend), current seedRepartition=\(seedRepartition)")
seedRepartition.append(valueToAppend)
}
}
}
}
.navigationTitle("Répartition")
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
ButtonValidateView(title: "Valider") {
self.result(seedRepartition)
dismiss()
}
}
ToolbarItem(placement: .topBarLeading) {
Button("Annuler") {
dismiss()
}
}
}
// .onChange(of: seedRepartition) { old, new in
// if modifiyingSeedRound == false {
// let minCount = min(old.count, new.count)
// if let idx = (0..<minCount).first(where: { old[$0] > new[$0] }) {
// seedRepartition = Array(new.prefix(idx+1))
// }
// }
// }
}
}
private struct SeedStepperRowView: View {
@Binding var count: Int
var roundIndex: Int
var max: Int
var body: some View {
LabeledContent {
HStack {
StepperView(count: $count, minimum: 0, maximum: min(RoundRule.numberOfMatches(forRoundIndex: roundIndex) * 2, max))
}
} label: {
Text("Équipes en \(RoundRule.roundName(fromRoundIndex: roundIndex))")
}
}
}

@ -9,25 +9,12 @@ import SwiftUI
import PadelClubData
struct TournamentFormatSelectionView: View {
@EnvironmentObject var dataStore: DataStore
@Environment(Tournament.self) private var tournament: Tournament
@State private var globalFormat: MatchFormat = DataStore.shared.user.bracketMatchFormatPreference ?? .nineGamesDecisivePoint
@ViewBuilder
var body: some View {
@Bindable var tournament = tournament
Section {
MatchTypeSelectionView(selectedFormat: $globalFormat, format: "Tout")
.onChange(of: globalFormat) { oldValue, newValue in
tournament.matchFormat = newValue
tournament.loserBracketMatchFormat = newValue
tournament.groupStageMatchFormat = newValue
}
} footer: {
Text("Modifier le format de tous les types de matchs")
}
Section {
MatchTypeSelectionView(selectedFormat: $tournament.groupStageMatchFormat, format: "Poule", additionalEstimationDuration: tournament.additionalEstimationDuration)
MatchTypeSelectionView(selectedFormat: $tournament.matchFormat, format: "Tableau", additionalEstimationDuration: tournament.additionalEstimationDuration)

@ -217,76 +217,78 @@ struct TournamentGeneralSettingsView: View {
.toolbarBackground(.visible, for: .navigationBar)
.toolbar {
if focusedField != nil {
ToolbarItemGroup(placement: .keyboard) {
if focusedField == ._entryFee {
if tournament.isFree() {
ForEach(priceTags, id: \.self) { priceTag in
Button(priceTag.formatted(.currency(code: tournament.defaultCurrency()).precision(.fractionLength(0)))) {
entryFee = priceTag
tournament.entryFee = priceTag
ToolbarItem(placement: .keyboard) {
HStack {
if focusedField == ._entryFee {
if tournament.isFree() {
ForEach(priceTags, id: \.self) { priceTag in
Button(priceTag.formatted(.currency(code: tournament.defaultCurrency()).precision(.fractionLength(0)))) {
entryFee = priceTag
tournament.entryFee = priceTag
focusedField = nil
}
.buttonStyle(.bordered)
}
} else {
Button("Gratuit") {
entryFee = nil
tournament.entryFee = nil
focusedField = nil
}
.buttonStyle(.borderedProminent)
.buttonStyle(.bordered)
}
} else if focusedField == ._clubMemberFeeDeduction {
ForEach(deductionTags, id: \.self) { deductionTag in
Button(deductionTag.formatted(.currency(code: tournament.defaultCurrency()).precision(.fractionLength(0)))) {
clubMemberFeeDeduction = deductionTag
tournament.clubMemberFeeDeduction = deductionTag
focusedField = nil
}
.buttonStyle(.bordered)
}
} else {
Button("Gratuit") {
entryFee = nil
tournament.entryFee = nil
clubMemberFeeDeduction = entryFee
tournament.clubMemberFeeDeduction = clubMemberFeeDeduction
focusedField = nil
}
.buttonStyle(.borderedProminent)
}
} else if focusedField == ._clubMemberFeeDeduction {
ForEach(deductionTags, id: \.self) { deductionTag in
Button(deductionTag.formatted(.currency(code: tournament.defaultCurrency()).precision(.fractionLength(0)))) {
clubMemberFeeDeduction = deductionTag
tournament.clubMemberFeeDeduction = deductionTag
focusedField = nil
.buttonStyle(.bordered)
} else {
if focusedField == ._name, tournamentName.isEmpty == false {
Button("Effacer") {
tournament.name = nil
tournamentName = ""
}
.buttonStyle(.borderless)
} else if focusedField == ._information, tournamentInformation.isEmpty == false {
Button("Effacer") {
tournament.information = nil
tournamentInformation = ""
}
.buttonStyle(.borderless)
} else if focusedField == ._umpireCustomMail, umpireCustomMail.isEmpty == false {
Button("Effacer") {
_deleteUmpireMail()
}
.buttonStyle(.borderless)
} else if focusedField == ._umpireCustomPhone, umpireCustomPhone.isEmpty == false {
Button("Effacer") {
_deleteUmpirePhone()
}
.buttonStyle(.borderless)
} else if focusedField == ._umpireCustomContact, umpireCustomContact.isEmpty == false {
Button("Effacer") {
_deleteUmpireContact()
}
.buttonStyle(.borderless)
}
.buttonStyle(.borderedProminent)
}
Button("Gratuit") {
clubMemberFeeDeduction = entryFee
tournament.clubMemberFeeDeduction = clubMemberFeeDeduction
Spacer()
Button("Valider") {
focusedField = nil
}
.buttonStyle(.borderedProminent)
} else {
if focusedField == ._name, tournamentName.isEmpty == false {
Button("Effacer") {
tournament.name = nil
tournamentName = ""
}
.buttonStyle(.borderless)
} else if focusedField == ._information, tournamentInformation.isEmpty == false {
Button("Effacer") {
tournament.information = nil
tournamentInformation = ""
}
.buttonStyle(.borderedProminent)
} else if focusedField == ._umpireCustomMail, umpireCustomMail.isEmpty == false {
Button("Effacer") {
_deleteUmpireMail()
}
.buttonStyle(.borderedProminent)
} else if focusedField == ._umpireCustomPhone, umpireCustomPhone.isEmpty == false {
Button("Effacer") {
_deleteUmpirePhone()
}
.buttonStyle(.borderedProminent)
} else if focusedField == ._umpireCustomContact, umpireCustomContact.isEmpty == false {
Button("Effacer") {
_deleteUmpireContact()
}
.buttonStyle(.borderedProminent)
}
}
Spacer()
Button("Valider") {
focusedField = nil
.buttonStyle(.bordered)
}
.buttonStyle(.borderedProminent)
}
}
}
@ -479,34 +481,10 @@ struct TournamentGeneralSettingsView: View {
dataStore.tournaments.addOrUpdate(instance: tournament)
}
private func _email() -> String {
if tournament.sharing == nil {
return dataStore.user.email
} else {
return "Mail"
}
}
private func _phone() -> String {
if tournament.sharing == nil {
return dataStore.user.phone ?? "Téléphone"
} else {
return "Téléphone"
}
}
private func _contact() -> String {
if tournament.sharing == nil {
return dataStore.user.fullName()
} else {
return "Contact"
}
}
private func _customUmpireView() -> some View {
Section {
VStack(alignment: .leading) {
TextField(_email(), text: $umpireCustomMail)
TextField(dataStore.user.email, text: $umpireCustomMail)
.frame(maxWidth: .infinity)
.keyboardType(.emailAddress)
.autocapitalization(.none)
@ -520,7 +498,7 @@ struct TournamentGeneralSettingsView: View {
}
VStack(alignment: .leading) {
TextField(_phone(), text: $umpireCustomPhone)
TextField(dataStore.user.phone ?? "Téléphone", text: $umpireCustomPhone)
.frame(maxWidth: .infinity)
.keyboardType(.phonePad)
.focused($focusedField, equals: ._umpireCustomPhone)
@ -534,30 +512,26 @@ struct TournamentGeneralSettingsView: View {
VStack(alignment: .leading) {
TextField(_contact(), text: $umpireCustomContact)
TextField(dataStore.user.fullName(), text: $umpireCustomContact)
.frame(maxWidth: .infinity)
.keyboardType(.default)
.focused($focusedField, equals: ._umpireCustomContact)
.onSubmit {
_confirmUmpireContact()
}
if tournament.sharing == nil, dataStore.user.getSummonsMessageSignature() != nil, umpireCustomContact != dataStore.user.fullName() {
if dataStore.user.getSummonsMessageSignature() != nil, umpireCustomContact != dataStore.user.fullName() {
Text("Attention vous avez une signature personnalisée contenant un contact différent.").foregroundStyle(.logoRed)
FooterButtonView("retirer la personnalisation ?") {
dataStore.user.summonsMessageSignature = nil
self.dataStore.saveUser()
}
}
}
} }
} header: {
Text("Juge-arbitre")
} footer: {
if tournament.sharing == nil {
Text("Par défaut, les informations de Tenup sont récupérés, et si ce n'est pas le cas, ces informations seront utilisées pour vous contacter. Vous pouvez les modifier si vous souhaitez utiliser les informations de contact différentes de votre compte Padel Club.")
} else {
Text("Ce tournoi vous avez été partagé par un autre utilisateur. Par défaut ses informations seront utilisés pour ces champs si jamais ils restent vides.")
}
Text("Par défaut, les informations de Tenup sont récupérés, et si ce n'est pas le cas, ces informations seront utilisées pour vous contacter. Vous pouvez les modifier si vous souhaitez utiliser les informations de contact différentes de votre compte Padel Club.")
}
}
}

@ -25,8 +25,10 @@ struct TournamentMatchFormatsSettingsView: View {
var body: some View {
@Bindable var tournament = tournament
List {
RowButtonView("Modifier les matchs existants", role: .destructive) {
_updateAllFormat()
if confirmUpdate {
RowButtonView("Modifier les matchs existants", role: .destructive) {
_updateAllFormat()
}
}
TournamentFormatSelectionView()
@ -71,7 +73,6 @@ struct TournamentMatchFormatsSettingsView: View {
.deferredRendering(for: .seconds(2))
}
}
.navigationTitle("Formats")
}
private func _confirmOrSave() {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save