Merge remote-tracking branch 'refs/remotes/origin/main'

sync2
Raz 1 year ago
commit 42e1598fb4
  1. 6
      PadelClub/Data/Tournament.swift
  2. 8
      PadelClub/Views/Navigation/Umpire/UmpireView.swift
  3. 2
      PadelClub/Views/Tournament/Subscription/Guard.swift

@ -353,19 +353,19 @@ final class Tournament : ModelObject, Storable {
override func deleteDependencies() throws {
let store = self.tournamentStore
let teams = Array(self.tournamentStore.teamRegistrations)
let teams = self.tournamentStore.teamRegistrations
for team in teams {
try team.deleteDependencies()
}
store.teamRegistrations.deleteDependencies(teams)
let groups = Array(self.tournamentStore.groupStages)
let groups = self.tournamentStore.groupStages
for group in groups {
try group.deleteDependencies()
}
store.groupStages.deleteDependencies(groups)
let rounds = Array(self.tournamentStore.rounds)
let rounds = self.tournamentStore.rounds
for round in rounds {
try round.deleteDependencies()
}

@ -271,11 +271,15 @@ struct ProductIdsView: View {
List {
LabeledContent("count", value: String(self.transactions.count))
ForEach(self.transactions) { transaction in
if let offerType = transaction.offerType?.rawValue {
LabeledContent(transaction.productID, value: "\(offerType)")
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 {

@ -195,7 +195,7 @@ import LeStorage
return []
}
let userTransactions = self.purchasedTransactions.filter { currentUserUUID == $0.appAccountToken || $0.offerType == .code }
let userTransactions = self.purchasedTransactions.filter { currentUserUUID == $0.appAccountToken || $0.appAccountToken == nil }
let now: Date = Date()
// print("now = \(now)")

Loading…
Cancel
Save