Fix order-filter dropdowns, restructure Konto identity line, drop blog reset link
- CustomSelect.tsx: mousedown on an option blurred the trigger button before the click landed, unmounting the list before anything could be selected — add preventDefault on the list's mousedown to stop that. - KontoShell no longer renders "Eingeloggt als ..." above each page's content; each page renders its own title then AccountIdentity right below it, and ProfileForm's now-duplicate email/Kundennummer line is removed. - Blog category filter: drop the separate "Zurücksetzen" link — clicking an active category badge again already deactivates it. - Werkzeuge cards: more vertical gap between stacked cards below sm:. - Legal pages' "Stand: ..." line is now derived from the LegalPages doc's own updatedAt instead of a hand-typed string. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018unaXmuzVA8ct1b6WoyP1U
This commit is contained in:
@@ -31,3 +31,12 @@ export function formatDate(iso: string): string {
|
||||
const day = String(d.getDate()).padStart(2, "0");
|
||||
return `${day}. ${MONTHS_DE[d.getMonth()]} ${d.getFullYear()}`;
|
||||
}
|
||||
|
||||
// "Juli 2026" — for legal pages' "Stand: …" line, derived from the
|
||||
// LegalPages doc's own updatedAt so it always reflects when the template
|
||||
// was actually last edited, instead of a hand-typed string an admin has
|
||||
// to remember to bump on every content change.
|
||||
export function formatMonthYear(iso: string): string {
|
||||
const d = new Date(iso);
|
||||
return `${MONTHS_DE[d.getMonth()]} ${d.getFullYear()}`;
|
||||
}
|
||||
|
||||
@@ -838,6 +838,7 @@ export type LegalPage = {
|
||||
title: string;
|
||||
content: unknown;
|
||||
attachment: { url: string; title: string } | null;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
type PayloadLegalPage = {
|
||||
@@ -845,6 +846,7 @@ type PayloadLegalPage = {
|
||||
title: string;
|
||||
content: unknown;
|
||||
attachment: { url: string; title: string } | number | null;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export async function getLegalPage(type: LegalPageType, options?: { draft?: boolean }): Promise<LegalPage | null> {
|
||||
@@ -872,6 +874,7 @@ export async function getLegalPage(type: LegalPageType, options?: { draft?: bool
|
||||
typeof doc.attachment === "object" && doc.attachment
|
||||
? { url: doc.attachment.url, title: doc.attachment.title }
|
||||
: null,
|
||||
updatedAt: doc.updatedAt,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user