minor UI fixes

This commit is contained in:
sairaj mote 2022-05-13 19:43:23 +05:30
parent 7a1c95ec09
commit 79a387fb7c
2 changed files with 2 additions and 2 deletions

View File

@ -1097,7 +1097,7 @@
console.log(`Welcome ${myFloID}`);
document.querySelectorAll('.logged-in-user-id').forEach(elem => elem.value = myFloID);
floGlobals.isSubAdmin = floGlobals.subAdmins.includes(myFloID)
tokenAPI.getBalance(myFloID).then(balance => {
tokenAPI.getBalance(myFloID).then((balance = 0) => {
const [beforeDecimal, afterDecimal] = formatAmount(balance).split('₹')[1].split('.')
getRef('rupee_balance').innerHTML = `<span><b>${beforeDecimal}</b></span>.<span>${afterDecimal}</span>`
})

View File

@ -382,7 +382,7 @@ function getFloIdTitle(floID) {
function formatAmount(amount = 0) {
if (!amount)
return '0';
return '₹0.00';
return amount.toLocaleString(`en-IN`, { style: 'currency', currency: 'INR' })
}