minor UI fix

This commit is contained in:
sairaj mote 2022-06-06 20:04:23 +05:30
parent 46056f9a39
commit 330f9ad8a3

View File

@ -707,11 +707,13 @@ const render = {
if (getRef('topup_wallet__qr_wrapper').open) { if (getRef('topup_wallet__qr_wrapper').open) {
getRef('topup_steps').querySelectorAll('.conditional').forEach(e => e.remove()); getRef('topup_steps').querySelectorAll('.conditional').forEach(e => e.remove());
} else { } else {
const amount = parseFloat(getRef('request_cashier_amount').value.trim()); if (getRef('topup_steps').children.length < 4) {
const conditionalSteps = getRef('conditional_steps_template').content.cloneNode(true); const amount = parseFloat(getRef('request_cashier_amount').value.trim());
conditionalSteps.querySelector('.amount').textContent = formatAmount(amount); const conditionalSteps = getRef('conditional_steps_template').content.cloneNode(true);
conditionalSteps.querySelector('.tx-code').setAttribute('value',floGlobals.txCode); conditionalSteps.querySelector('.amount').textContent = formatAmount(amount);
getRef('topup_steps').children[1].after(conditionalSteps) conditionalSteps.querySelector('.tx-code').setAttribute('value',floGlobals.txCode);
getRef('topup_steps').children[1].after(conditionalSteps)
}
} }
} }
}; };