diff --git a/src/routes/core/person_view.svelte b/src/routes/core/person_view.svelte index 58216c38..fa56ef04 100644 --- a/src/routes/core/person_view.svelte +++ b/src/routes/core/person_view.svelte @@ -248,7 +248,7 @@ onMount(() => { class="text-blue-500 underline hover:text-blue-800" title="Person's primary email address" > - {@html $lq__person_obj.primary_email ?? 'email'+ae_snip.html__not_set}' + {@html $lq__person_obj.primary_email ?? 'email'+ae_snip.html__not_set} {:else} email {@html ae_snip.html__not_set} diff --git a/src/routes/events_pres_mgmt/presenter/[slug]/+page.svelte b/src/routes/events_pres_mgmt/presenter/[slug]/+page.svelte index 534bde26..60ab1985 100644 --- a/src/routes/events_pres_mgmt/presenter/[slug]/+page.svelte +++ b/src/routes/events_pres_mgmt/presenter/[slug]/+page.svelte @@ -42,11 +42,8 @@ $events_sess.pres_mgmt.show_content__presenter_start = false; let lq__event_presenter_obj = liveQuery( () => db_events.presenters.get($events_slct.event_presenter_id) ); -$events_slct.lq__event_presenter_obj = lq__event_presenter_obj; // Functions and Logic - - diff --git a/src/routes/events_pres_mgmt/presenter_view.svelte b/src/routes/events_pres_mgmt/presenter_view.svelte index 1a439fe4..1fe4c414 100644 --- a/src/routes/events_pres_mgmt/presenter_view.svelte +++ b/src/routes/events_pres_mgmt/presenter_view.svelte @@ -1,5 +1,5 @@ - - - {#if $lq__event_presenter_obj}

@@ -287,14 +283,21 @@ $: if ($lq__event_presenter_obj) { {#if (!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj.event_presenter_id_random] && !$events_loc.auth__kv.session[$lq__event_presenter_obj.event_session_id_random])} - ( + - {$lq__event_presenter_obj.person_primary_email.replace(/^(.{3}).*@/, '$1...@')} - ) + {#if $lq__event_presenter_obj?.email} + ({$lq__event_presenter_obj.email.replace(/^(.{3}).*@/, '$1...@')}) + {:else} + + {/if} + + + (Not signed in as presenter) {:else} - ({$lq__event_presenter_obj.email}) + ({@html $lq__event_presenter_obj.email ?? 'email '+ae_snip.html__not_set}) {/if} @@ -465,7 +468,7 @@ $: if ($lq__event_presenter_obj) { field_name={'external_id'} field_type={'text'} field_value={$lq__event_presenter_obj.external_id} - allow_null={false} + allow_null={true} hide_edit_btn={!$ae_loc.administrator_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} @@ -498,7 +501,7 @@ $: if ($lq__event_presenter_obj) { field_name={'external_id'} field_type={'text'} field_value={$lq__event_presenter_obj.person_external_id} - allow_null={false} + allow_null={true} hide_edit_btn={!$ae_loc.administrator_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} @@ -529,7 +532,7 @@ $: if ($lq__event_presenter_obj) { field_name={'external_id'} field_type={'text'} field_value={$lq__event_presenter_obj.external_id} - allow_null={false} + allow_null={true} hide_edit_btn={true} outline_element={false} show_crud={false} @@ -611,7 +614,7 @@ $: if ($lq__event_presenter_obj) { field_name={'family_name'} field_type={'text'} field_value={$lq__event_presenter_obj.family_name} - allow_null={false} + allow_null={true} hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} @@ -776,7 +779,7 @@ $: if ($lq__event_presenter_obj) { field_name={'affiliations'} field_type={'text'} field_value={$lq__event_presenter_obj.affiliations} - allow_null={false} + allow_null={true} hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} @@ -805,7 +808,7 @@ $: if ($lq__event_presenter_obj) { field_name={'affiliations'} field_type={'text'} field_value={$lq__event_presenter_obj.person_affiliations} - allow_null={false} + allow_null={true} hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} @@ -833,7 +836,7 @@ $: if ($lq__event_presenter_obj) { field_name={'affiliations'} field_type={'text'} field_value={$lq__event_presenter_obj.affiliations} - allow_null={false} + allow_null={true} hide_edit_btn={true} outline_element={false} show_crud={false} @@ -879,7 +882,7 @@ $: if ($lq__event_presenter_obj) { field_name={'professional_title'} field_type={'text'} field_value={$lq__event_presenter_obj.professional_title} - allow_null={false} + allow_null={true} hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} @@ -908,7 +911,7 @@ $: if ($lq__event_presenter_obj) { field_name={'professional_title'} field_type={'text'} field_value={$lq__event_presenter_obj.person_professional_title} - allow_null={false} + allow_null={true} hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} @@ -936,7 +939,7 @@ $: if ($lq__event_presenter_obj) { field_name={'professional_title'} field_type={'text'} field_value={$lq__event_presenter_obj.professional_title} - allow_null={false} + allow_null={true} hide_edit_btn={true} outline_element={false} show_crud={false} @@ -1450,5 +1453,3 @@ WARNING: The file upload and management is a work in progress. You can upload an {/if} - - diff --git a/src/routes/events_pres_mgmt/session/[slug]/+page.svelte b/src/routes/events_pres_mgmt/session/[slug]/+page.svelte index abd3f674..8d74a40f 100644 --- a/src/routes/events_pres_mgmt/session/[slug]/+page.svelte +++ b/src/routes/events_pres_mgmt/session/[slug]/+page.svelte @@ -24,10 +24,7 @@ import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$ import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores'; import { events_func } from '$lib/ae_events_functions'; -import Form_agree from '../../form_agree.svelte'; -import Presenter_view from '../../presenter_view.svelte'; -import Comp_event_presenter_obj_li from '../../ae_comp__event_presenter_obj_li.svelte'; -import Element_manage_event_file_li from '$lib/element_manage_event_file_li.svelte'; +import Session_view from './../../session_view.svelte'; import { browser } from '$app/environment'; if (browser) { @@ -83,71 +80,61 @@ if (!$events_sess.pres_mgmt) { $events_sess.pres_mgmt.show_content__agree_text = false; $events_sess.pres_mgmt.show_content__presenter_start = false; -// import Leads_add_scan from './leads_add_scan.svelte'; -// import Sessions_list from './sessions_list.svelte'; -// import Leads_manage from './leads_manage.svelte'; -// import Leads_payment from './leads_payment.svelte'; - -let event_obj = liveQuery( - () => db_events.events.get($events_slct.event_id) - // () => db_events.events.get(param_slug_event_id) - // () => db_events.events.toArray() - // () => db_events.events - // .where('id_random') - // .equals($events_slct.event_id) - // // .orderBy('name') - // // .offset(10).limit(5) - // .toArray() -); - -let event_obj_v2 = db_events.events.get($events_slct.event_id); - +// let event_obj = liveQuery( +// () => db_events.events.get($events_slct.event_id) +// // () => db_events.events.get(param_slug_event_id) +// // () => db_events.events.toArray() +// // () => db_events.events +// // .where('id_random') +// // .equals($events_slct.event_id) +// // // .orderBy('name') +// // // .offset(10).limit(5) +// // .toArray() +// ); let lq__event_session_obj = liveQuery( () => db_events.sessions.get($events_slct.event_session_id) ); +// let lq__event_presentation_obj_li = liveQuery( +// () => db_events.presentations +// // .where({event_session_id_random: $events_slct.event_session_id}) +// .where('event_session_id_random') +// .equals($events_slct.event_session_id) +// .sortBy('name') +// // This works, but does it need to be async? +// // async () => await db_events.presentations +// // .where('event_session_id_random') +// // .equals($events_slct.event_session_id) +// // .sortBy('name') +// ); -let lq__event_presentation_obj_li = liveQuery( - () => db_events.presentations - // .where({event_session_id_random: $events_slct.event_session_id}) - .where('event_session_id_random') - .equals($events_slct.event_session_id) - .sortBy('name') +// let lq__event_presentation_obj = liveQuery( +// () => db_events.presentations.get($events_slct.event_presentation_id) +// ); - // This works, but does it need to be async? - // async () => await db_events.presentations - // .where('event_session_id_random') - // .equals($events_slct.event_session_id) - // .sortBy('name') -); - -let lq__event_presentation_obj = liveQuery( - () => db_events.presentations.get($events_slct.event_presentation_id) -); - -let lq__event_presenter_obj = liveQuery( - () => db_events.presenters.get($events_slct.event_presenter_id) -); +// let lq__event_presenter_obj = liveQuery( +// () => db_events.presenters.get($events_slct.event_presenter_id) +// ); // $events_slct.event_presenter_obj = $lq__event_presenter_obj; // We will filter out the presenters based on the presentation ID when they are rendered below. -let lq__event_presenter_obj_li = liveQuery( - () => db_events.presenters - .where('event_session_id_random') - .equals($events_slct.event_session_id) +// let lq__event_presenter_obj_li = liveQuery( +// () => db_events.presenters +// .where('event_session_id_random') +// .equals($events_slct.event_session_id) - // Why does the slct presentation ID not seem to work? - // .where('event_presentation_id_random') - // .equals($events_slct.event_presentation_id) - // .equals($events_slct.event_presentation_id?? '') - .sortBy('full_name') -); +// // Why does the slct presentation ID not seem to work? +// // .where('event_presentation_id_random') +// // .equals($events_slct.event_presentation_id) +// // .equals($events_slct.event_presentation_id?? '') +// .sortBy('full_name') +// ); -let lq__event_file_obj_li = liveQuery( - () => db_events.files.where('event_session_id_random').equals($events_slct.event_session_id).toArray() -); +// let lq__event_file_obj_li = liveQuery( +// () => db_events.files.where('event_session_id_random').equals($events_slct.event_session_id).toArray() +// ); $slct.person_obj_kv = {}; // This is intended for the POC lookup list when generated. @@ -186,10 +173,6 @@ $slct.person_obj_kv = {}; // This is intended for the POC lookup list when gener onMount(() => { console.log('Events Session [slug]: +page.svelte'); - console.log(`onMount - lq__event_presentation_obj:`, $lq__event_presentation_obj_li); - - // console.log(`ae_events_pres_mgmt presenter [slug] +page.svelte data:`, data); - // if (!$events_slct.event_id) { // console.log(`No ID! Nothing to show. Try setting the ID again.`); // $events_slct.event_id = $events_slct.event_id; @@ -229,24 +212,12 @@ onMount(() => { $events_slct.event_presenter_id = url_presenter_id; } - // // We need to load the presentation and presenter objects based on the IDs. - // if ($events_slct.event_presentation_obj_li && $events_slct.event_presentation_obj_li.length > 0) { - // let event_presentation_obj = $events_slct.event_presentation_obj_li.find((obj) => obj.event_presentation_id_random == url_presentation_id); - // $events_slct.event_presentation_obj = event_presentation_obj; - // if (event_presentation_obj.event_presenter_li && event_presentation_obj.event_presenter_li.length > 0) { - // let event_presenter_obj = event_presentation_obj.event_presenter_li.find((obj) => obj.event_presenter_id_random == url_presenter_id); - // $events_slct.event_presenter_obj = event_presenter_obj; - - // } - // } - - // // events_func.handle_load_ae_obj_id__presentation({api_cfg: $ae_api, presentation_id: url_presentation_id}); - // } - - // console.log('Remove the passcode from the URL.'); // data.url.searchParams.delete('person_id'); // data.url.searchParams.delete('person_pass'); + // data.url.searchParams.delete('presentation_id'); + // data.url.searchParams.delete('presenter_id'); + // data.url.searchParams.delete('session_id'); // let new_url = data.url.toString() // console.log(new_url); @@ -259,9 +230,8 @@ onMount(() => { session_sign_in(); } } - }); -// console.log(`$ae_loc = `, $ae_loc); + function presenter_sign_in() { console.log('Presenter sign in with URL values'); @@ -324,37 +294,37 @@ function sign_out() { }; } -$: if ($slct_trigger == 'load__event_file_obj_li') { - console.log(`load__event_file_obj_li event_session_id=${$slct.account_id}`); +// $: if ($slct_trigger == 'load__event_file_obj_li') { +// console.log(`load__event_file_obj_li event_session_id=${$slct.account_id}`); - $slct_trigger = null; +// $slct_trigger = null; - let ae_params = { - qry__enabled: 'all', - qry__hidden: 'all', - qry__limit: 50 - } +// let ae_params = { +// qry__enabled: 'all', +// qry__hidden: 'all', +// qry__limit: 50 +// } - events_func.handle_load_ae_obj_li__event_file({ - api_cfg: $ae_api, - for_obj_type: 'event_session', - for_obj_id: $events_slct.event_session_id, - params: ae_params, - try_cache: false - }); -} +// events_func.handle_load_ae_obj_li__event_file({ +// api_cfg: $ae_api, +// for_obj_type: 'event_session', +// for_obj_id: $events_slct.event_session_id, +// params: ae_params, +// try_cache: false +// }); +// } -$: if ($slct_trigger == 'load__event_presenter_obj_li') { - console.log(`load__event_presenter_obj_li event_session_id=${$slct.account_id}`); +// $: if ($slct_trigger == 'load__event_presenter_obj_li') { +// console.log(`load__event_presenter_obj_li event_session_id=${$slct.account_id}`); - $slct_trigger = null; +// $slct_trigger = null; - events_func.handle_load_ae_obj_li__event_presenter({ - api_cfg: $ae_api, - event_presentation_id: $events_slct.event_presentation_id, - try_cache: false - }); -} +// events_func.handle_load_ae_obj_li__event_presenter({ +// api_cfg: $ae_api, +// event_presentation_id: $events_slct.event_presentation_id, +// try_cache: false +// }); +// } // function send_init_confirm_email( @@ -550,1051 +520,20 @@ $: if ($lq__event_session_obj) { -{#if $events_slct.event_session_id && $lq__event_session_obj} - -

- {@html $lq__event_session_obj?.name ?? ae_snip.html__not_set} -

- - -
- - -{#await ae_promises.generate_qr_code_url} - Generating... -{:then result} - {#if ae_promises.generate_qr_code_url && $ae_loc.trusted_access} - - URL QR code - - - Session URL - - - - {/if} -{/await} - - - - - - -
-{#if $ae_loc.trusted_access || $events_loc.auth__person.id } - - {#if $events_loc.auth__kv.session[$events_slct.event_session_id]} -

Welcome {$lq__event_session_obj?.poc_person_full_name ?? 'Session POC'}

- {:else} -

Welcome {$lq__event_presenter_obj?.full_name ?? 'Presenter'}

- {/if} - - {#if $ae_loc.trusted_access || $events_loc.auth__kv.session[$events_slct.event_session_id] || ($events_loc.auth__kv.presenter[$events_slct.event_presenter_id] && $lq__event_presenter_obj?.agree)} - - - - {:else} - -

Read and Consent Agreement?

- -

Please select your name below to view, read, and consent the agreement.

- -

You will be able to download the LCI Congress Template 2024 (PowerPoint) and LCI Speaker and Champion Congress Task List (Excel) after you have read and consented to the agreement.

-
- {/if} - - {#if $events_loc.auth__person?.id} - - {/if} - +{#if !$lq__event_session_obj} + + Loading... {:else} -
-

Restricted access!

-

- Please select your name below to email the access link. - The email address associated with your LCI member record will be used. - The email address is not shown below for safety reasons. - -

-
- - {#if ($events_sess.auth__person.presenter_id) || ($events_sess.auth__person.session_id)} -
-
- Use the link that was sent to your email address to sign in or enter your key and passcode to sign in. -
-
- $events_sess.auth__entered_key = e.target.value} - > - $events_sess.auth__entered_passcode = e.target.value} - > - -
- -
- For: - session: {$events_sess.auth__person.session_id} - presentation: {$events_sess.auth__person.presentation_id} - presenter: {$events_sess.auth__person.presenter_id} -
- - {$lq__event_presentation_obj?.name ? `Name: "${$lq__event_presentation_obj.name}"` : '-- not set --'} -
- - - {#if $events_loc.auth__person?.id} - - {/if} -
- {/if} - + {/if} -
+ +
- -
- -
-{#if $ae_loc.trusted_access && $ae_loc.edit_mode} - -{/if} -
- -

Presentations: - - - {($lq__event_presentation_obj_li?.length > 1 ? `${$lq__event_presentation_obj_li?.length}x` : '')} - -

- - -{#if $lq__event_presentation_obj_li && $lq__event_presentation_obj_li?.length > 0} - -{:else} - Nothing to show yet...! -{/if} - - - -
- - -{/if} - - - - -{#if $events_sess.pres_mgmt?.show_content__agree_text} -
-
- -
- - - - - - -
- - - -
- - - - - -
- -
-
-{/if} - - -{#if $events_sess.pres_mgmt?.show_content__presenter_start} -
-
- -
- - - - - - - - - - - -
- -
-
-{/if} -