parent
945f9ddf29
commit
457900f64a
@ -0,0 +1,74 @@ |
|||||||
|
// |
||||||
|
// InscriptionLegendView.swift |
||||||
|
// PadelClub |
||||||
|
// |
||||||
|
// Created by razmig on 15/01/2025. |
||||||
|
// |
||||||
|
|
||||||
|
import SwiftUI |
||||||
|
|
||||||
|
struct InscriptionLegendView: View { |
||||||
|
@Environment(\.dismiss) private var dismiss |
||||||
|
|
||||||
|
var body: some View { |
||||||
|
NavigationView { |
||||||
|
List { |
||||||
|
Section { |
||||||
|
ForEach(RoundRule.colors.prefix(6).indices, id: \.self) { colorIndex in |
||||||
|
Text("Équipe placée en \(RoundRule.roundName(fromRoundIndex: colorIndex))") |
||||||
|
.listRowView(isActive: true, color: Color(uiColor: .init(fromHex: RoundRule.colors[colorIndex])), hideColorVariation: true, alignment: .trailing) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Section { |
||||||
|
Text("Équipe placée en poule") |
||||||
|
.listRowView(isActive: true, color: .blue, hideColorVariation: true, alignment: .trailing) |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
Section { |
||||||
|
Text("Équipe estimée en tableau") |
||||||
|
.listRowView(isActive: true, color: .mint, hideColorVariation: true, alignment: .trailing) |
||||||
|
Text("Équipe estimée en poule") |
||||||
|
.listRowView(isActive: true, color: .cyan, hideColorVariation: true, alignment: .trailing) |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
Section { |
||||||
|
Text("Équipe en liste d'attente") |
||||||
|
.listRowView(isActive: true, color: .gray, hideColorVariation: true, alignment: .trailing) |
||||||
|
Text("Équipe forfaite") |
||||||
|
.listRowView(isActive: true, color: .logoRed, hideColorVariation: true, alignment: .trailing) |
||||||
|
} |
||||||
|
|
||||||
|
Section { |
||||||
|
Label("Inscrit en ligne", systemImage: "person.badge.shield.checkmark.fill") |
||||||
|
} footer: { |
||||||
|
Text("Icône indiquant que le joueur s'est inscrit en ligne.") |
||||||
|
} |
||||||
|
|
||||||
|
Section { |
||||||
|
Text("Équipe ayant un joueur à vérifier") |
||||||
|
.listRowView(isActive: true, color: .logoRed, hideColorVariation: true, backgroundColor: .logoRed, alignment: .leading) |
||||||
|
} footer: { |
||||||
|
Text("Une fois que vous avez importé votre fichier, Padel Club vous affiche ainsi les équipes ayant des joueurs ne provenant pas du fichier ni de la base fédérale.") |
||||||
|
} |
||||||
|
|
||||||
|
Section { |
||||||
|
Text("Équipe ayant un joueur ne provenant pas du fichier beach-padel") |
||||||
|
.listRowView(isActive: true, color: .beige, hideColorVariation: true, backgroundColor: .beige, alignment: .leading) |
||||||
|
} footer: { |
||||||
|
Text("Une fois que vous avez importé votre fichier, Padel Club vous affiche ainsi les équipes ayant des joueurs ne provenant pas du fichier.") |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
.headerProminence(.increased) |
||||||
|
.navigationTitle("Légende") |
||||||
|
.navigationBarTitleDisplayMode(.inline) |
||||||
|
.toolbarBackground(.visible, for: .navigationBar) |
||||||
|
.navigationBarItems(trailing: Button("Fermer") { |
||||||
|
dismiss() |
||||||
|
}) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,89 @@ |
|||||||
|
// |
||||||
|
// RegistrationInfoSheetView.swift |
||||||
|
// PadelClub |
||||||
|
// |
||||||
|
// Created by razmig on 15/01/2025. |
||||||
|
// |
||||||
|
|
||||||
|
import SwiftUI |
||||||
|
|
||||||
|
struct RegistrationInfoSheetView: View { |
||||||
|
@Environment(\.dismiss) private var dismiss |
||||||
|
let registrationInfoText: String = |
||||||
|
""" |
||||||
|
Comment fonctionnent les inscriptions en ligne ? |
||||||
|
|
||||||
|
Les inscriptions en ligne permettent aux joueurs de s'inscrire directement au tournoi via la plateforme. Voici les informations importantes à connaître : |
||||||
|
|
||||||
|
Conditions d'inscription : |
||||||
|
- Un compte Padel Club est requis pour s'inscrire |
||||||
|
- Une licence valide peut être nécessaire |
||||||
|
- Les équipes des tournois homologués doivent être composées de 2 joueurs |
||||||
|
- Les animations ont moins de restrictions |
||||||
|
|
||||||
|
Déroulement des inscriptions : |
||||||
|
1. Les inscriptions peuvent avoir une date et heure d'ouverture définies par l'organisateur |
||||||
|
2. Le tournoi peut avoir une capacité maximale d'équipes |
||||||
|
3. Si une capacité maximale est définie, les nouvelles inscriptions seront placées en liste d'attente une fois celle-ci atteinte |
||||||
|
4. La liste d'attente peut également avoir une limite maximale d'équipes |
||||||
|
5. Les inscriptions peuvent se terminer à une date limite fixée par l'organisateur |
||||||
|
|
||||||
|
Désinscription : |
||||||
|
La désinscription est possible tant que : |
||||||
|
- Le tournoi n'a pas commencé |
||||||
|
- La date limite d'inscription n'est pas dépassée |
||||||
|
- Les inscriptions n'ont pas été clôturées par l'organisateur |
||||||
|
|
||||||
|
Validation des inscriptions : |
||||||
|
- L'inscription n'est définitive qu'après validation des critères d'éligibilité (catégorie, classement, âge...) |
||||||
|
- En cas de désistement d'une équipe inscrite, la première équipe en liste d'attente est automatiquement intégrée au tableau |
||||||
|
- Une équipe en liste d'attente peut se désinscrire à tout moment selon les mêmes conditions |
||||||
|
|
||||||
|
L'organisateur se réserve le droit de modifier ces conditions ou de clôturer les inscriptions de manière anticipée. |
||||||
|
""" |
||||||
|
var body: some View { |
||||||
|
NavigationView { |
||||||
|
ScrollView { |
||||||
|
VStack(alignment: .leading, spacing: 20) { |
||||||
|
// Title |
||||||
|
Text("Inscriptions en ligne") |
||||||
|
.font(.title) |
||||||
|
.fontWeight(.bold) |
||||||
|
.padding(.bottom, 5) |
||||||
|
|
||||||
|
// Content sections |
||||||
|
ForEach(registrationInfoText.components(separatedBy: "\n\n"), id: \.self) { section in |
||||||
|
if !section.isEmpty { |
||||||
|
VStack(alignment: .leading, spacing: 10) { |
||||||
|
if section.contains(":") { |
||||||
|
Text(section.components(separatedBy: ":")[0]) |
||||||
|
.font(.headline) |
||||||
|
.foregroundColor(.primary) |
||||||
|
|
||||||
|
let bulletPoints = section.components(separatedBy: "\n-") |
||||||
|
if bulletPoints.count > 1 { |
||||||
|
ForEach(bulletPoints.dropFirst(), id: \.self) { point in |
||||||
|
HStack(alignment: .top) { |
||||||
|
Text("•") |
||||||
|
.padding(.trailing, 5) |
||||||
|
Text(point) |
||||||
|
.fixedSize(horizontal: false, vertical: true) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} else { |
||||||
|
Text(section) |
||||||
|
} |
||||||
|
} |
||||||
|
.padding(.bottom, 10) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.padding() |
||||||
|
} |
||||||
|
.navigationBarItems(trailing: Button("Fermer") { |
||||||
|
dismiss() |
||||||
|
}) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue