changes
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
maxlength="20"
|
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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ interface CheckFastcheckResponse {
|
|||||||
styleUrl: './fastcheck-page.scss'
|
styleUrl: './fastcheck-page.scss'
|
||||||
})
|
})
|
||||||
export class FastcheckPage {
|
export class FastcheckPage {
|
||||||
|
private readonly defaultPartnerId = 'fast-c202-4062-bcfb-8b4c8cc59adc';
|
||||||
|
|
||||||
private http = inject(HttpClient);
|
private http = inject(HttpClient);
|
||||||
private store = inject(FastcheckService);
|
private store = inject(FastcheckService);
|
||||||
private i18n = inject(TranslationService);
|
private i18n = inject(TranslationService);
|
||||||
@@ -52,10 +54,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>('');
|
||||||
newQrUrl = computed(() => {
|
newQrUrl = computed(() => {
|
||||||
const id = this.partnerId();
|
const id = this.partnerId() || this.defaultPartnerId;
|
||||||
return id
|
return `https://qr.vitanova.network/?id=${encodeURIComponent(id)}`;
|
||||||
? `https://qr.vitanova.network/?id=${encodeURIComponent(id)}`
|
|
||||||
: 'https://qr.vitanova.network/';
|
|
||||||
});
|
});
|
||||||
|
|
||||||
popupOpen = signal<boolean>(false);
|
popupOpen = signal<boolean>(false);
|
||||||
@@ -107,8 +107,8 @@ export class FastcheckPage {
|
|||||||
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
// ?id=<partnerId> — just propagated to the "New" button URL.
|
// ?id=<partnerId> — used by the "New" button URL; fallback to default id.
|
||||||
this.partnerId.set(params.get('id') ?? '');
|
this.partnerId.set(params.get('id') ?? this.defaultPartnerId);
|
||||||
|
|
||||||
// ?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') ?? '';
|
||||||
|
|||||||
Reference in New Issue
Block a user