minor UI fixes
This commit is contained in:
parent
7a1c95ec09
commit
79a387fb7c
@ -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>`
|
||||
})
|
||||
|
||||
@ -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' })
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user