error handling
This commit is contained in:
parent
42ec4741fe
commit
7907a0a389
@ -1102,7 +1102,7 @@
|
||||
getRef('rupee_balance').innerHTML = `<span><b>${beforeDecimal}</b></span>.<span>${afterDecimal}</span>`
|
||||
})
|
||||
floBlockchainAPI.getBalance(myFloID).then(balance => {
|
||||
const [beforeDecimal, afterDecimal] = String(balance).split('.')
|
||||
const [beforeDecimal, afterDecimal = '0'] = String(balance).split('.')
|
||||
getRef('flo_balance').innerHTML = `<span><b>${beforeDecimal}</b></span>.<span>${afterDecimal}</span>`
|
||||
})
|
||||
if (floGlobals.isSubAdmin) {
|
||||
|
||||
@ -381,6 +381,8 @@ function getFloIdTitle(floID) {
|
||||
}
|
||||
|
||||
function formatAmount(amount = 0) {
|
||||
if (!amount)
|
||||
return '0';
|
||||
return amount.toLocaleString(`en-IN`, { style: 'currency', currency: 'INR' })
|
||||
}
|
||||
|
||||
@ -429,6 +431,7 @@ const render = {
|
||||
},
|
||||
cashierRequestCard(details) {
|
||||
const { time, senderID, message: { mode, amount = 0 }, note, tag, vectorClock } = details;
|
||||
console.log(details);
|
||||
const clone = getRef('cashier_request_template').content.cloneNode(true).firstElementChild;
|
||||
clone.id = vectorClock;
|
||||
const status = tag || note; //status tag for completed, note for rejected
|
||||
|
||||
Loading…
Reference in New Issue
Block a user