diff --git a/app/features/calendar/calendar-constants.ts b/app/features/calendar/calendar-constants.ts index 1682889939..7a13bc8e74 100644 --- a/app/features/calendar/calendar-constants.ts +++ b/app/features/calendar/calendar-constants.ts @@ -74,6 +74,9 @@ export const CALENDAR_EVENT = { export const REG_CLOSES_AT_OPTIONS = [ "0", + "5min", + "10min", + "15min", "30min", "1h", "1h30min", diff --git a/app/features/calendar/calendar-utils.ts b/app/features/calendar/calendar-utils.ts index 814bf9ad4a..85e43befb1 100644 --- a/app/features/calendar/calendar-utils.ts +++ b/app/features/calendar/calendar-utils.ts @@ -91,6 +91,12 @@ export function regClosesAtDate({ if (closesAt === "0") return startTime; switch (closesAt) { + case "5min": + return new Date(startTime.getTime() - 5 * 60 * 1000); + case "10min": + return new Date(startTime.getTime() - 10 * 60 * 1000); + case "15min": + return new Date(startTime.getTime() - 15 * 60 * 1000); case "30min": return new Date(startTime.getTime() - 30 * 60 * 1000); case "1h": @@ -120,6 +126,12 @@ export function regClosesAtToDisplayName(closesAt: RegClosesAtOption) { switch (closesAt) { case "0": return "At the start time"; + case "5min": + return "5 minutes"; + case "10min": + return "10 minutes"; + case "15min": + return "15 minutes"; case "30min": return "30 minutes"; case "1h": @@ -154,6 +166,9 @@ export function datesToRegClosesAt({ }) { const diff = startTime.getTime() - regClosesAt.getTime(); if (diff === 0) return "0"; + if (diff === 5 * 60 * 1000) return "5min"; + if (diff === 10 * 60 * 1000) return "10min"; + if (diff === 15 * 60 * 1000) return "15min"; if (diff === 30 * 60 * 1000) return "30min"; if (diff === 60 * 60 * 1000) return "1h"; if (diff === 90 * 60 * 1000) return "1h30min";