Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Study Room Utilization Percentages using IRIS #289

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions assets/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"done": "Fertig",
"studyRoom": "Lernraum",
"studyRooms": "Lernräume",
"unknownStudyRoom": "Unbekannter Lernraum",
"nearestStudyRooms": "Nächste Lernräume",
"noNearFreeStudyRoomsFound": "Keine Lernräume in deiner Nähe gefunden",
"mostSearchedRooms": "Meist gesuchte Räume",
Expand Down Expand Up @@ -131,6 +132,9 @@
"wednesday": "Mittwoch",
"thursday": "Donnerstag",
"friday": "Freitag",
"saturday": "Samstag",
"sunday": "Sonntag",
"fromTo": "{} - {}",
"weekend": "Wochenende",
"openingHours": "Öffnungszeiten",
"open": "{} offen von {} - {}",
Expand Down Expand Up @@ -195,8 +199,8 @@
"selectAction": "Wähle eine Aktion",
"openIn": "In {} öffnen",
"unknownDirection": "Unbekannte Richtung",
"showWeekends": "Wochenenden anzeigen",
"showHiddenCalendarEntries": "Versteckte Kalendareintrage anzeigen",
"showWeekends": "Wochenenden",
"showHiddenCalendarEntries": "Versteckte Kalendareintrage",
"color": "Farbe",
"resetLogin": "Zurücksetzen & Anmelden",
"resetPreferences": "Einstellungen zurücksetzen",
Expand Down Expand Up @@ -227,5 +231,6 @@
"studies": "Studium",
"suggested": "Interessante {}",
"more": "Mehr",
"visibility": "Sichtbarkeit"
"visibility": "Sichtbarkeit",
"utilizationAt": "Auslastung bei {}%"
}
11 changes: 8 additions & 3 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"done": "Done",
"studyRoom": "Study Room",
"studyRooms": "Study Rooms",
"unknownStudyRoom": "Unknown Study Room",
"nearestStudyRooms": "Nearest Study Rooms",
"noNearFreeStudyRoomsFound": "No Study Rooms Near You Found!",
"mostSearchedRooms": "Most Searched Rooms",
Expand Down Expand Up @@ -131,6 +132,9 @@
"wednesday": "Wednesday",
"thursday": "Thursday",
"friday": "Friday",
"saturday": "Saturday",
"sunday": "Sunday",
"fromTo": "{} - {}",
"weekend": "Weekend",
"openingHours": "Opening Hours",
"open": "Open {} from {} - {}",
Expand Down Expand Up @@ -195,8 +199,8 @@
"selectAction": "Select an action",
"openIn": "Open in {}",
"unknownDirection": "Unknown Direction",
"showWeekends": "Show Weekends",
"showHiddenCalendarEntries": "Show Hidden Calendar Entries",
"showWeekends": "Weekends",
"showHiddenCalendarEntries": "Hidden Calendar Entries",
"color": "Color",
"resetLogin": "Reset & Login",
"resetPreferences": "Reset Preferences",
Expand Down Expand Up @@ -227,5 +231,6 @@
"studies": "Studies",
"suggested": "Suggested {}",
"more": "More",
"visibility": "Visibility"
"visibility": "Visibility",
"utilizationAt": "Utilization at {}%"
}
70 changes: 35 additions & 35 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
PODS:
- device_info_plus (0.0.1):
- Flutter
- Firebase/CoreOnly (11.2.0):
- FirebaseCore (= 11.2.0)
- Firebase/Crashlytics (11.2.0):
- Firebase/CoreOnly (11.4.0):
- FirebaseCore (= 11.4.0)
- Firebase/Crashlytics (11.4.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 11.2.0)
- Firebase/RemoteConfig (11.2.0):
- FirebaseCrashlytics (~> 11.4.0)
- Firebase/RemoteConfig (11.4.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 11.2.0)
- firebase_core (3.6.0):
- Firebase/CoreOnly (= 11.2.0)
- FirebaseRemoteConfig (~> 11.4.0)
- firebase_core (3.8.0):
- Firebase/CoreOnly (= 11.4.0)
- Flutter
- firebase_crashlytics (4.1.3):
- Firebase/Crashlytics (= 11.2.0)
- firebase_crashlytics (4.1.5):
- Firebase/Crashlytics (= 11.4.0)
- firebase_core
- Flutter
- firebase_remote_config (5.1.3):
- Firebase/RemoteConfig (= 11.2.0)
- firebase_remote_config (5.1.5):
- Firebase/RemoteConfig (= 11.4.0)
- firebase_core
- Flutter
- FirebaseABTesting (11.4.0):
- FirebaseCore (~> 11.0)
- FirebaseCore (11.2.0):
- FirebaseCore (11.4.0):
- FirebaseCoreInternal (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.4.1):
- FirebaseCore (~> 11.0)
- FirebaseCoreInternal (11.4.2):
- FirebaseCoreInternal (11.5.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseCrashlytics (11.2.0):
- FirebaseCore (~> 11.0)
- FirebaseCrashlytics (11.4.0):
- FirebaseCore (~> 11.4)
- FirebaseInstallations (~> 11.0)
- FirebaseRemoteConfigInterop (~> 11.0)
- FirebaseSessions (~> 11.0)
Expand All @@ -44,25 +44,25 @@ PODS:
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- FirebaseRemoteConfig (11.2.0):
- FirebaseRemoteConfig (11.4.0):
- FirebaseABTesting (~> 11.0)
- FirebaseCore (~> 11.0)
- FirebaseInstallations (~> 11.0)
- FirebaseRemoteConfigInterop (~> 11.0)
- FirebaseSharedSwift (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseRemoteConfigInterop (11.4.0)
- FirebaseSessions (11.3.0):
- FirebaseCore (~> 11.0)
- FirebaseCoreExtension (~> 11.0)
- FirebaseRemoteConfigInterop (11.5.0)
- FirebaseSessions (11.4.0):
- FirebaseCore (~> 11.4)
- FirebaseCoreExtension (~> 11.4)
- FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- nanopb (~> 3.30910.0)
- PromisesSwift (~> 2.1)
- FirebaseSharedSwift (11.4.0)
- FirebaseSharedSwift (11.5.0)
- Flutter (1.0.0)
- flutter_native_splash (0.0.1):
- Flutter
Expand Down Expand Up @@ -234,20 +234,20 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
Firebase: 98e6bf5278170668a7983e12971a66b2cd57fc8c
firebase_core: 2bedc3136ec7c7b8561c6123ed0239387b53f2af
firebase_crashlytics: 37d104d457b51760b48504a93a12b3bf70995d77
firebase_remote_config: d522653d828836503715498f1662901a6efcd809
Firebase: cf1b19f21410b029b6786a54e9764a0cacad3c99
firebase_core: 9efc3ecf689cdbc90f13f4dc58108c83ea46b266
firebase_crashlytics: 72a8b504422ba8bb435a7a0c0a9341320cbcbe29
firebase_remote_config: 96a9b7e79624c5d9d16befdef60791966bb83919
FirebaseABTesting: aef1719704fade00b200827e7973f352efc4caee
FirebaseCore: a282032ae9295c795714ded2ec9c522fc237f8da
FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771
FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
FirebaseCoreInternal: 35731192cab10797b88411be84940d2beb33a238
FirebaseCrashlytics: cfc69af5b53565dc6a5e563788809b5778ac4eac
FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604
FirebaseCrashlytics: 41bbdd2b514a8523cede0c217aee6ef7ecf38401
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
FirebaseRemoteConfig: fca0b2d017fc1de52b28a4e5bcf2007c1a840457
FirebaseRemoteConfigInterop: e76f46ffa4d6a65e273d4dfebb6a79e588cec136
FirebaseSessions: 655ff17f3cc1a635cbdc2d69b953878001f9e25b
FirebaseSharedSwift: 505dae2d05969dbf6d43749a642bb1bf230f0252
FirebaseRemoteConfig: 7655681d02417bc9b287338edb9d721ff79e1a4a
FirebaseRemoteConfigInterop: 7a7aebb9342d53913a5c890efa88e289d9e5c1bc
FirebaseSessions: 3f56f177d9e53a85021d16b31f9a111849d1dd8b
FirebaseSharedSwift: 302ac5967857ad7e7388b15382d705b8c8d892aa
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
Expand All @@ -267,12 +267,12 @@ SPEC CHECKSUMS:
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
quick_actions_ios: 56f3cbaa71e94f212838d1f9fe354bd0734779bf
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite_darwin: a553b1fd6fe66f53bbb0fe5b4f5bab93f08d7a13
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
sqlite3: 0aa20658a9b238a3b1ff7175eb7bdd863b0ab4fd
sqlite3_flutter_libs: b55ef23cfafea5318ae5081e0bf3fbbce8417c94
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3

PODFILE CHECKSUM: f5f6fa56ec332013222699049ea868939deda084

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
38 changes: 19 additions & 19 deletions lib/base/networking/apis/eatApi/eat_api.dart
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import 'package:campus_flutter/base/networking/apis/eatApi/eat_api_service.dart';
import 'package:campus_flutter/base/networking/apis/eatApi/eat_api_endpoint.dart';
import 'package:campus_flutter/base/networking/protocols/api.dart';

class EatApi extends Api {
final EatApiService eatApiService;
final EatApiEndpoint eatApiEndpoint;

EatApi(this.eatApiService);
EatApi(this.eatApiEndpoint);

@override
String get baseURL => "tum-dev.github.io";
String get domain => "tum-dev.github.io";

@override
String get path => "/eat-api/";
String get path => "eat-api/";

@override
String get paths {
switch (eatApiService) {
case EatApiServiceCanteens _:
return "${path}enums/canteens.json";
case EatApiServiceLanguages _:
return "${path}enums/languages.json";
case EatApiServiceLabels _:
return "${path}enums/labels.json";
case EatApiServiceAll _:
return "${path}all.json";
case EatApiServiceAllRef _:
return "${path}all_ref.json";
case EatApiServiceMenu menu:
return "$path${menu.location}/${menu.year}/${menu.week.toString().padLeft(1, "0")}.json";
String get slug {
switch (eatApiEndpoint) {
case EatApiEndpointCanteens _:
return "enums/canteens.json";
case EatApiEndpointLanguages _:
return "enums/languages.json";
case EatApiEndpointLabels _:
return "enums/labels.json";
case EatApiEndpointAll _:
return "all.json";
case EatApiEndpointAllRef _:
return "all_ref.json";
case EatApiEndpointMenu menu:
return "${menu.location}/${menu.year}/${menu.week.toString().padLeft(1, "0")}.json";
}
}

Expand Down
23 changes: 23 additions & 0 deletions lib/base/networking/apis/eatApi/eat_api_endpoint.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import 'package:campus_flutter/base/extensions/date_time.dart';

sealed class EatApiEndpoint {}

class EatApiEndpointCanteens extends EatApiEndpoint {}

class EatApiEndpointLanguages extends EatApiEndpoint {}

class EatApiEndpointLabels extends EatApiEndpoint {}

class EatApiEndpointAll extends EatApiEndpoint {}

class EatApiEndpointAllRef extends EatApiEndpoint {}

class EatApiEndpointMenu extends EatApiEndpoint {
final String location;
final int year;
final String week;

EatApiEndpointMenu({required this.location, int? year, String? week})
: year = year ?? DateTime.now().year,
week = week ?? DateTime.now().weekNumber();
}
23 changes: 0 additions & 23 deletions lib/base/networking/apis/eatApi/eat_api_service.dart

This file was deleted.

23 changes: 23 additions & 0 deletions lib/base/networking/apis/irisApi/iris_api.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import 'package:campus_flutter/base/networking/apis/irisApi/iris_api_endpoint.dart';
import 'package:campus_flutter/base/networking/protocols/api.dart';

class IrisApi extends Api {
final IrisApiEndpoint irisApiEndpoint;

IrisApi({required this.irisApiEndpoint});

@override
String get domain => "iris.asta.tum.de";

@override
bool get needsAuth => false;

@override
Map<String, String> get parameters => irisApiEndpoint.getParameters();

@override
String get path => "";

@override
String get slug => "api";
}
5 changes: 5 additions & 0 deletions lib/base/networking/apis/irisApi/iris_api_endpoint.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sealed class IrisApiEndpoint {
Map<String, String> getParameters() => {};
}

class IrisApiEndpointRooms extends IrisApiEndpoint {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class MvvDeparturesApi extends Api {
MvvDeparturesApi({required this.station, required this.walkingTime});

@override
String get baseURL => "efa.mvv-muenchen.de";
String get domain => "efa.mvv-muenchen.de";

@override
bool get needsAuth => false;
Expand All @@ -31,8 +31,8 @@ class MvvDeparturesApi extends Api {
};

@override
String get path => "/ng/";
String get path => "ng/";

@override
String get paths => "${path}XML_DM_REQUEST";
String get slug => "XML_DM_REQUEST";
}
Loading
Loading