campaign sending prototype

This commit is contained in:
2026-06-24 16:20:37 +02:00
parent 44516a03aa
commit ce30b4d054
17 changed files with 1233 additions and 14 deletions

View File

@@ -1,3 +1,5 @@
import { formatDateTime as formatPlatformDateTime } from "../../utils/datetime";
export function adminErrorMessage(error: unknown): string {
if (!(error instanceof Error)) return "The administrative operation failed.";
const message = error.message;
@@ -17,9 +19,7 @@ export function adminErrorMessage(error: unknown): string {
}
export function formatDateTime(value?: string | null): string {
if (!value) return "Never";
const date = new Date(value);
return Number.isNaN(date.getTime()) ? value : date.toLocaleString();
return formatPlatformDateTime(value, { fallback: "Never" });
}
export function joinLabels(values: Array<{ name: string }>): string {