sync3
Laurent 5 months ago
parent d35e312c3f
commit 4ee338df6d
  1. 4
      PadelClub.xcodeproj/project.pbxproj
  2. 2
      PadelClub.xcodeproj/xcshareddata/xcschemes/PadelClub ProdTest.xcscheme
  3. 2
      PadelClub.xcodeproj/xcshareddata/xcschemes/PadelClub Raw.xcscheme
  4. 4
      PadelClub.xcodeproj/xcshareddata/xcschemes/PadelClub TestFlight.xcscheme
  5. 2
      PadelClub.xcodeproj/xcshareddata/xcschemes/PadelClub.xcscheme
  6. 2
      PadelClub/Views/Calling/GroupStageCallingView.swift
  7. 14
      PadelClub/Views/GroupStage/Components/GroupStageSettingsView.swift
  8. 2
      PadelClub/Views/GroupStage/Components/GroupStageTeamView.swift
  9. 2
      PadelClub/Views/GroupStage/GroupStageView.swift
  10. 6
      PadelClub/Views/GroupStage/GroupStagesSettingsView.swift

@ -3359,7 +3359,7 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 6;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
@ -3403,7 +3403,7 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 6;
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6;

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1630"
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1630"
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1630"
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
@ -31,7 +31,7 @@
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1630"
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

@ -122,7 +122,7 @@ struct GroupStageCallingView: View {
}
}
.overlay {
if groupStage.startDate == nil && groupStage.matches().filter({ $0.startDate != nil }).isEmpty {
if groupStage.startDate == nil && groupStage._matches().filter({ $0.startDate != nil }).isEmpty {
ContentUnavailableView {
Label("Aucun horaire défini", systemImage: "clock.badge.questionmark")
} description: {

@ -27,7 +27,7 @@ struct GroupStageSettingsView: View {
_groupStage = Bindable(groupStage)
_groupStageName = .init(wrappedValue: groupStage.name ?? "")
_size = .init(wrappedValue: groupStage.size)
_courtIndex = .init(wrappedValue: groupStage.matches().first?.courtIndex ?? 0)
_courtIndex = .init(wrappedValue: groupStage._matches().first?.courtIndex ?? 0)
}
var tournamentStore: TournamentStore? {
@ -66,12 +66,12 @@ struct GroupStageSettingsView: View {
Section {
CourtPicker(title: "Piste dédié", selection: $courtIndex, maxCourt: tournament.courtCount)
RowButtonView("Confirmer", role: .destructive) {
groupStage.matches().forEach { match in
groupStage._matches().forEach { match in
match.setCourt(courtIndex)
}
do {
try tournamentStore?.matches.addOrUpdate(contentOfs: groupStage.matches())
try tournamentStore?.matches.addOrUpdate(contentOfs: groupStage._matches())
} catch {
Logger.error(error)
}
@ -91,7 +91,7 @@ struct GroupStageSettingsView: View {
teams.forEach { team in
team.groupStagePosition = nil
team.groupStage = nil
groupStage.matches().forEach({ $0.updateTeamScores() })
groupStage._matches().forEach({ $0.updateTeamScores() })
}
do {
try tournamentStore?.teamRegistrations.addOrUpdate(contentOfs: teams)
@ -111,13 +111,13 @@ struct GroupStageSettingsView: View {
Section {
RowButtonView("Retirer tous les horaires", role: .destructive) {
groupStage.matches().forEach { match in
groupStage._matches().forEach { match in
match.startDate = nil
match.endDate = nil
}
do {
try tournamentStore?.matches.addOrUpdate(contentOfs: groupStage.matches())
try tournamentStore?.matches.addOrUpdate(contentOfs: groupStage._matches())
} catch {
Logger.error(error)
}
@ -130,7 +130,7 @@ struct GroupStageSettingsView: View {
teams.forEach { team in
team.groupStagePosition = nil
team.groupStage = nil
groupStage.matches().forEach({ $0.updateTeamScores() })
groupStage._matches().forEach({ $0.updateTeamScores() })
}
do {
try tournamentStore?.teamRegistrations.addOrUpdate(contentOfs: teams)

@ -103,7 +103,7 @@ struct GroupStageTeamView: View {
team.groupStagePosition = nil
team.groupStage = nil
_save()
groupStage.matches().forEach({ $0.updateTeamScores() })
groupStage._matches().forEach({ $0.updateTeamScores() })
}
}

@ -245,7 +245,7 @@ struct GroupStageView: View {
print(team.pasteData())
team.groupStage = groupStage.id
team.groupStagePosition = index
groupStage.matches().forEach({ $0.updateTeamScores() })
groupStage._matches().forEach({ $0.updateTeamScores() })
do {
try tournamentStore?.teamRegistrations.addOrUpdate(instance: team)
} catch {

@ -144,8 +144,8 @@ struct GroupStagesSettingsView: View {
Section {
RowButtonView("Retirer tous les horaires", role: .destructive) {
let matches = tournament.groupStages().flatMap({ $0.matches() })
tournament.groupStages().flatMap({ $0.matches() }).forEach { match in
let matches = tournament.groupStages().flatMap({ $0._matches() })
tournament.groupStages().flatMap({ $0._matches() }).forEach { match in
match.startDate = nil
match.endDate = nil
}
@ -239,7 +239,7 @@ struct GroupStagesSettingsView: View {
teams.forEach { team in
team.groupStagePosition = nil
team.groupStage = nil
groupStage.matches().forEach({ $0.updateTeamScores() })
groupStage._matches().forEach({ $0.updateTeamScores() })
}
do {
try tournamentStore?.teamRegistrations.addOrUpdate(contentOfs: teams)

Loading…
Cancel
Save