progress bar on dashboard & number formatting

This commit is contained in:
knighthawk4227 committed 2025-05-14 21:47:50 -07:00
1 parent 4f73959cfb
commit 563fa502d1
5 files changed
+70 -102

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
document.addEventListener("DOMContentLoaded", () => {
const number = document.querySelectorAll(".planGoal");
number.forEach(value => {
num = parseFloat(value.textContent);
if (num >= 999999) {
value.textContent = (num /= 1000000).toFixed(2) + "M";
console.log(value.textContent);
} else if (num > 999) {
value.textContent = (num /= 1000).toFixed(2) + "K";
} else {
return num;
}
});
});