update case index page segment index and show page

This commit is contained in:
Simon Pocrnjič
2025-12-14 20:57:39 +01:00
parent a6ec92ec6b
commit 80948d2944
14 changed files with 1141 additions and 626 deletions
+22 -1
View File
@@ -16,4 +16,25 @@ export function fmtDateTime(d) {
} catch (e) {
return String(d);
}
};
};
export function fmtCurrency(value) {
const n = Number(value ?? 0);
try {
return new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(
n
);
} catch (e) {
return `${n.toFixed(2)}`;
}
}
export function fmtDateDMY(value) {
if (!value) return "-";
const d = new Date(value);
if (isNaN(d)) return "-";
const dd = String(d.getDate()).padStart(2, "0");
const mm = String(d.getMonth() + 1).padStart(2, "0");
const yyyy = d.getFullYear();
return `${dd}.${mm}.${yyyy}`;
}