Fix QR codes views to use user.qr-codes route names.
Deploy Ladill QR Plus / deploy (push) Successful in 56s
Deploy Ladill QR Plus / deploy (push) Successful in 56s
Removes missing topup route/modal and sends low-balance users to the platform wallet. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -352,6 +352,7 @@ document.addEventListener('alpine:init', () => {
|
||||
balance: Number(config.balance ?? 0),
|
||||
price: Number(config.price ?? 0),
|
||||
modalId: config.modalId ?? null,
|
||||
topupUrl: config.topupUrl ?? null,
|
||||
href: config.href ?? null,
|
||||
requiresPayment: Object.prototype.hasOwnProperty.call(config, 'requiresPayment')
|
||||
? config.requiresPayment !== false
|
||||
@@ -367,6 +368,11 @@ document.addEventListener('alpine:init', () => {
|
||||
return this.needsTopupFor(this.requiresPayment);
|
||||
},
|
||||
openTopup() {
|
||||
if (this.topupUrl) {
|
||||
window.location.href = this.topupUrl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (! this.modalId) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user