-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#13 Show offered disciplines in event details view
- Loading branch information
1 parent
97214e9
commit d76d4fa
Showing
8 changed files
with
154 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// LadvDisciplilne.swift | ||
// Athlety | ||
// | ||
// Created by Stefan Lipp on 15.09.24. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Discipline { | ||
|
||
static var disciplineForLadvCode: [String : Discipline] { | ||
[ | ||
"L100" : .sprint100m, | ||
"L800" : .run800m, | ||
"TWEI" : .longJump, | ||
"THOC" : .highJump, | ||
"TSPE" : .javelinThrow, | ||
"TKUG" : .shotPut | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// LadvEvent.swift | ||
// Athlety | ||
// | ||
// Created by Stefan Lipp on 15.09.24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct LadvEvent: Codable { | ||
let id: Int | ||
let name: String | ||
let ort: String | ||
let datum: Int | ||
} | ||
|
||
struct LadvEventDetails: Codable { | ||
let id: Int | ||
let name: String | ||
let ort: LadvEventLocation | ||
let sportstaette: String | ||
let datum: Int | ||
|
||
let meldEmail: String | ||
let meldDatum: Int | ||
|
||
let attachements: [LadvEventAttachement] | ||
let wettbewerbe: [LadvEventCompetition] | ||
} | ||
|
||
struct LadvEventLocation: Codable { | ||
let id: Int | ||
let name: String | ||
let lat: Double | ||
let lng: Double | ||
} | ||
|
||
struct LadvEventAttachement: Codable { | ||
let name: String | ||
let url: String | ||
let fileExtension: String | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case name | ||
case url | ||
case fileExtension = "extension" | ||
} | ||
} | ||
|
||
struct LadvEventCompetition: Codable { | ||
let disziplinNew: String | ||
let klasseNew: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// EventDisciplinesView.swift | ||
// Athlety | ||
// | ||
// Created by Stefan Lipp on 15.09.24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct EventDisciplinesView: View { | ||
|
||
let disciplines: [Discipline] | ||
|
||
var body: some View { | ||
Text("Disciplines") | ||
.fontWeight(.medium) | ||
.font(.title2) | ||
.padding(.top) | ||
.padding(.bottom, 8) | ||
|
||
ForEach(disciplines, id: \.self) { discipline in | ||
Text(discipline.rawValue) | ||
.padding(.vertical, 8) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters