diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueAllCoinIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/blueAllCoinIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BlueAllCoinIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/blueAllCoinIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueAllCoinIcon.imageset/Group 107 (1).png b/Sources/AllInApp/AllIn/Assets.xcassets/blueAllCoinIconR.imageset/Group 107 (1).png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BlueAllCoinIcon.imageset/Group 107 (1).png rename to Sources/AllInApp/AllIn/Assets.xcassets/blueAllCoinIconR.imageset/Group 107 (1).png diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueBadgeIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/blueBadgeIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BlueBadgeIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/blueBadgeIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueBadgeIcon.imageset/Vector.png b/Sources/AllInApp/AllIn/Assets.xcassets/blueBadgeIconR.imageset/Vector.png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BlueBadgeIcon.imageset/Vector.png rename to Sources/AllInApp/AllIn/Assets.xcassets/blueBadgeIconR.imageset/Vector.png diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BluePersonIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/bluePersonIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BluePersonIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/bluePersonIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BluePersonIcon.imageset/Group 179.png b/Sources/AllInApp/AllIn/Assets.xcassets/bluePersonIconR.imageset/Group 179.png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BluePersonIcon.imageset/Group 179.png rename to Sources/AllInApp/AllIn/Assets.xcassets/bluePersonIconR.imageset/Group 179.png diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueTrophyIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/blueTrophyIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BlueTrophyIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/blueTrophyIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueTrophyIcon.imageset/Group 210.png b/Sources/AllInApp/AllIn/Assets.xcassets/blueTrophyIconR.imageset/Group 210.png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/BlueTrophyIcon.imageset/Group 210.png rename to Sources/AllInApp/AllIn/Assets.xcassets/blueTrophyIconR.imageset/Group 210.png diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkAllCoinIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/pinkAllCoinIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkAllCoinIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkAllCoinIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkAllCoinIcon.imageset/PinkAllCoin.png b/Sources/AllInApp/AllIn/Assets.xcassets/pinkAllCoinIconR.imageset/PinkAllCoin.png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkAllCoinIcon.imageset/PinkAllCoin.png rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkAllCoinIconR.imageset/PinkAllCoin.png diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkBadgeIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/pinkBadgeIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkBadgeIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkBadgeIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkBadgeIcon.imageset/PinkBadge.png b/Sources/AllInApp/AllIn/Assets.xcassets/pinkBadgeIconR.imageset/PinkBadge.png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkBadgeIcon.imageset/PinkBadge.png rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkBadgeIconR.imageset/PinkBadge.png diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkPersonIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/pinkPersonIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkPersonIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkPersonIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkPersonIcon.imageset/UserPink.png b/Sources/AllInApp/AllIn/Assets.xcassets/pinkPersonIconR.imageset/UserPink.png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkPersonIcon.imageset/UserPink.png rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkPersonIconR.imageset/UserPink.png diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkTrophyIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/pinkTrophyIconR.imageset/Contents.json similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkTrophyIcon.imageset/Contents.json rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkTrophyIconR.imageset/Contents.json diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PinkTrophyIcon.imageset/Trophy.png b/Sources/AllInApp/AllIn/Assets.xcassets/pinkTrophyIconR.imageset/Trophy.png similarity index 100% rename from Sources/AllInApp/AllIn/Assets.xcassets/PinkTrophyIcon.imageset/Trophy.png rename to Sources/AllInApp/AllIn/Assets.xcassets/pinkTrophyIconR.imageset/Trophy.png diff --git a/Sources/AllInApp/AllIn/Components/BetCard.swift b/Sources/AllInApp/AllIn/Components/BetCard.swift index fc439bc..a00faea 100644 --- a/Sources/AllInApp/AllIn/Components/BetCard.swift +++ b/Sources/AllInApp/AllIn/Components/BetCard.swift @@ -80,7 +80,7 @@ struct BetCard_Previews: PreviewProvider { endRegisterDate: Date().addingTimeInterval(86400), endBetDate: Date().addingTimeInterval(172800), isPublic: true, - status: .FINISHED, + status: .inProgress, invited: [], author: User(username: "Imri", email: "emre.kartal@etu.uca.fr", nbCoins: 75, friends: []), registered: [])) diff --git a/Sources/AllInApp/AllIn/Components/BetLineLoading.swift b/Sources/AllInApp/AllIn/Components/BetLineLoading.swift index 95ac55d..fec31aa 100644 --- a/Sources/AllInApp/AllIn/Components/BetLineLoading.swift +++ b/Sources/AllInApp/AllIn/Components/BetLineLoading.swift @@ -33,19 +33,20 @@ struct BetLineLoading: View { } var body: some View { - GeometryReader { geometry in - VStack(alignment: .leading,spacing: 0) { - HStack(spacing: 5){ - Text("OUI") - .font(.system(size: 25)) - .fontWeight(.bold) - .foregroundColor(AllInColors.blue200) - Spacer() - Text("NON") - .font(.system(size: 25)) - .fontWeight(.bold) - .foregroundColor(AllInColors.pink100) - } + VStack(alignment: .leading, spacing: 0) { + HStack(spacing: 5) { + Text("OUI") + .font(.system(size: 25)) + .fontWeight(.bold) + .foregroundColor(AllInColors.blue200) + Spacer() + Text("NON") + .font(.system(size: 25)) + .fontWeight(.bold) + .foregroundColor(AllInColors.pink100) + } + + GeometryReader { geometry in ZStack(alignment: .leading) { HStack{ Spacer() @@ -54,7 +55,7 @@ struct BetLineLoading: View { .foregroundStyle(AllInColors.PinkBetGradiant).cornerRadius(999) } - HStack(spacing: 0){ + HStack(spacing: 0) { Rectangle() .frame(width: min(CGFloat(self.value) * geometry.size.width, geometry.size.width), height: 17) .foregroundStyle(AllInColors.BlueBetGradiant) @@ -67,101 +68,99 @@ struct BetLineLoading: View { } .padding(.bottom, 5) + } + .frame(height: 40) - HStack { - Spacer() - Text("Détails") - .textStyle(weight: .medium, color: AllInColors.primaryTextColor, size: 10) - Image(showInfos ? "chevronUpIcon" : "chevronDownIcon") - .resizable() - .frame(width: 10, height: 7) - .scaledToFill() + HStack { + Spacer() + Text("Détails") + .textStyle(weight: .medium, color: AllInColors.primaryTextColor, size: 10) + Image(showInfos ? "chevronUpIcon" : "chevronDownIcon") + .resizable() + .frame(width: 10, height: 7) + .scaledToFill() + } + .onTapGesture { + withAnimation { + showInfos.toggle() } - .onTapGesture { - withAnimation { - showInfos.toggle() + } + .padding(.bottom, 5) + .padding(.trailing, 5) + + if showInfos { + VStack(spacing: 1) { + HStack(spacing: 5) { + Image("blueAllCoinIcon") + .resizable() + .frame(width:12, height: 12) + Text(yesParticipations.reduce(0, {x,y in x + y.stake}).description) + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.blue200) + Spacer() + Text(noParticipations.reduce(0, {x,y in x + y.stake}).description) + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.pink100) + Image("pinkAllCoinIcon") + .resizable() + .frame(width: 12, height: 12) } - } - .padding(.bottom, 5) - .padding(.trailing, 5) - - if showInfos { - VStack(spacing: 1){ - HStack(spacing: 5){ - Image("blueAllCoinIcon") - .resizable() - .frame(width:12, height: 12) - Text(yesParticipations.reduce(0, {x,y in x + y.stake}).description) - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.blue200) - Spacer() - Text(noParticipations.reduce(0, {x,y in x + y.stake}).description) - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.pink100) - Image("pinkAllCoinIcon") - .resizable() - .frame(width: 12, height: 12) - - } - HStack(spacing: 5){ - Image("bluePersonIcon") - .resizable() - .frame(width: 12, height: 12) - Text(yesParticipations.count.description) - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.blue200) - Spacer() - Text(noParticipations.count.description) - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.pink100) - Image("pinkPersonIcon") - .resizable() - .frame(width: 12, height: 12) - - } - HStack(spacing: 5){ - Image("blueBadgeIcon") - .resizable() - .frame(width: 12, height: 12) - Text(yesParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0") - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.blue200) - Spacer() - Text(noParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0") - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.pink100) - Image("pinkBadgeIcon") - .resizable() - .frame(width: 12, height: 12) - - } - HStack(spacing: 5){ - Image("blueTrophyIcon") - .resizable() - .frame(width: 12, height: 12) - Text("1.2") - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.blue200) - Spacer() - Text("1.2") - .font(.system(size: 15)) - .fontWeight(.bold) - .foregroundColor(AllInColors.pink100) - Image("pinkTrophyIcon") - .resizable() - .frame(width:12, height: 12) - - } + HStack(spacing: 5){ + Image("bluePersonIcon") + .resizable() + .frame(width: 12, height: 12) + Text(yesParticipations.count.description) + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.blue200) + Spacer() + Text(noParticipations.count.description) + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.pink100) + Image("pinkPersonIcon") + .resizable() + .frame(width: 12, height: 12) + + } + HStack(spacing: 5){ + Image("blueBadgeIcon") + .resizable() + .frame(width: 12, height: 12) + Text(yesParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0") + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.blue200) + Spacer() + Text(noParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0") + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.pink100) + Image("pinkBadgeIcon") + .resizable() + .frame(width: 12, height: 12) + + } + HStack(spacing: 5){ + Image("blueTrophyIcon") + .resizable() + .frame(width: 12, height: 12) + Text("1.2") + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.blue200) + Spacer() + Text("1.2") + .font(.system(size: 15)) + .fontWeight(.bold) + .foregroundColor(AllInColors.pink100) + Image("pinkTrophyIcon") + .resizable() + .frame(width:12, height: 12) } } - Spacer() } } } diff --git a/Sources/AllInApp/AllIn/Components/ParticipateButton.swift b/Sources/AllInApp/AllIn/Components/ParticipateButton.swift index e1638db..0be07be 100644 --- a/Sources/AllInApp/AllIn/Components/ParticipateButton.swift +++ b/Sources/AllInApp/AllIn/Components/ParticipateButton.swift @@ -15,16 +15,14 @@ struct ParticipateButton: View { var bet: Bet? var isDisabled: Bool { - guard let endRegisterDate = bet?.endRegisterDate else { - return true - } - - let currentDate = Date() - - switch currentDate.compare(endRegisterDate) { - case .orderedAscending: - return false - case .orderedDescending, .orderedSame: + if let betType = bet?.status { + switch betType { + case .inProgress: + return false + default: + return true + } + } else { return true } } diff --git a/Sources/AllInApp/AllIn/ViewModels/CreationBetViewModel.swift b/Sources/AllInApp/AllIn/ViewModels/CreationBetViewModel.swift index 623d5f5..66403da 100644 --- a/Sources/AllInApp/AllIn/ViewModels/CreationBetViewModel.swift +++ b/Sources/AllInApp/AllIn/ViewModels/CreationBetViewModel.swift @@ -38,7 +38,7 @@ class CreationBetViewModel: ObservableObject { resetAllFieldErrors() if let user = AppStateContainer.shared.user { - manager.addBet(bet: toBet(theme: theme, description: description, endRegister: endRegisterDate, endBet: endBetDate, isPublic: isPublic, status: .IN_PROGRESS, creator: user, type: selectedOption)) { statusCode in + manager.addBet(bet: toBet(theme: theme, description: description, endRegister: endRegisterDate, endBet: endBetDate, isPublic: isPublic, status: .inProgress, creator: user, type: selectedOption)) { statusCode in switch statusCode { case 201: self.betAdded = true diff --git a/Sources/AllInApp/AllIn/ViewModels/CurrentBetViewModel.swift b/Sources/AllInApp/AllIn/ViewModels/CurrentBetViewModel.swift index 70691eb..22a44ff 100644 --- a/Sources/AllInApp/AllIn/ViewModels/CurrentBetViewModel.swift +++ b/Sources/AllInApp/AllIn/ViewModels/CurrentBetViewModel.swift @@ -13,7 +13,7 @@ class CurrentBetViewModel: ObservableObject { @Inject var manager: Manager - @Published private(set) var bets: [Bet] = [] + @Published private(set) var bets: [BetDetail] = [] init() { getItems() @@ -21,7 +21,10 @@ class CurrentBetViewModel: ObservableObject { func getItems() { manager.getCurrentBets(withIndex: 0, withCount: 20) { bets in - self.bets = bets + for bet in bets { + let betDetail = BetDetail(bet: bet, answers: [AnswerDetail(response: "OUI", totalStakes: 120, totalParticipants: 2, highestStake: 200, odds: 1.2), AnswerDetail(response: "NON", totalStakes: 120, totalParticipants: 2, highestStake: 200, odds: 1.2)], participations: []) + self.bets.append(betDetail) + } } } diff --git a/Sources/AllInApp/AllIn/Views/CurrentBetView.swift b/Sources/AllInApp/AllIn/Views/CurrentBetView.swift index 8518352..aad6ed3 100644 --- a/Sources/AllInApp/AllIn/Views/CurrentBetView.swift +++ b/Sources/AllInApp/AllIn/Views/CurrentBetView.swift @@ -14,10 +14,8 @@ struct CurrentBetView: View { @StateObject private var viewModel = CurrentBetViewModel() @Binding var showMenu: Bool @State private var showingSheet = false - var betD: BetDetail = BetStubManager().getABetDetail() var body: some View { - VStack(alignment: .center, spacing: 0) { TopBar(showMenu: self.$showMenu) @@ -26,8 +24,8 @@ struct CurrentBetView: View { .textStyle(weight: .bold, color: AllInColors.grey500Color, size: 25) .padding([.top],15) VStack(spacing: 20){ - ForEach(viewModel.bets, id: \.id) { (bet: Bet) in - ReviewCard(betDetail: betD, amountBetted: 110, isAWin: false) + ForEach(viewModel.bets, id: \.bet.id) { (bet: BetDetail) in + ReviewCard(betDetail: bet, amountBetted: 110, isAWin: false) } } .padding([.trailing, .leading, .bottom],25) diff --git a/Sources/AllInApp/AllIn/Views/DetailsView.swift b/Sources/AllInApp/AllIn/Views/DetailsView.swift index 3cec22b..50e4710 100644 --- a/Sources/AllInApp/AllIn/Views/DetailsView.swift +++ b/Sources/AllInApp/AllIn/Views/DetailsView.swift @@ -13,36 +13,20 @@ struct DetailsView: View { viewModel.betDetail?.finalAnswer == nil ? false : true } - var isDisabled: Bool { - if let endRegisterDate = viewModel.betDetail?.bet.endRegisterDate { - let currentDate = Date() - - switch currentDate.compare(endRegisterDate) { - case .orderedAscending: - return false - case .orderedDescending: - return true - case .orderedSame: - return true - } - } else { - return true - } - } - var StatusValues: (String, Color) { - if let endRegisterDate = viewModel.betDetail?.bet.endRegisterDate { - let currentDate = Date() - - switch currentDate.compare(endRegisterDate) { - case .orderedAscending: + if let betType = viewModel.betDetail?.bet.status { + switch betType { + case .inProgress: return ("En cours...", AllInColors.darkPurpleColor) - case .orderedDescending: + case .waiting: return ("En attente...", AllInColors.pink100) - case .orderedSame: + case .closing: return ("Fin des inscriptions...", AllInColors.grey50Color) + case .finished: + return ("Terminé", AllInColors.grey100Color) + case .cancelled: + return ("Annulé", AllInColors.grey100Color) } - } else { return ("Statut indisponible", AllInColors.pink100) } @@ -150,7 +134,6 @@ struct DetailsView: View { Spacer() } - .frame(maxWidth: /*@START_MENU_TOKEN@*/.infinity/*@END_MENU_TOKEN@*/, maxHeight: .infinity) .padding([.bottom,.trailing,.leading], 15) .background(AllInColors.underComponentBackgroundColor) .border(width: 1, edges: [.top], color: AllInColors.delimiterGrey) diff --git a/Sources/Api/Sources/Api/Factory/FactoryApiBet.swift b/Sources/Api/Sources/Api/Factory/FactoryApiBet.swift index 1fb92f5..318c213 100644 --- a/Sources/Api/Sources/Api/Factory/FactoryApiBet.swift +++ b/Sources/Api/Sources/Api/Factory/FactoryApiBet.swift @@ -56,7 +56,7 @@ public class FactoryApiBet: FactoryBet { return nil } - return toBet(id: id, theme: theme, description: phrase, endRegister: endRegisterDate, endBet: endBetDate, isPublic: isPublic, status: .FINISHED, creator: User(username: createdBy, email: createdBy, nbCoins: 0, friends: []), type: type) + return toBet(id: id, theme: theme, description: phrase, endRegister: endRegisterDate, endBet: endBetDate, isPublic: isPublic, status: .finished, creator: User(username: createdBy, email: createdBy, nbCoins: 0, friends: []), type: type) } public func toBet(id: String, theme: String, description: String, endRegister: Date, endBet: Date, isPublic: Bool, status: BetStatus, creator: User, type: String) -> Bet { diff --git a/Sources/Model/Sources/Model/CustomBetResponse.swift b/Sources/Model/Sources/Model/CustomBetResponse.swift index 40bccff..af0391b 100644 --- a/Sources/Model/Sources/Model/CustomBetResponse.swift +++ b/Sources/Model/Sources/Model/CustomBetResponse.swift @@ -12,7 +12,6 @@ public class CustomBetResponse { /// The name or description of the custom bet response. public var name: String - /// Custom Constructor /// /// - Parameters: diff --git a/Sources/Model/Sources/Model/BetStatus.swift b/Sources/Model/Sources/Model/Enums/BetStatus.swift similarity index 66% rename from Sources/Model/Sources/Model/BetStatus.swift rename to Sources/Model/Sources/Model/Enums/BetStatus.swift index b2159ef..3c32829 100644 --- a/Sources/Model/Sources/Model/BetStatus.swift +++ b/Sources/Model/Sources/Model/Enums/BetStatus.swift @@ -8,5 +8,5 @@ import Foundation public enum BetStatus { - case WAITING, IN_PROGRESS, FINISHED + case inProgress, waiting, closing, finished, cancelled } diff --git a/Sources/StubLib/Sources/StubLib/Stub.swift b/Sources/StubLib/Sources/StubLib/Stub.swift index 7bcca01..55bba55 100644 --- a/Sources/StubLib/Sources/StubLib/Stub.swift +++ b/Sources/StubLib/Sources/StubLib/Stub.swift @@ -38,7 +38,7 @@ struct Stub { endRegisterDate: Date().addingTimeInterval(-86400), endBetDate: Date().addingTimeInterval(172800), isPublic: true, - status: .IN_PROGRESS, + status: .inProgress, invited: [], author: user1, registered: [user2] @@ -51,7 +51,7 @@ struct Stub { endRegisterDate: Date().addingTimeInterval(172800), endBetDate: Date().addingTimeInterval(259200), isPublic: false, - status: .IN_PROGRESS, + status: .inProgress, invited: [user3], author: user1, registered: [user2] @@ -64,7 +64,7 @@ struct Stub { endRegisterDate: Date().addingTimeInterval(259200), endBetDate: Date().addingTimeInterval(345600), isPublic: true, - status: .FINISHED, + status: .finished, invited: [], author: user1, registered: [user2, user1, user3] @@ -77,7 +77,7 @@ struct Stub { endRegisterDate: Date().addingTimeInterval(345600), endBetDate: Date().addingTimeInterval(432000), isPublic: false, - status: .FINISHED, + status: .finished, invited: [user1], author: user2, registered: [user3]