This commit is contained in:
sdarbinyan
2026-05-13 16:46:13 +04:00
parent 74dd52335f
commit 9705849aed
2 changed files with 17 additions and 11 deletions

View File

@@ -91,16 +91,18 @@
} }
</div> </div>
<button class="pay-btn" type="button" (click)="pay()" [disabled]="!canPay()"> @if (hasPartnerId()) {
<span class="pay-btn__icon"> <button class="pay-btn" type="button" (click)="pay()" [disabled]="!canPay()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" <span class="pay-btn__icon">
stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor"
<rect x="1" y="4" width="22" height="16" rx="2" ry="2" /> stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<line x1="1" y1="10" x2="23" y2="10" /> <rect x="1" y="4" width="22" height="16" rx="2" ry="2" />
</svg> <line x1="1" y1="10" x2="23" y2="10" />
</span> </svg>
{{ 'fastcheck.pay_btn' | translate }} </span>
</button> {{ 'fastcheck.pay_btn' | translate }}
</button>
}
</div> </div>
<div class="card__footer"> <div class="card__footer">

View File

@@ -74,6 +74,8 @@ export class FastcheckPage {
// Pass-through partner id from ?id= used by the "New" button link. // Pass-through partner id from ?id= used by the "New" button link.
partnerId = signal<string>(''); partnerId = signal<string>('');
// True only when a real ?id was present in the URL (not the default fallback).
hasPartnerId = signal<boolean>(false);
newQrUrl = computed(() => { newQrUrl = computed(() => {
const id = this.partnerId() || this.defaultPartnerId; const id = this.partnerId() || this.defaultPartnerId;
return `https://qr.vitanova.network/?id=${encodeURIComponent(id)}`; return `https://qr.vitanova.network/?id=${encodeURIComponent(id)}`;
@@ -145,7 +147,9 @@ export class FastcheckPage {
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
// ?id=<partnerId> — used by the "New" button URL; fallback to default id. // ?id=<partnerId> — used by the "New" button URL; fallback to default id.
this.partnerId.set(params.get('id') ?? this.defaultPartnerId); const idParam = params.get('id');
this.partnerId.set(idParam ?? this.defaultPartnerId);
this.hasPartnerId.set(!!idParam);
// ?iid=xxxxxx-xxxxxx-xxxxxx — auto-fill and trigger lookup // ?iid=xxxxxx-xxxxxx-xxxxxx — auto-fill and trigger lookup
const iidParam = params.get('iid') ?? ''; const iidParam = params.get('iid') ?? '';