Added option to change cashier UPI ID
This commit is contained in:
parent
25c02f99ae
commit
72cd5d20f9
15
index.html
15
index.html
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
//Required for blockchain API operators
|
//Required for blockchain API operators
|
||||||
apiURL: {
|
apiURL: {
|
||||||
FLO: ['https://livenet.flocha.in/', 'https://flosight.duckdns.org/'],
|
FLO: ['https://flosight.duckdns.org/', 'https://livenet.flocha.in/'],
|
||||||
FLO_TEST: ['https://testnet-flosight.duckdns.org/', 'https://testnet.flocha.in/']
|
FLO_TEST: ['https://testnet-flosight.duckdns.org/', 'https://testnet.flocha.in/']
|
||||||
},
|
},
|
||||||
adminID: "FKAEdnPfjXLHSYwrXQu377ugN4tXU7VGdf",
|
adminID: "FKAEdnPfjXLHSYwrXQu377ugN4tXU7VGdf",
|
||||||
@ -203,7 +203,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</tab-panels>
|
</tab-panels>
|
||||||
</section>
|
</section>
|
||||||
<section id="settings" class="page hide gap-1-5">
|
<section id="settings" class="page hide gap-2">
|
||||||
<h4>Settings</h4>
|
<h4>Settings</h4>
|
||||||
<section class="grid gap-1">
|
<section class="grid gap-1">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
@ -212,6 +212,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<sm-button class="danger justify-self-start" onclick="signOut()">Sign out</sm-button>
|
<sm-button class="danger justify-self-start" onclick="signOut()">Sign out</sm-button>
|
||||||
</section>
|
</section>
|
||||||
|
<section class="admin-element grid gap-1">
|
||||||
|
<h4>Change UPI ID</h4>
|
||||||
|
<sm-form style="width: min(100%,24rem);">
|
||||||
|
<sm-input id="upi_id" placeholder="UPI ID" pattern="[a-zA-Z0-9_]{3,}@[a-zA-Z]{3,}"
|
||||||
|
error-text="Invalid UPI ID" animate required></sm-input>
|
||||||
|
<button class="button button--primary cta justify-self-start" type="submit"
|
||||||
|
onclick="changeUpi()">
|
||||||
|
Change
|
||||||
|
</button>
|
||||||
|
</sm-form>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<nav id="main_navbar">
|
<nav id="main_navbar">
|
||||||
|
|||||||
@ -285,6 +285,15 @@ function executeUserAction() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeUpi() {
|
||||||
|
const upiID = getRef('upi_id').value.trim()
|
||||||
|
Cashier.updateUPI(upiID).then(() => {
|
||||||
|
notify('UPI ID updated successfully', 'success')
|
||||||
|
}).catch(err => {
|
||||||
|
notify(err, 'error')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function signOut() {
|
function signOut() {
|
||||||
getConfirmation('Sign out?', 'You are about to sign out of the app, continue?', 'Stay', 'Leave')
|
getConfirmation('Sign out?', 'You are about to sign out of the app, continue?', 'Stay', 'Leave')
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user