Saving the new documentation for Svelte and Dexie made by Gemini. Saving changes made by Gemini to fix various things.

This commit is contained in:
Scott Idem
2025-11-17 14:09:33 -05:00
parent 02169f1cb9
commit c4fa35e86e
8 changed files with 149 additions and 30 deletions

View File

@@ -14,7 +14,7 @@ import { db_events } from "$lib/ae_events/db_events";
import { ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/stores/ae_stores';
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
import Element_qr_scanner from '$lib/elements/element_qr_scanner.svelte';
import Element_qr_scanner from '$lib/element_qr_scanner_v2.svelte';
import Element_ae_crud from '$lib/elements/element_ae_crud.svelte';
import { goto } from '$app/navigation';

View File

@@ -21,7 +21,7 @@ import { db_events } from "$lib/ae_events/db_events";
import { ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/stores/ae_stores';
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
import Element_qr_scanner from '$lib/elements/element_qr_scanner.svelte';
import Element_qr_scanner from '$lib/element_qr_scanner_v2.svelte';
import Element_ae_crud from '$lib/elements/element_ae_crud.svelte';
import { goto } from '$app/navigation';

View File

@@ -1,6 +1,7 @@
<script lang="ts">
console.log(`ae_events_leads exhibit [slug] leads_add_scan.svelte`, $events_slct);
import type { key_val } from '$lib/stores/ae_stores';
import { ae_util } from '$lib/ae_utils/ae_utils';
import { liveQuery } from "dexie";
import { db_events } from "$lib/ae_events/db_events";
@@ -9,9 +10,8 @@ import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/stores/ae_stor
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
import { events_func } from '$lib/ae_events_functions';
import Element_qr_scanner from '$lib/elements/element_qr_scanner.svelte';
import Element_qr_scanner_v2 from '$lib/elements/element_qr_scanner_v2.svelte';
import Element_qr_scanner_dev from '$lib/elements/element_qr_scanner_dev.svelte';
import Element_qr_scanner from '$lib/element_qr_scanner_v2.svelte';
// TEMPORARY: For testing and development???
@@ -84,7 +84,7 @@ async function handle_submit_form_search(event) {
search_submit_results = await events_func.search__event_badge({
api_cfg: $ae_api,
event_id: $event_exhibit_obj.event_id_random,
event_id: $event_exhibit_obj?.event_id_random,
fulltext_search_qry_str: search_str,
external_event_id: $events_loc.leads.default__external_registration_id
});
@@ -295,7 +295,7 @@ function handle_qr_camera(event: CustomEvent<any>) {
</span>
{#if $events_loc.leads.show_content__scan_alert}
<div class="border border-slate-500/10 p-2 preset-tonal-warning border border-warning-500 p-1">
<div class="border-slate-500/10 p-2 preset-tonal-warning">
<span class="fas fa-exclamation-triangle mx-1"></span>
<span>
<strong>Alert</strong>
@@ -306,10 +306,9 @@ function handle_qr_camera(event: CustomEvent<any>) {
>
<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>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 across 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>
@@ -740,23 +739,14 @@ function handle_qr_camera(event: CustomEvent<any>) {
on:qr_camera={handle_qr_camera}
/>
{:else if $ae_loc.qr_scanner_version == 'two'}
<Element_qr_scanner_v2
<!-- v2 dev -->
<!-- <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}
<p>Please close this and select a QR Scanner version</p>

View File

@@ -380,16 +380,9 @@ $effect(() => {
<button
type="button"
onclick={() => {
// if ($journals_sess.show__modal_append__journal_entry_id) {
// // $journals_sess.show__modal_append__journal_entry_id = null;
// $journals_sess.show__modal_append__journal_entry_id = journals_journal_entry_obj?.id;
// tmp_entry_obj = journals_journal_entry_obj;
// } else {
// $journals_sess.show__modal_append__journal_entry_id = journals_journal_entry_obj?.id;
// tmp_entry_obj = journals_journal_entry_obj;
// }
$journals_sess.show__modal_append__journal_entry_id = journals_journal_entry_obj?.id;
tmp_entry_obj = journals_journal_entry_obj;
// Create a deep copy of the object for editing to prevent direct mutation of the liveQuery result.
tmp_entry_obj = JSON.parse(JSON.stringify(journals_journal_entry_obj));
}}
class="btn btn-icon btn-sm preset-tonal-surface border border-surface-500 hover:preset-filled-secondary-500 transition"
title="{$lq__journal_obj?.cfg_json?.entry_add_text == 'append' ? 'Append to Journal Entry' : 'Prepend to Journal Entry'}"