This commit is contained in:
sdarbinyan
2026-05-13 00:53:27 +04:00
parent e04514f97b
commit 985ec5db7f
2 changed files with 7 additions and 7 deletions

View File

@@ -28,7 +28,7 @@
autocomplete="off"
maxlength="20"
/>
<a class="btn btn--ghost" [href]="newQrUrl()" target="_blank" rel="noopener" aria-label="Создать новый fastCHECK">{{ 'fastcheck.number_new' | translate }}</a>
<a class="btn btn--ghost" [href]="newQrUrl()" aria-label="Создать новый fastCHECK">{{ 'fastcheck.number_new' | translate }}</a>
</div>
</div>

View File

@@ -33,6 +33,8 @@ interface CheckFastcheckResponse {
styleUrl: './fastcheck-page.scss'
})
export class FastcheckPage {
private readonly defaultPartnerId = 'fast-c202-4062-bcfb-8b4c8cc59adc';
private http = inject(HttpClient);
private store = inject(FastcheckService);
private i18n = inject(TranslationService);
@@ -52,10 +54,8 @@ export class FastcheckPage {
// Pass-through partner id from ?id= used by the "New" button link.
partnerId = signal<string>('');
newQrUrl = computed(() => {
const id = this.partnerId();
return id
? `https://qr.vitanova.network/?id=${encodeURIComponent(id)}`
: 'https://qr.vitanova.network/';
const id = this.partnerId() || this.defaultPartnerId;
return `https://qr.vitanova.network/?id=${encodeURIComponent(id)}`;
});
popupOpen = signal<boolean>(false);
@@ -107,8 +107,8 @@ export class FastcheckPage {
const params = new URLSearchParams(window.location.search);
// ?id=<partnerId> — just propagated to the "New" button URL.
this.partnerId.set(params.get('id') ?? '');
// ?id=<partnerId> — used by the "New" button URL; fallback to default id.
this.partnerId.set(params.get('id') ?? this.defaultPartnerId);
// ?iid=xxxxxx-xxxxxx-xxxxxx — auto-fill and trigger lookup
const iidParam = params.get('iid') ?? '';