small improvements

main
Razmig Sarkissian 3 weeks ago
parent 9bb753cce1
commit 236406e262
  1. 8
      PadelClub.xcodeproj/project.pbxproj
  2. 21
      PadelClub/Views/Calling/CallView.swift
  3. 3
      PadelClub/Views/Calling/Components/PlayersWithoutContactView.swift
  4. 5
      PadelClub/Views/Calling/TeamsCallingView.swift
  5. 12
      PadelClub/Views/Cashier/CashierView.swift
  6. 10
      PadelClub/Views/Team/EditingTeamView.swift
  7. 2
      PadelClub/Views/Tournament/TournamentBuildView.swift

@ -3412,7 +3412,7 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
@ -3439,7 +3439,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.37;
MARKETING_VERSION = 1.2.57;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -3459,7 +3459,7 @@
CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6;
@ -3485,7 +3485,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.37;
MARKETING_VERSION = 1.2.57;
PRODUCT_BUNDLE_IDENTIFIER = app.padelclub;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

@ -148,6 +148,11 @@ struct CallView: View {
}
func finalMessage(summonType: SummonType, forcedEmptyMessage: Bool) -> String {
if summonType == .contactWithoutSignature {
return ""
}
if simpleMode || forcedEmptyMessage {
let signature = dataStore.user.getSummonsMessageSignature() ?? dataStore.user.defaultSignature(tournament)
return "\n\n\n\n" + signature
@ -309,17 +314,9 @@ struct CallView: View {
self._summonMenu(byMessage: false)
} label: {
VStack(alignment: .leading) {
let callWord : String = (summonType.isRecall() ? "Reconvoquer" : mainWord)
let callWord : String = summonType.mainWord()
if self.teams.count == 1 {
if simpleMode {
Text("\(callWord) cette paire")
} else {
if let previousCallDate = teams.first?.callDate, Calendar.current.compare(previousCallDate, to: callDate, toGranularity: .minute) != .orderedSame {
Text("Reconvoquer \(self.callDate.localizedDate())")
} else {
Text("\(callWord) cette paire")
}
}
} else {
Text("\(callWord) ces \(self.teams.count) paires")
}
@ -344,6 +341,8 @@ struct CallView: View {
self._summon(byMessage: byMessage, summonType: .summonWalkoutFollowUp)
case .summonErrorFollowUp:
self._summon(byMessage: byMessage, summonType: .summonErrorFollowUp)
case .contactWithoutSignature:
self._summon(byMessage: byMessage, summonType: .contactWithoutSignature, forcedEmptyMessage: true)
}
} label: {
Text(byMessage ? "sms" : "mail")
@ -363,11 +362,13 @@ struct CallView: View {
self._summon(byMessage: byMessage, summonType: .summonErrorFollowUp)
}
if simpleMode == false {
Divider()
Button("Contacter") {
self._summon(byMessage: byMessage, summonType: .contact, forcedEmptyMessage: true)
}
Button("Contacter sans texte par défaut") {
self._summon(byMessage: byMessage, summonType: .contactWithoutSignature, forcedEmptyMessage: true)
}
} label: {

@ -46,7 +46,7 @@ struct PlayersWithoutContactView: View {
LabeledContent {
Text(withoutPhones.count.formatted())
} label: {
Text("Joueurs sans téléphone portable français")
Text(Locale.current.region?.identifier == "FR" ? "Joueurs sans téléphone portable français" : "Joueurs sans téléphone")
}
}
} header: {
@ -54,3 +54,4 @@ struct PlayersWithoutContactView: View {
}
}
}

@ -131,7 +131,7 @@ struct CallMenuOptionsView: View {
let action: (() -> Void)?
@State private var callDate: Date
init(team: TeamRegistration, action: (() -> Void)?) {
init(team: TeamRegistration, action: (() -> Void)? = nil) {
self.team = team
self.action = action
_callDate = .init(wrappedValue: team.expectedSummonDate() ?? team.tournamentObject()?.startDate ?? Date())
@ -185,6 +185,9 @@ struct CallMenuOptionsView: View {
CallView(team: team, displayContext: .menu, summonType: .summonWalkoutFollowUp)
CallView(team: team, displayContext: .menu, summonType: .summonErrorFollowUp)
}
CallView(team: team, displayContext: .menu, summonType: .contact)
CallView(team: team, displayContext: .menu, summonType: .contactWithoutSignature)
}
Section {

@ -51,6 +51,7 @@ class CashierViewModel: ObservableObject {
@Published var sortOrder: PadelClubData.SortOrder = .ascending
@Published var searchText: String = ""
@Published var isSearching: Bool = false
@Published var paymentType: PlayerPaymentType? = nil
func _shouldDisplayTeam(_ team: TeamRegistration) -> Bool {
team.unsortedPlayers().anySatisfy({
@ -65,6 +66,7 @@ class CashierViewModel: ObservableObject {
sortOption.shouldDisplayPlayer(player)
&& filterOption.shouldDisplayPlayer(player)
&& presenceFilterOption.shouldDisplayPlayer(player)
&& (paymentType == nil || player.paymentType == paymentType)
}
}
@ -261,6 +263,16 @@ struct CashierView: View {
} label: {
Text("Statut du règlement")
}
Picker(selection: $cashierViewModel.paymentType) {
Text("N'importe").tag(nil as PlayerPaymentType?)
ForEach(PlayerPaymentType.allCases) { paymentType in
Text(paymentType.localizedLabel()).tag(paymentType)
}
} label: {
Text("Type de règlement")
}
}
Picker(selection: $cashierViewModel.sortOption) {

@ -106,9 +106,11 @@ struct EditingTeamView: View {
List {
#if PRODTEST
Section {
if let pid = team.players().first(where: { $0.paymentId != nil })?.paymentId {
Section {
Text(pid)
} footer: {
CopyPasteButtonView(pasteValue: pid)
}
}
// } else {
@ -243,6 +245,12 @@ struct EditingTeamView: View {
Text("Équipe sur place")
}
}
NavigationLink {
CallMenuOptionsView(team: team)
.environment(tournament)
} label: {
Text("Modifier la convocation")
}
}
Section {

@ -21,7 +21,7 @@ struct TournamentBuildView: View {
let state = tournament.state()
Section {
if tournament.groupStageCount > 0 {
if tournament.hasGroupeStages() {
NavigationLink(value: Screen.groupStage) {
LabeledContent {
if let groupStageStatus {

Loading…
Cancel
Save