Fix Text to Speech Menu Landing Page && Add barchart Landing Page APBDes

This commit is contained in:
2025-11-06 11:35:04 +08:00
parent f66a46f645
commit db8909b9ed
11 changed files with 352 additions and 77 deletions

View File

@@ -0,0 +1,13 @@
export default function parseJumlah(value: string): number {
if (!value) return 0;
const cleaned = value.toUpperCase().trim().replace(",", ".");
const num = parseFloat(cleaned);
if (cleaned.includes("T")) return num * 1_000_000_000_000;
if (cleaned.includes("M")) return num * 1_000_000_000;
if (cleaned.includes("JT")) return num * 1_000_000;
if (cleaned.includes("K")) return num * 1_000;
return num;
}