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:
@@ -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),
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user