From 17fd4fa392dfb4d2994e74367ee2c12247737c17 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Mon, 29 Jan 2024 15:11:44 -0800 Subject: [PATCH] feat: copy custom events --- apps/antalmanac/src/stores/Schedules.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/antalmanac/src/stores/Schedules.ts b/apps/antalmanac/src/stores/Schedules.ts index a2c3c8114..8fc35461e 100644 --- a/apps/antalmanac/src/stores/Schedules.ts +++ b/apps/antalmanac/src/stores/Schedules.ts @@ -126,6 +126,14 @@ export class Schedules { this.addCourse(course, to, false); } } + + for (const customEvent of this.getCurrentCustomEvents()) { + if (to === this.getNumberOfSchedules()) { + this.addCustomEvent(customEvent, [...Array(to).keys()]); + } else { + this.addCustomEvent(customEvent, [to]); + } + } } // --- Course related methods ---