I am done for the night/morning...

This commit is contained in:
2024-04-10 20:31:32 -04:00
parent 5411df5893
commit 920dd176fe
8 changed files with 2092 additions and 40 deletions

View File

@@ -643,11 +643,6 @@ function handle_qr_camera(event) {
<header class="popover__header flex gap-1 justify-between items-center p-1 border-b">
<h2 class="h3">Scan</h2>
<div class="variant-ghost-error">
<span class="fas fa-exclamation-triangle mx-1"></span>
<span>Bug fix in progress for scanning with some devices -2024-04-10 10:15 AM</span>
</div>
<div class="popover__actions">
<button
type="button"
@@ -658,7 +653,7 @@ function handle_qr_camera(event) {
}}
>
<span class="fas fa-times mx-1"></span>
Close X
Close
</button>
</div>
</header>

View File

@@ -10,6 +10,8 @@ import { events_loc, events_sess, events_slct, events_trigger } from '$lib/ae_ev
import { events_func } from '$lib/ae_events_functions';
import Element_qr_scanner from '$lib/element_qr_scanner.svelte';
import Element_qr_scanner_v2 from '$lib/element_qr_scanner_v2.svelte';
import Element_qr_scanner_dev from '$lib/element_qr_scanner_dev.svelte';
// TEMPORARY: For testing and development
@@ -202,7 +204,14 @@ function handle_qr_camera(event) {
Please check your browser's permissions.
{/if}
</p>
<!--
<Element_qr_scanner
start_qr_scanner={false}
show_qr_scan_result={true}
show_qr_manual_badge_id_entry_option={true}
on:qr_scan_result={handle_qr_scan_result}
on:qr_camera={handle_qr_camera}
/> -->
<span class="flex flex-col md:flex-row wrap justify-center items-center">
<button
@@ -218,7 +227,7 @@ function handle_qr_camera(event) {
}}
title="Scan a QR code to add a person to the leads list."
>
<span class="fas fa-qrcode mx-1"></span>
<span class="fas fa-qrcode mx-2"></span>
Scan to Add Person
</button>
@@ -232,10 +241,9 @@ function handle_qr_camera(event) {
// event_exhibit_tracking_obj_create_promise = null;
$events_sess.leads.show_form__search = true;
}}
disabled={!$ae_loc.trusted_access && 2==4}
title="Search for a person to add to the leads list."
>
<span class="fas fa-search mx-1"></span>
<span class="fas fa-search mx-2"></span>
Search to Add Person
</button>
</span>
@@ -249,6 +257,26 @@ function handle_qr_camera(event) {
</span>
{#if $events_loc.leads.show_content__scan_requirements}
<div class="border border-slate-500/10 p-2 variant-ghost-warning p-1">
<span class="fas fa-exclamation-triangle mx-1"></span>
<span>
<strong>Alert</strong>
<span>Use Scanner Version:</span>
<select
bind:value={$ae_loc.qr_scanner_version}
class="select w-52"
>
<option value={'one'}>v1</option>
<option value={'two'}>v2</option>
<option value={"dev"}>Development</option>
</select>
<p>A bug was found late Monday that affects some mobile devices (cell phones and tablets). Incremental fixes have been added, but this issue has been difficult to address accoss all devices. We recommend most users stick with v1 (default). If you are not having any trouble and have no idea what this message is about, then this is what you want.</p>
<p>We recommend you try v2 if you are having trouble with the camera not starting or turning on. This version allows you to manually attempt to Allow Camera Access and to Start Scanning if it does not start on its own. This fix is not perfect. A permanent solution is actively being worked on in the development version.</p>
<p>A fix is in progress to address all devices. -2024-04-10 2:25 AM (Prague time)</p>
</span>
</div>
<div class="border border-slate-500/10 p-2 variant-soft-secondary">
<p>You will need a device with a camera to scan the QR codes. You will also of course need one or more valid QR codes to scan.
<!-- <button class="ae_btn btn_sm" on:click={() => show='qr_codes'}><span class="fas fa-qrcode"></span> Example QR Codes</button> -->
@@ -305,7 +333,7 @@ function handle_qr_camera(event) {
placeholder="Search for attendee"
bind:value={$events_sess.leads.entered_search_str}
required
class="input max-w-56"
class="input text-lg w-56"
autofocus
/>
@@ -660,8 +688,7 @@ function handle_qr_camera(event) {
<section class="popover__content grow flex flex-col gap-4 items-center ae_modal_scrollfix">
<!-- <div class=""> -->
{#if !$ae_loc.qr_scanner_version || $ae_loc.qr_scanner_version == 'one'}
<Element_qr_scanner
start_qr_scanner={$events_sess.leads.qr_scan_start}
show_qr_scan_result={true}
@@ -669,7 +696,28 @@ function handle_qr_camera(event) {
on:qr_scan_result={handle_qr_scan_result}
on:qr_camera={handle_qr_camera}
/>
<!-- </div> -->
{:else if $ae_loc.qr_scanner_version == 'two'}
<Element_qr_scanner_v2
start_qr_scanner={$events_sess.leads.qr_scan_start}
show_qr_scan_result={true}
show_qr_manual_badge_id_entry_option={true}
on:qr_scan_result={handle_qr_scan_result}
on:qr_camera={handle_qr_camera}
/>
<!-- v2 -->
{:else if $ae_loc.qr_scanner_version == 'dev'}
<Element_qr_scanner_dev
start_qr_scanner={$events_sess.leads.qr_scan_start}
show_qr_scan_result={true}
show_qr_manual_badge_id_entry_option={true}
on:qr_scan_result={handle_qr_scan_result}
on:qr_camera={handle_qr_camera}
/>
vDEV
{:else}
???
{/if}
<div class="qr_quick_results variant-soft-secondary font-bold p-4">
{@html $events_sess.leads.qr_scan_result ?? 'No results yet'}

View File

@@ -423,7 +423,7 @@ $: if ($events_slct.exhibit_id) {
}}
disabled={!$events_slct.exhibit_obj.priority}
class="btn btn-sm variant-ghost-primary w-48 mb-1 export_data_btn"
title={`TEMPORARILY DISABLED: Download leads data for ${$events_slct.exhibit_obj.name}`}
title={`Download leads data for ${$events_slct.exhibit_obj.name}`}
>
{#await ae_promises.download__exhibit_tracking_export}
<span class="fas fa-spinner fa-spin"></span>