update case index page segment index and show page
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
Reference in New Issue
Block a user