Remove old Server logic, cleanup
This commit is contained in:
@ -14,20 +14,12 @@ import '../../../data/timetable/timetableProps.dart';
|
||||
extension DateHelpers on DateTime {
|
||||
bool isToday() {
|
||||
final now = DateTime.now();
|
||||
return now.day == this.day &&
|
||||
now.month == this.month &&
|
||||
now.year == this.year;
|
||||
}
|
||||
|
||||
bool isYesterday() {
|
||||
final yesterday = DateTime.now().subtract(Duration(days: 1));
|
||||
return yesterday.day == this.day &&
|
||||
yesterday.month == this.month &&
|
||||
yesterday.year == this.year;
|
||||
return now.day == day &&
|
||||
now.month == month &&
|
||||
now.year == year;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class WeekView extends StatefulWidget {
|
||||
final TimetableProps value;
|
||||
const WeekView(this.value, {Key? key}) : super(key: key);
|
||||
@ -51,13 +43,13 @@ class _WeekViewState extends State<WeekView> {
|
||||
showModalBottomSheet(context: context, builder: (context) => Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 30),
|
||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
const Icon(Icons.info),
|
||||
Icon(Icons.info, color: event.backgroundColor),
|
||||
const SizedBox(height: 10),
|
||||
Text("${subject.alternateName} - (${subject.longName})", style: const TextStyle(fontSize: 30)),
|
||||
Text("${getEventPrefix(timetableData.code)}${subject.alternateName} - (${subject.longName})", style: const TextStyle(fontSize: 30)),
|
||||
Text("${Jiffy(event.startTime).format("HH:mm")} - ${Jiffy(event.endTime).format("HH:mm")}", style: const TextStyle(fontSize: 15)),
|
||||
],
|
||||
),
|
||||
@ -69,7 +61,7 @@ class _WeekViewState extends State<WeekView> {
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.notifications_active),
|
||||
title: Text("Status: ${timetableData.code != null ? "Entfällt" : "Findet statt"}"),
|
||||
title: Text("Status: ${timetableData.code != null ? "Geändert" : "Regulär"}"),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.room),
|
||||
@ -109,7 +101,6 @@ class _WeekViewState extends State<WeekView> {
|
||||
|
||||
List<LaneEvents> _buildLaneEvents(TimetableProps data) {
|
||||
List<LaneEvents> laneEvents = List<LaneEvents>.empty(growable: true);
|
||||
Jiffy.locale("de"); // todo move outwards
|
||||
|
||||
GetTimetableResponse timetable = data.getTimetableResponse;
|
||||
GetRoomsResponse rooms = data.getRoomsResponse;
|
||||
|
Reference in New Issue
Block a user