implemented a comprehensive client-side demo mode triggered by a "demo@" username prefix, serving curated fixture data for all app modules

This commit is contained in:
2026-07-07 20:24:16 +02:00
parent 2668b111f1
commit 9b74c9fd81
45 changed files with 1409 additions and 43 deletions
+34
View File
@@ -0,0 +1,34 @@
import '../../marianumconnect/models/mc_holiday.dart';
/// Demo fixtures for the holiday calendar — a couple of upcoming breaks,
/// positioned relative to "now" so they always read as still ahead.
class DemoHolidays {
const DemoHolidays._();
static List<McHoliday> upcoming() {
final today = DateTime.now();
DateTime day(int offset) =>
DateTime(today.year, today.month, today.day).add(Duration(days: offset));
return [
McHoliday(
shortName: 'Herbst',
longName: 'Herbstferien',
startDate: day(28),
endDate: day(42),
),
McHoliday(
shortName: 'Weihnachten',
longName: 'Weihnachtsferien',
startDate: day(90),
endDate: day(104),
),
McHoliday(
shortName: 'Ostern',
longName: 'Osterferien',
startDate: day(180),
endDate: day(194),
),
];
}
}