From 92f4a37919418d36f952be7db01149dd77596905 Mon Sep 17 00:00:00 2001 From: Raz Date: Thu, 3 Apr 2025 11:09:35 +0200 Subject: [PATCH] fix base match scheduler default value --- PadelClub.xcodeproj/project.pbxproj | 24 ++++++++--------- PadelClub/Data/Gen/BaseMatchScheduler.swift | 30 ++++++++++----------- PadelClub/Data/Gen/MatchScheduler.json | 21 ++++++++++----- 3 files changed, 41 insertions(+), 34 deletions(-) diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index 53b1009..7d5de67 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3640,7 +3640,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\""; @@ -3666,7 +3666,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2.6; + MARKETING_VERSION = 1.2.7; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3686,7 +3686,7 @@ 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; @@ -3711,7 +3711,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2.6; + MARKETING_VERSION = 1.2.7; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3803,7 +3803,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\""; @@ -3829,7 +3829,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2.6; + MARKETING_VERSION = 1.2.7; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3849,7 +3849,7 @@ 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; @@ -3874,7 +3874,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2.6; + MARKETING_VERSION = 1.2.7; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3895,7 +3895,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\""; @@ -3918,7 +3918,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2.6; + MARKETING_VERSION = 1.2.7; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub.beta; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3938,7 +3938,7 @@ 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; @@ -3960,7 +3960,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2.6; + MARKETING_VERSION = 1.2.7; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub.beta; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/PadelClub/Data/Gen/BaseMatchScheduler.swift b/PadelClub/Data/Gen/BaseMatchScheduler.swift index 7c33848..cb9e3bd 100644 --- a/PadelClub/Data/Gen/BaseMatchScheduler.swift +++ b/PadelClub/Data/Gen/BaseMatchScheduler.swift @@ -13,15 +13,15 @@ class BaseMatchScheduler: BaseModelObject, Storable { var id: String = Store.randomId() var tournament: String = "" - var timeDifferenceLimit: Int = 0 + var timeDifferenceLimit: Int = 5 var loserBracketRotationDifference: Int = 0 - var upperBracketRotationDifference: Int = 0 - var accountUpperBracketBreakTime: Bool = false + var upperBracketRotationDifference: Int = 1 + var accountUpperBracketBreakTime: Bool = true var accountLoserBracketBreakTime: Bool = false - var randomizeCourts: Bool = false + var randomizeCourts: Bool = true var rotationDifferenceIsImportant: Bool = false var shouldHandleUpperRoundSlice: Bool = false - var shouldEndRoundBeforeStartingNext: Bool = false + var shouldEndRoundBeforeStartingNext: Bool = true var groupStageChunkCount: Int? = nil var overrideCourtsUnavailability: Bool = false var shouldTryToFillUpCourtsAvailable: Bool = false @@ -31,15 +31,15 @@ class BaseMatchScheduler: BaseModelObject, Storable { init( id: String = Store.randomId(), tournament: String = "", - timeDifferenceLimit: Int = 0, + timeDifferenceLimit: Int = 5, loserBracketRotationDifference: Int = 0, - upperBracketRotationDifference: Int = 0, - accountUpperBracketBreakTime: Bool = false, + upperBracketRotationDifference: Int = 1, + accountUpperBracketBreakTime: Bool = true, accountLoserBracketBreakTime: Bool = false, - randomizeCourts: Bool = false, + randomizeCourts: Bool = true, rotationDifferenceIsImportant: Bool = false, shouldHandleUpperRoundSlice: Bool = false, - shouldEndRoundBeforeStartingNext: Bool = false, + shouldEndRoundBeforeStartingNext: Bool = true, groupStageChunkCount: Int? = nil, overrideCourtsUnavailability: Bool = false, shouldTryToFillUpCourtsAvailable: Bool = false, @@ -88,15 +88,15 @@ class BaseMatchScheduler: BaseModelObject, Storable { let container = try decoder.container(keyedBy: CodingKeys.self) self.id = try container.decodeIfPresent(String.self, forKey: ._id) ?? Store.randomId() self.tournament = try container.decodeIfPresent(String.self, forKey: ._tournament) ?? "" - self.timeDifferenceLimit = try container.decodeIfPresent(Int.self, forKey: ._timeDifferenceLimit) ?? 0 + self.timeDifferenceLimit = try container.decodeIfPresent(Int.self, forKey: ._timeDifferenceLimit) ?? 5 self.loserBracketRotationDifference = try container.decodeIfPresent(Int.self, forKey: ._loserBracketRotationDifference) ?? 0 - self.upperBracketRotationDifference = try container.decodeIfPresent(Int.self, forKey: ._upperBracketRotationDifference) ?? 0 - self.accountUpperBracketBreakTime = try container.decodeIfPresent(Bool.self, forKey: ._accountUpperBracketBreakTime) ?? false + self.upperBracketRotationDifference = try container.decodeIfPresent(Int.self, forKey: ._upperBracketRotationDifference) ?? 1 + self.accountUpperBracketBreakTime = try container.decodeIfPresent(Bool.self, forKey: ._accountUpperBracketBreakTime) ?? true self.accountLoserBracketBreakTime = try container.decodeIfPresent(Bool.self, forKey: ._accountLoserBracketBreakTime) ?? false - self.randomizeCourts = try container.decodeIfPresent(Bool.self, forKey: ._randomizeCourts) ?? false + self.randomizeCourts = try container.decodeIfPresent(Bool.self, forKey: ._randomizeCourts) ?? true self.rotationDifferenceIsImportant = try container.decodeIfPresent(Bool.self, forKey: ._rotationDifferenceIsImportant) ?? false self.shouldHandleUpperRoundSlice = try container.decodeIfPresent(Bool.self, forKey: ._shouldHandleUpperRoundSlice) ?? false - self.shouldEndRoundBeforeStartingNext = try container.decodeIfPresent(Bool.self, forKey: ._shouldEndRoundBeforeStartingNext) ?? false + self.shouldEndRoundBeforeStartingNext = try container.decodeIfPresent(Bool.self, forKey: ._shouldEndRoundBeforeStartingNext) ?? true self.groupStageChunkCount = try container.decodeIfPresent(Int.self, forKey: ._groupStageChunkCount) ?? nil self.overrideCourtsUnavailability = try container.decodeIfPresent(Bool.self, forKey: ._overrideCourtsUnavailability) ?? false self.shouldTryToFillUpCourtsAvailable = try container.decodeIfPresent(Bool.self, forKey: ._shouldTryToFillUpCourtsAvailable) ?? false diff --git a/PadelClub/Data/Gen/MatchScheduler.json b/PadelClub/Data/Gen/MatchScheduler.json index 90f09d7..132bb36 100644 --- a/PadelClub/Data/Gen/MatchScheduler.json +++ b/PadelClub/Data/Gen/MatchScheduler.json @@ -19,27 +19,33 @@ }, { "name": "timeDifferenceLimit", - "type": "Int" + "type": "Int", + "defaultValue": "5" }, { "name": "loserBracketRotationDifference", - "type": "Int" + "type": "Int", + "defaultValue": "0" }, { "name": "upperBracketRotationDifference", - "type": "Int" + "type": "Int", + "defaultValue": "1" }, { "name": "accountUpperBracketBreakTime", - "type": "Bool" + "type": "Bool", + "defaultValue": "true" }, { "name": "accountLoserBracketBreakTime", - "type": "Bool" + "type": "Bool", + "defaultValue": "false" }, { "name": "randomizeCourts", - "type": "Bool" + "type": "Bool", + "defaultValue": "true" }, { "name": "rotationDifferenceIsImportant", @@ -51,7 +57,8 @@ }, { "name": "shouldEndRoundBeforeStartingNext", - "type": "Bool" + "type": "Bool", + "defaultValue": "true" }, { "name": "groupStageChunkCount",