feat: display actual reminder schedule from server config (#386)

- Expose REMINDER_HOUR and REMINDER_MINUTES_BEFORE env values via settings API
- Add reminderHour and reminderMinutesBefore to frontend Settings interface
- Replace hardcoded i18n strings with parameterized translations
- Settings page now shows configured schedule instead of static 6:00 / 15 min
This commit is contained in:
Daniel Volz
2026-03-06 19:51:19 +01:00
committed by GitHub
parent 30c97e2f0d
commit 5b6c6abb69
5 changed files with 18 additions and 6 deletions
+4
View File
@@ -326,6 +326,8 @@ export async function settingsRoutes(app: FastifyInstance) {
const userId = await getUserId(request, reply);
const settings = await getOrCreateUserSettings(userId);
const reminderHour = envInt("REMINDER_HOUR", 6);
const reminderMinutesBefore = envInt("REMINDER_MINUTES_BEFORE", 15);
return reply.send({
// User notification settings (from DB)
@@ -376,6 +378,8 @@ export async function settingsRoutes(app: FastifyInstance) {
lastPrescriptionReminderChannel: settings.lastPrescriptionReminderChannel ?? null,
lastPrescriptionReminderMedNames: settings.lastPrescriptionReminderMedNames ?? null,
// Server settings (from .env, read-only)
reminderHour,
reminderMinutesBefore,
expiryWarningDays: parseInt(process.env.EXPIRY_WARNING_DAYS ?? "30", 10),
});
});