refactor(frontend): fix undefined --danger-color, dedup formatDate & require2FAOptions, drop double plan.css import
- base.css: var(--danger-color) (undefined, no fallback -> inherited color) -> var(--danger) - attendanceHelpers: re-export formatDate from formatters instead of a byte-identical copy - dashboard.ts: remove dead duplicate require2FAOptions (canonical copy is in settings.ts) - settings.ts: remove unused @deprecated systemSettingsOptions alias - PlanWork: drop redundant per-page plan.css import (loaded globally in AdminApp) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,11 +21,9 @@ interface AttendanceRecord {
|
||||
}>;
|
||||
}
|
||||
|
||||
export const formatDate = (dateStr: string | null | undefined): string => {
|
||||
if (!dateStr) return "—";
|
||||
const d = new Date(dateStr);
|
||||
return d.toLocaleDateString("cs-CZ");
|
||||
};
|
||||
// formatDate is defined once in ./formatters and re-exported here so existing
|
||||
// importers of attendanceHelpers keep working without a duplicate definition.
|
||||
export { formatDate } from "./formatters";
|
||||
|
||||
/** Extract time as HH:MM from a datetime string without timezone conversion */
|
||||
const extractTime = (datetime: string): string => {
|
||||
|
||||
Reference in New Issue
Block a user