-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from opxdelwin/dev
- Loading branch information
Showing
52 changed files
with
1,096 additions
and
395 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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
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 @@ | ||
{"nm":"Stat Chart","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.11.0"},"layers":[{"ty":4,"nm":"Green","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,87.5]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.36,"y":1},"s":[100,100],"t":0},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,75],"t":15},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,50],"t":45},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,85],"t":75},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,25],"t":105},{"s":[100,100],"t":135}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[340,400]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"rc","bm":0,"hd":false,"nm":"Green","d":1,"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":10},"s":{"a":0,"k":[50,175]}},{"ty":"fl","bm":0,"hd":false,"nm":"Fill","c":{"a":0,"k":[0.2588,1,0.4941]},"r":2,"o":{"a":0,"k":100}}],"ind":1},{"ty":4,"nm":"Yellow","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,125]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.36,"y":1},"s":[100,100],"t":0},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,25],"t":30},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,75],"t":60},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,10],"t":90},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,50],"t":120},{"s":[100,100],"t":149}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[270,400]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"rc","bm":0,"hd":false,"nm":"Yellow","d":1,"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":10},"s":{"a":0,"k":[50,250]}},{"ty":"fl","bm":0,"hd":false,"nm":"Fill","c":{"a":0,"k":[1,0.7961,0.3608]},"r":2,"o":{"a":0,"k":100}}],"ind":2},{"ty":4,"nm":"Blue","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,100]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.36,"y":1},"s":[100,100],"t":0},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,50],"t":15},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,75],"t":45},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,125],"t":75},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,25],"t":105},{"s":[100,100],"t":135}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[200,400]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"rc","bm":0,"hd":false,"nm":"Blue","d":1,"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":10},"s":{"a":0,"k":[50,200]}},{"ty":"fl","bm":0,"hd":false,"nm":"Fill","c":{"a":0,"k":[0.3333,0.6863,0.9059]},"r":2,"o":{"a":0,"k":100}}],"ind":3},{"ty":4,"nm":"Red","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,150]},"s":{"a":1,"k":[{"o":{"x":0,"y":0},"i":{"x":0.36,"y":1},"s":[100,100],"t":0},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,70],"t":30},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,25],"t":60},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,50],"t":90},{"o":{"x":0.22,"y":0.61},"i":{"x":0.36,"y":1},"s":[100,10],"t":120},{"s":[100,99],"t":149}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[130,400]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"rc","bm":0,"hd":false,"nm":"Red","d":1,"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":10},"s":{"a":0,"k":[50,300]}},{"ty":"fl","bm":0,"hd":false,"nm":"Fill","c":{"a":0,"k":[1,0.4,0.4]},"r":2,"o":{"a":0,"k":100}}],"ind":4}],"v":"5.7.0","fr":30,"op":150,"ip":0,"assets":[]} |
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,37 @@ | ||
import 'package:plan_sync/backend/models/timetable_meta.dart'; | ||
import 'package:plan_sync/backend/models/timetable_schedule_entry.dart'; | ||
import 'dart:convert'; | ||
|
||
class Timetable { | ||
final TimetableMeta meta; | ||
final Map<String, List<ScheduleEntry>> data; | ||
|
||
Timetable({required this.meta, required this.data}); | ||
|
||
factory Timetable.fromJson(Map<String, dynamic> json) { | ||
return Timetable( | ||
meta: TimetableMeta.fromJson(json['meta']), | ||
data: (json['data'] as Map<String, dynamic>).map( | ||
(key, value) => MapEntry( | ||
key, | ||
(value as List<dynamic>) | ||
.map((e) => ScheduleEntry.fromJson(e)) | ||
.toList(), | ||
), | ||
), | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'meta': meta.toJson(), | ||
'data': data.map((key, value) => | ||
MapEntry(key, value.map((entry) => entry.toJson()).toList())), | ||
}; | ||
} | ||
|
||
static Timetable parse(String jsonString) { | ||
final Map<String, dynamic> jsonMap = json.decode(jsonString); | ||
return Timetable.fromJson(jsonMap); | ||
} | ||
} |
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,43 @@ | ||
class TimetableMeta { | ||
final String? section; | ||
final String? type; | ||
final String? revision; | ||
final String? effectiveDate; | ||
final String? contributor; | ||
final String? name; | ||
final bool? isTimetableUpdating; | ||
|
||
TimetableMeta({ | ||
this.section, | ||
this.type, | ||
this.revision, | ||
this.effectiveDate, | ||
this.contributor, | ||
this.isTimetableUpdating, | ||
this.name, | ||
}); | ||
|
||
factory TimetableMeta.fromJson(Map<String, dynamic> json) { | ||
return TimetableMeta( | ||
section: json['section'], | ||
type: json['type'], | ||
revision: json['revision'], | ||
effectiveDate: json['effective-date'], | ||
contributor: json['contributor'], | ||
isTimetableUpdating: json['isTimetableUpdating'], | ||
name: json['name'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'section': section, | ||
'type': type, | ||
'revision': revision, | ||
'effective-date': effectiveDate, | ||
'contributor': contributor, | ||
'isTimetableUpdating': isTimetableUpdating, | ||
'name': name, | ||
}; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
client-app/lib/backend/models/timetable_schedule_entry.dart
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,27 @@ | ||
class ScheduleEntry { | ||
final String? subject; | ||
final String? room; | ||
final String? time; | ||
|
||
ScheduleEntry({ | ||
this.subject, | ||
this.room, | ||
this.time, | ||
}); | ||
|
||
factory ScheduleEntry.fromJson(Map<String, dynamic> json) { | ||
return ScheduleEntry( | ||
subject: json['subject'], | ||
room: json['room'], | ||
time: json['time'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'subject': subject, | ||
'room': room, | ||
'time': time, | ||
}; | ||
} | ||
} |
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
Oops, something went wrong.