From 092d2479b6dbf81924f83232069c21c3a702f221 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Wed, 31 Jan 2024 13:20:43 -0800 Subject: [PATCH] feat: copy custom events (#869) --- 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 ---