{$_("card_assignment_for_mobile")}

{#if state === "done"}

{$_("done")}

{cardCode}
{runnerinfo.firstname} {runnerinfo.lastname} [#{runnerinfo.id}]

{:else if state === "assigning"}

{$_("please_wait_a_moment_while_we_assign_the_card")}
{cardCode}

{:else if state === "error_runner"}

{$_("runner_not_found")}

{:else if state === "error_card"}

{$_("card_not_found")}

{:else} {#if runnerinfo.id === 0}

{$_("scan_runner")}

{$_("selfservice_qr_registration_barcode")}

{:else}

{runnerinfo.firstname} {runnerinfo.lastname}

ID: #{runnerinfo.id}
created_via: {runnerinfo.created_via}
{runnerinfo.group.name}

{/if} {/if} {#if state === "scan_card"}

{$_("scan_card")}

{$_("code_128_barcode")}

{/if} {#if state.includes("scan_")} {#if scannerActive} { if (scannerActive) { if (`${e.detail.decodedText}`.length === 13) { e.detail.decodedText = e.detail.decodedText.substring( 0, e.detail.decodedText.length - 1 ); } scannerActive = false; console.log({ type: "DETECT", code: e.detail.decodedText }); handleInput(e.detail.decodedText); } }} width={320} height={320} class="w-full max-w-sm bg-neutral-300 rounded-lg overflow-hidden" />
{ handleInput(barcodeInput.value); barcodeInput.value = ""; e.preventDefault(); }} class="mt-2" >
{/if} {#if runnerinfo.id !== 0 && state !== "scan_card"} {/if} {#if state === "scan_card" || runnerinfo.id !== 0} {/if} {/if}