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,6 +91,7 @@
} }
</div> </div>
@if (hasPartnerId()) {
<button class="pay-btn" type="button" (click)="pay()" [disabled]="!canPay()"> <button class="pay-btn" type="button" (click)="pay()" [disabled]="!canPay()">
<span class="pay-btn__icon"> <span class="pay-btn__icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor"
@@ -101,6 +102,7 @@
</span> </span>
{{ 'fastcheck.pay_btn' | translate }} {{ 'fastcheck.pay_btn' | translate }}
</button> </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') ?? '';