query
This commit is contained in:
@@ -51,6 +51,15 @@ export class FastcheckPage {
|
||||
error = signal<string>('');
|
||||
amountLoading = signal<boolean>(false);
|
||||
|
||||
// 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/';
|
||||
});
|
||||
|
||||
popupOpen = signal<boolean>(false);
|
||||
popupLoading = signal<boolean>(false);
|
||||
popupError = signal<string>('');
|
||||
@@ -98,8 +107,13 @@ export class FastcheckPage {
|
||||
this.codeEnabled.set(true);
|
||||
}
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
|
||||
// ?id=<partnerId> — just propagated to the "New" button URL.
|
||||
this.partnerId.set(params.get('id') ?? '');
|
||||
|
||||
// ?iid=xxxxxx-xxxxxx-xxxxxx — auto-fill and trigger lookup
|
||||
const iidParam = new URLSearchParams(window.location.search).get('iid') ?? '';
|
||||
const iidParam = params.get('iid') ?? '';
|
||||
if (iidParam && !created) {
|
||||
const digits = iidParam.replace(/\D/g, '').slice(0, 18);
|
||||
const groups: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user