feat: add admin settings for reminder hour and minutes, and update expiry warning handling in UI and translations
This commit is contained in:
@@ -13,7 +13,7 @@ type IntakeReminderState = {
|
||||
sentReminders: string[]; // Array of "medName:timestamp" to track sent reminders
|
||||
};
|
||||
|
||||
const REMINDER_MINUTES_BEFORE = 15;
|
||||
const REMINDER_MINUTES_BEFORE = parseInt(process.env.REMINDER_MINUTES_BEFORE ?? "15", 10);
|
||||
const CHECK_INTERVAL_MS = 60 * 1000; // Check every 1 minute
|
||||
|
||||
// Get current timezone from TZ env variable or default to UTC
|
||||
|
||||
@@ -36,7 +36,7 @@ type ReminderState = {
|
||||
lastNotificationChannel: "email" | "push" | "both" | null; // Channel used for last notification
|
||||
};
|
||||
|
||||
const REMINDER_HOUR = 6; // 6:00 AM local time
|
||||
const REMINDER_HOUR = parseInt(process.env.REMINDER_HOUR ?? "6", 10); // Default 6:00 AM local time
|
||||
|
||||
// Get current timezone from TZ env variable or default to UTC
|
||||
function getTimezone(): string {
|
||||
|
||||
Reference in New Issue
Block a user