feat: integrate undergraduate school workflows and period twelve

This commit is contained in:
Codex
2026-10-15 00:28:04 +08:00
parent 7939bd4c3c
commit b28f333720
15 changed files with 573 additions and 26 deletions
+6 -4
View File
@@ -14,7 +14,9 @@ class WeekGrid extends StatelessWidget {
required this.monday,
required this.today,
required this.settings,
});
this.periodCount = 11,
}) : assert(periodCount == 11 || periodCount == 12);
final int periodCount;
final List<CourseOccurrence> events;
final DateTime monday, today;
final AppSettings settings;
@@ -111,7 +113,7 @@ class WeekGrid extends StatelessWidget {
(period - 1) * rowHeight +
(period > 4 ? gap : 0) +
(period > 8 ? gap : 0);
final height = 11 * rowHeight + 2 * gap;
final height = periodCount * rowHeight + 2 * gap;
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -120,7 +122,7 @@ class WeekGrid extends StatelessWidget {
height: header + height,
child: Stack(
children: [
for (final slot in lessonSlots)
for (final slot in lessonSlots.take(periodCount))
Positioned(
top: header + top(slot.period),
left: 0,
@@ -244,7 +246,7 @@ class WeekGrid extends StatelessWidget {
),
),
),
for (var p = 1; p <= 11; p++)
for (var p = 1; p <= periodCount; p++)
Positioned(
left: 0,
right: 0,