feat: Add email configuration and alert system

Introduces SMTP configuration settings and alert definitions to enable automated email notifications.
This includes new types for `SmtpConfig` and `AlertDefinition`, and integrates these into the settings page and mock database.
Adds styling for select elements and scrollbar hiding in the main HTML.
Updates mock database logic to potentially support local development without a backend.
This commit is contained in:
2025-12-06 23:01:02 +01:00
parent 89f4c9946b
commit 26fc451871
13 changed files with 1167 additions and 223 deletions

View File

@@ -16,10 +16,31 @@ export interface Payment {
notes?: string;
}
export interface SmtpConfig {
host: string;
port: number;
user: string;
pass: string;
secure: boolean;
fromEmail: string;
}
export interface AlertDefinition {
id: string;
subject: string;
body: string;
daysOffset: number; // Number of days
offsetType: 'before_next_month' | 'after_current_month';
sendHour: number; // 0-23
active: boolean;
lastSent?: string; // ISO Date of last execution
}
export interface AppSettings {
defaultMonthlyQuota: number;
condoName: string;
currentYear: number; // The active fiscal year
smtpConfig?: SmtpConfig;
}
export enum PaymentStatus {
@@ -42,6 +63,7 @@ export interface User {
role?: 'admin' | 'poweruser' | 'user';
phone?: string;
familyId?: string | null;
receiveAlerts?: boolean;
}
export interface AuthResponse {