fix senior+ import

fix refresh of team row view
fix default entry fee
sync2
Raz 1 year ago
parent ea671ae14d
commit c9b25227d7
  1. 14
      PadelClub/Utils/PadelRule.swift
  2. 1
      PadelClub/Views/Team/TeamRowView.swift
  3. 8
      PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift

@ -209,9 +209,9 @@ enum FederalTournamentAge: Int, Hashable, Codable, CaseIterable, Identifiable {
case .senior: case .senior:
return "Senior" return "Senior"
case .a45: case .a45:
return "+45 ans" return "45 ans"
case .a55: case .a55:
return "+55 ans" return "55 ans"
} }
} }
@ -315,6 +315,16 @@ enum TournamentLevel: Int, Hashable, Codable, CaseIterable, Identifiable {
self.init(rawValue: value) self.init(rawValue: value)
} }
var entryFee: Double? {
switch self {
case .unlisted:
return nil
case .p25:
return 15
default:
return 20
}
}
func searchRawValue() -> String { func searchRawValue() -> String {
String(describing: self) String(describing: self)
} }

@ -8,6 +8,7 @@
import SwiftUI import SwiftUI
struct TeamRowView: View { struct TeamRowView: View {
@EnvironmentObject var dataStore: DataStore
var team: TeamRegistration var team: TeamRegistration
var teamPosition: TeamPosition? = nil var teamPosition: TeamPosition? = nil
var displayCallDate: Bool = false var displayCallDate: Bool = false

@ -350,6 +350,14 @@ struct InscriptionManagerView: View {
} }
} }
} else { } else {
rankingDateSourcePickerView(showDateInLabel: true)
Divider()
_sharingTeamsMenuView()
Divider()
Button { Button {
presentImportView = true presentImportView = true
} label: { } label: {

Loading…
Cancel
Save