feat(settings): add SMTP admin configuration

This commit is contained in:
Schubert Ferenc 2026-07-04 23:54:20 +02:00
parent c58e212e3a
commit 884a20e043
32 changed files with 1200 additions and 42 deletions

View file

@ -1,4 +1,5 @@
import type { Customer } from "@/types/customer";
import type { SystemStatusItem } from "@/types/system-settings";
export interface MetricCard {
label: string;
@ -16,6 +17,7 @@ export interface DashboardSummary {
users: MetricCard[];
roles: MetricCard[];
repairs: MetricCard[];
system_status: SystemStatusItem[];
activities: EmptyWidget;
tasks: EmptyWidget;
tickets: EmptyWidget;

View file

@ -0,0 +1,41 @@
export type SettingsSource = "database" | "environment" | "missing";
export interface SmtpSettings {
host: string;
port: number;
username: string;
password_is_set: boolean;
from_email: string;
from_name: string;
use_tls: boolean;
enabled: boolean;
source: SettingsSource;
}
export interface SmtpSettingsPayload {
host: string;
port: number;
username: string;
password?: string;
from_email: string;
from_name: string;
use_tls: boolean;
enabled: boolean;
}
export interface SmtpTestResponse {
success: boolean;
message: string;
source: SettingsSource;
}
export interface PublicLinksSettings {
repair_status_base_url: string;
source: SettingsSource;
}
export interface SystemStatusItem {
label: string;
value: string;
status: "ok" | "warning" | "info";
}