diff --git a/src/lib/ae_events_functions.ts b/src/lib/ae_events_functions.ts index 7fbde6e4..90e24ea3 100644 --- a/src/lib/ae_events_functions.ts +++ b/src/lib/ae_events_functions.ts @@ -122,7 +122,7 @@ async function handle_load_ae_obj_li__badge({api_cfg, event_id, params={}, try_c -async function handle_search__event_badge({api_cfg, event_id, fulltext_search_qry_str, params={}, try_cache=true}) { +async function handle_search__event_badge({api_cfg, event_id, fulltext_search_qry_str, external_event_id, params={}, try_cache=true}) { console.log(`*** handle_search__event_badge() *** event_id=${event_id}`); let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled @@ -139,6 +139,9 @@ async function handle_search__event_badge({api_cfg, event_id, fulltext_search_qr }; } + params_json['and_qry'] = {}; + if (external_event_id) params_json['and_qry']['external_event_id'] = external_event_id; + // $events_sess.badges.status_qry__search = 'loading'; ae_promises.search__event_badge = await api.get_ae_obj_li_for_obj_id_crud({ api_cfg: api_cfg, diff --git a/src/lib/ae_events_stores.ts b/src/lib/ae_events_stores.ts index 7041bce7..14ad53fd 100644 --- a/src/lib/ae_events_stores.ts +++ b/src/lib/ae_events_stores.ts @@ -46,6 +46,9 @@ let events_local_data_struct: key_val = { 'leads': { show_content__scan_requirements: true, + // For ISHLT 2024 Annual Meeting only! + default__external_registration_id: '2024_Annual Meeting', + auto_view: true, auto_hide_on_sign_in: true, @@ -68,6 +71,8 @@ let events_local_data_struct: key_val = { // The "tab" is a key value list of exhibit ID and tab name. This is intentionally using local storage to store the current tab for each exhibit. // example: {'LNDF-67-89-92': 'start', 'OFLN-32-38-14': 'add_scan'} tab: {}, + + }, // Presentation Management (Distributing) @@ -121,6 +126,8 @@ let events_session_data_struct: key_val = { show_form__search: false, show_form__scan: false, + show_confirm__add_lead: [], + submit_status__license: null, // 'saving', 'created', 'updated' // create_status__license: null, // 'creating', 'created', 'updated' // update_status__license: null, // 'updating', 'created', 'updated' diff --git a/src/routes/events_leads/exhibit/[slug]/+page.svelte b/src/routes/events_leads/exhibit/[slug]/+page.svelte index b4f0bc9b..a307aa67 100644 --- a/src/routes/events_leads/exhibit/[slug]/+page.svelte +++ b/src/routes/events_leads/exhibit/[slug]/+page.svelte @@ -377,16 +377,18 @@ function send_init_confirm_email({to_email}) { let body_html = `
${$event_exhibit_obj?.license_li_json[license_key].full_name}, -

If this was sent to you incorrectly, plaese ignore.

+

If this was sent to you incorrectly, please ignore.


Exhibit ID: ${$events_slct.exhibit_id}
-

Use your license key login link below.
+

Use your license key sign in link below.
Copy and paste link: ${data.url.origin}/events_leads/exhibit/${$events_slct.exhibit_id}?license_key=${license_key}&event_id=${$events_slct.event_id}

-
`; +

If the email or passcode for your exhibit is changed, this link will no longer work.

+ + `; api.send_email({ api_cfg: $ae_api, @@ -398,8 +400,6 @@ function send_init_confirm_email({to_email}) { }); } - - @@ -563,7 +563,7 @@ function send_init_confirm_email({to_email}) { {#if $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key}

- You are logged in using the shared exhibit staff passcode and are using the license key for {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key}. Any leads you collect will be associated with this license key (email address). + You are logged in using the shared exhibit staff passcode and are using the license key for {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key}. Any leads you collect will be associated with this license key (email address). Use the Clear License button to "log out" or Sign In with a different license.

{:else if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]}

Please select your name from the license list below to use the lead retrieval service. You may need to add your name first. This is also used to link new leads to whoever adds them.

@@ -973,7 +973,7 @@ function send_init_confirm_email({to_email}) { placeholder="Email address" bind:value={$events_sess.leads.tmp_license.email} required - class="input max-w-48" + class="input max-w-48 m-1" /> {#if $ae_loc.trusted_access} @@ -992,7 +992,7 @@ function send_init_confirm_email({to_email}) { placeholder="Passcode" bind:value={$events_sess.leads.tmp_license.passcode} required - class="input max-w-48" + class="input max-w-48 m-1" /> {/if} @@ -1012,7 +1012,7 @@ function send_init_confirm_email({to_email}) { $events_sess.leads.show_form__license = false; }} > - + Delete @@ -1026,7 +1026,7 @@ function send_init_confirm_email({to_email}) { // $slct_trigger = 'save__ds__code'; }} > - + Save diff --git a/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte b/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte index 4999c30e..aeb87c4d 100644 --- a/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte +++ b/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte @@ -11,6 +11,12 @@ import { events_func } from '$lib/ae_events_functions'; import Element_qr_scanner from '$lib/element_qr_scanner.svelte'; + +// TEMPORARY: For testing and development +$events_sess.leads.show_form__search = true; +// TEMPORARY: For testing and development + + // let param_slug_event_exhibit_id = data.params.slug; console.log(`ae_events_leads exhibit [slug] leads_add_scan.svelte:`, $events_slct); let event_exhibit_obj = liveQuery( @@ -30,7 +36,7 @@ let event_badge_obj_li = liveQuery( // .where({event_id_random: $events_loc.event_id}) .where('event_id_random').equals($events_loc.event_id) // .where('event_id_random').equals($events_slct.event_id) - .or('full_name').equalsIgnoreCase($events_sess.leads.entered_search_str) + // .or('full_name').equalsIgnoreCase($events_sess.leads.entered_search_str) // .and('full_name').anyOfIgnoreCase([$events_sess.leads.entered_search_str, 'Sasa Vukelic']) // .where('full_name').anyOfIgnoreCase(tmp_search_terms) // .and('enable').equals(true) @@ -63,8 +69,10 @@ async function handle_submit_form_search(event) { let search_str = $events_sess.leads.entered_search_str.trim(); console.log(search_str); - search_submit_results = await events_func.handle_search__event_badge({api_cfg: $ae_api, event_id: $event_exhibit_obj.event_id_random, fulltext_search_qry_str: search_str}); + search_submit_results = await events_func.handle_search__event_badge({api_cfg: $ae_api, event_id: $event_exhibit_obj.event_id_random, fulltext_search_qry_str: search_str, external_event_id: $events_loc.leads.default__external_registration_id}); console.log(search_submit_results); + + $events_slct.badge_obj_li = search_submit_results; } @@ -159,7 +167,7 @@ function handle_qr_camera(event) { {#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key}
Leads for: - {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} + {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key}
{:else}
Please go to the Main tab and select a license to use.
@@ -223,32 +231,25 @@ function handle_qr_camera(event) { {/if} - {#if $events_loc.leads.show_content__scan_requirements} -
-

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. - -

- -
- {:else} - - {/if} - - - - - - - +{#if $events_loc.leads.show_content__scan_requirements} +
+

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. + +

+ +
{:else} + +{/if} + + +{:else}
Not logged in. Please log in and select a user license.
{/if} @@ -273,7 +274,6 @@ function handle_qr_camera(event) {

Search

-
- -
+
- - -
+
{#if $event_badge_obj_li} - {#if $ae_loc.trusted_access} + + +
+

{$events_slct.badge_obj_li.length} results found

+ + {#each $events_slct.badge_obj_li as event_badge_obj_v2, index} + +
+ + + + {#if $events_sess.leads.show_confirm__add_lead[index]} +
+
+
+

Add?

+ +
+ +
+
+ +
+

Are you sure you want to add {event_badge_obj_v2.full_name} to the leads list?

+

Badge ID: {event_badge_obj_v2.event_badge_id_random}

+
+ + +
+
+
+ +
+ {/if} + +
+ + + + {#if $event_exhibit_obj?.priority || $ae_loc.trusted_access} + {event_badge_obj_v2.full_name} + {:else} + + {event_badge_obj_v2.full_name ? event_badge_obj_v2.full_name.substring(0, 1) + '...' : 'Hidden'} + + {/if} + + + + {#if $event_exhibit_obj?.priority || $ae_loc.trusted_access} + {event_badge_obj_v2.affiliations} + {:else} + + {event_badge_obj_v2.affiliations ? event_badge_obj_v2.affiliations.substring(0, 3) + '...' : 'Hidden'} + + {/if} + + + +
+
+ + {/each} +
+ + + + + {:else}
No results yet
{/if} -
- -
+