mirror of
https://github.com/Mueller-Patrick/DHBW-Service-App.git
synced 2026-05-26 12:38:05 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d7f078cc88 | |||
| 805495fb81 | |||
| f5756cd650 | |||
| ba0d4da657 |
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Device Information:**
|
||||
- Device: [e.g. iPhone 12]
|
||||
- OS: [e.g. iOS 14.1]
|
||||
- App Version [e.g. 1.0]
|
||||
|
||||
**Beta Information:**
|
||||
If you are participating in the TestFlight Beta program, please provide the following information:
|
||||
- Build No.: [e.g. 1.0.12]
|
||||
- Have you already submitted feedback via TestFlight? [yes/no]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[REQ]"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -11,6 +11,7 @@ import CoreData
|
||||
|
||||
@objc(Lecturer)
|
||||
public class Lecturer: NSManagedObject {
|
||||
// MARK: Access methods
|
||||
@nonobjc public class func getAll() -> [Lecturer] {
|
||||
let managedContext =
|
||||
PersistenceController.shared.context
|
||||
@@ -41,4 +42,13 @@ public class Lecturer: NSManagedObject {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Wrappers
|
||||
public var wrappedName: String {
|
||||
name ?? ""
|
||||
}
|
||||
|
||||
public var wrappedEmail: String {
|
||||
email ?? ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import CoreData
|
||||
|
||||
@objc(RaPlaEvent)
|
||||
public class RaPlaEvent: NSManagedObject {
|
||||
|
||||
// MARK: Access methods
|
||||
@nonobjc public class func getAll() -> [RaPlaEvent] {
|
||||
let managedContext =
|
||||
PersistenceController.shared.context
|
||||
@@ -41,4 +43,12 @@ public class RaPlaEvent: NSManagedObject {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Wrappers
|
||||
public var lecturerList: [Lecturer] {
|
||||
let set = lecturers as? Set<Lecturer> ?? []
|
||||
return set.sorted {
|
||||
$0.wrappedName < $1.wrappedName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,10 +156,10 @@ class RaPlaFetcher {
|
||||
// Save the given iCalEvent objects to CoreData
|
||||
// Updates the events if they already exist and deletes old (/invalid) ones
|
||||
private class func saveToCoreData(eventObjects: [iCalEvent]) -> Bool{
|
||||
let existingEvents: [RaPlaEvent] = [] //RaPlaEvent.getAll()
|
||||
let existingEvents: [RaPlaEvent] = RaPlaEvent.getAll()
|
||||
var existingEventsDict: [String:RaPlaEvent] = [:]
|
||||
for event in existingEvents {
|
||||
existingEventsDict[event.value(forKey: "uid") as! String] = event
|
||||
existingEventsDict[event.uid!] = event
|
||||
}
|
||||
let newEventUIDs = eventObjects.map{$0.uid}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ struct ContentView: View {
|
||||
}
|
||||
.onAppear{
|
||||
// Called upon the opening of the app
|
||||
RaPlaFetcher.getRaplaFileAndSaveToCoreData(from: "https://rapla.dhbw-karlsruhe.de/rapla?page=ical&user=eisenbiegler&file=TINF20B4")
|
||||
RaPlaFetcher.getRaplaFileAndSaveToCoreData(from: "https://rapla.dhbw-karlsruhe.de/rapla?page=ical&user=eisenbiegler&file=TINF19B4")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ struct LecturePlanItem: View {
|
||||
.bold()
|
||||
Text(event.location!)
|
||||
.bold()
|
||||
Text("WIP")
|
||||
Text(!event.lecturerList.isEmpty ? event.lecturerList[0].wrappedName : "")
|
||||
.bold()
|
||||
}.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# DHBW-Service-App
|
||||
|
||||
## Introduction
|
||||
This is a project by two students of the Cooperative State University in Karlsruhe (DHBW Karlsruhe).
|
||||
The goal is to develop a native iOS app providing easy and straightforward access to services like RaPla, Dualis and the canteen plan.
|
||||
|
||||
<b>Disclaimer:</b> This project is not affiliated with the DHBW Karlsruhe
|
||||
|
||||
## Build it yourself
|
||||
As the app is not yet available on the App Store, you can build and install it yourself if you have a Mac with Xcode installed.
|
||||
Just clone the repository, then open the project in Xcode and navigate to the project settings. In the target section, select
|
||||
the iOS target. Then you have to select your own development team in the dropdown or create a new one.
|
||||
If you completed these steps, you should be able to install a development version of the app on your own devices.
|
||||
Reference in New Issue
Block a user