diff --git a/src/lib/ae_events__event_presenter.ts b/src/lib/ae_events__event_presenter.ts index d48bdc3b..fc8f014d 100644 --- a/src/lib/ae_events__event_presenter.ts +++ b/src/lib/ae_events__event_presenter.ts @@ -302,6 +302,11 @@ export function handle_db_save_ae_obj_li__event_presenter( // From SQL view file_count: obj.file_count, + event_session_code: obj.event_session_code, + event_session_name: obj.event_session_name, + event_presentation_code: obj.event_presentation_code, + event_presentation_name: obj.event_presentation_name, + person_external_id: obj.person_external_id, person_given_name: obj.person_given_name, person_family_name: obj.person_family_name, @@ -325,3 +330,64 @@ export function handle_db_save_ae_obj_li__event_presenter( } return false; } + + +export async function handle_email_sign_in__event_presenter ( + { + api_cfg, + to_email, + to_name, + base_url, + person_id, + person_passcode, + event_session_id, + event_presentation_id, + event_presenter_id, + session_name, + presentation_name + }: { + api_cfg: any, + to_email: string, + to_name: string, + base_url: string, + person_id: string, + person_passcode: string, + event_session_id: string, + event_presentation_id: string, + event_presenter_id: string, + session_name: string, + presentation_name: string + } + ) { + console.log(`*** handle_email_sign_in__event_presenter() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} presentation_id=${event_presentation_id} presenter_id=${event_presenter_id}`); + + let subject = `LCI Congress 2024 - Pres Mgmt Hub Sign In Link for ${session_name} (ID: ${event_session_id})`; + + let sign_in_url = encodeURI(`${base_url}/events_pres_mgmt/session/${event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&presentation_id=${event_presentation_id}&presenter_id=${event_presenter_id}`) + + let body_html = ` +
${to_name}, +

Your link to sign into the presentation management hub for LCI Congress 2024 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

+
+ +
+ 26th Annual Lean Construction Congress (2024):
+

+ Session Name: ${session_name}
+ Session ID: ${event_session_id}
+ Presentation Name: ${presentation_name}
+ Presentation ID: ${event_presentation_id} +

+

Use this link to view or update your LCI 2024 presentation information.
+ Copy and paste link: ${sign_in_url}

+
`; + + api.send_email({ + api_cfg: api_cfg, + from_email: 'noreply+presmgmt@oneskyit.com', + from_name: 'LCI 2024 Pres Mgmt Hub', + to_email: to_email, + subject: subject, + body_html: body_html, + }); +} \ No newline at end of file diff --git a/src/lib/ae_events__event_session.ts b/src/lib/ae_events__event_session.ts index fe15127e..478ace57 100644 --- a/src/lib/ae_events__event_session.ts +++ b/src/lib/ae_events__event_session.ts @@ -327,3 +327,58 @@ export function handle_db_save_ae_obj_li__event_session( return true; } } + + +// This is intended for the Point of Contact (POC) for the session. +// Updated 2024-07-01 +export async function handle_email_sign_in__event_session ( + { + api_cfg, + to_email, + to_name, + base_url, + person_id, + person_passcode, + event_session_id, + session_name, + }: { + api_cfg: any, + to_email: string, + to_name: string, + base_url: string, + person_id: string, + person_passcode: string, + event_session_id: string, + session_name: string, + } + ) { + console.log(`*** handle_email_sign_in__event_session() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} session_id=${event_session_id}`); + + let subject = `LCI Congress 2024 - Pres Mgmt Hub Sign In Link for ${session_name} (ID: ${event_session_id})`; + + let sign_in_url = encodeURI(`${base_url}/events_pres_mgmt/session/${event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&session_id=${event_session_id}`) + + let body_html = ` +
${to_name}, +

Your link to sign into the presentation management hub as a session Champion for LCI Congress 2024 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

+
+ +
+ 26th Annual Lean Construction Congress (2024):
+

+ Session Name: ${session_name}
+ Session ID: ${event_session_id} +

+

Use this link to view or update your LCI 2024 session information.
+ Copy and paste link: ${sign_in_url}

+
`; + + api.send_email({ + api_cfg: api_cfg, + from_email: 'noreply+presmgmt@oneskyit.com', + from_name: 'LCI 2024 Pres Mgmt Hub', + to_email: to_email, + subject: subject, + body_html: body_html, + }); +} \ No newline at end of file diff --git a/src/lib/ae_events_functions.ts b/src/lib/ae_events_functions.ts index e7373b2c..bcf72b61 100644 --- a/src/lib/ae_events_functions.ts +++ b/src/lib/ae_events_functions.ts @@ -38,6 +38,7 @@ import { handle_load_ae_obj_li__event_session, handle_search__event_session, handle_db_save_ae_obj_li__event_session, + handle_email_sign_in__event_session, } from "$lib/ae_events__event_session"; import { @@ -53,6 +54,7 @@ import { handle_create_ae_obj__event_presenter, handle_update_ae_obj__event_presenter, handle_db_save_ae_obj_li__event_presenter, + handle_email_sign_in__event_presenter, } from "$lib/ae_events__event_presenter"; import { @@ -79,6 +81,7 @@ let export_obj = { handle_load_ae_obj_id__event_session: handle_load_ae_obj_id__event_session, handle_load_ae_obj_li__event_session: handle_load_ae_obj_li__event_session, handle_search__event_session: handle_search__event_session, + handle_email_sign_in__event_session: handle_email_sign_in__event_session, handle_load_ae_obj_id__event_presentation: handle_load_ae_obj_id__event_presentation, handle_load_ae_obj_li__event_presentation: handle_load_ae_obj_li__event_presentation, @@ -88,6 +91,7 @@ let export_obj = { handle_load_ae_obj_li__event_presenter: handle_load_ae_obj_li__event_presenter, handle_create_ae_obj__event_presenter: handle_create_ae_obj__event_presenter, handle_update_ae_obj__event_presenter: handle_update_ae_obj__event_presenter, + handle_email_sign_in__event_presenter: handle_email_sign_in__event_presenter, handle_load_ae_obj_id__badge: handle_load_ae_obj_id__badge, handle_load_ae_obj_li__badge: handle_load_ae_obj_li__badge, diff --git a/src/lib/db_events.ts b/src/lib/db_events.ts index 90acb85c..517445a6 100644 --- a/src/lib/db_events.ts +++ b/src/lib/db_events.ts @@ -468,6 +468,11 @@ export interface Presenter { // Additional fields for convenience (database views) file_count?: null|number; + event_session_code?: null|string; + event_session_name?: null|string; + event_presentation_code?: null|string; + event_presentation_name?: null|string; + person_external_id?: null|string; person_given_name?: null|string; person_family_name?: null|string; diff --git a/src/lib/element_access_type.svelte b/src/lib/element_access_type.svelte index d7910d8a..36454d0b 100644 --- a/src/lib/element_access_type.svelte +++ b/src/lib/element_access_type.svelte @@ -1,8 +1,12 @@ -
- {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} - {#if $ae_loc.access_type == 'super'} - Super Access - {:else if $ae_loc.access_type == 'manager'} - Manager Access - {:else if $ae_loc.access_type == 'administrator'} - Administrator Access - {:else if $ae_loc.access_type == 'trusted'} - Trusted Access - {:else if $ae_loc.access_type == 'authenticated'} - Authenticated Access - {:else if $ae_loc.access_type == 'anonymous'} - Anonymous Access +
+ + + + + + +
+ {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous' && $ae_loc.access_type != 'authenticated'} + {#if $ae_loc.edit_mode} + {:else} - Unknown Access + + {/if} + {/if} +
+ +
+ {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} + + + {#if $ae_loc.access_type == 'super'} + Super + {:else if $ae_loc.access_type == 'manager'} + Manager + {:else if $ae_loc.access_type == 'administrator'} + Administrator + {:else if $ae_loc.access_type == 'trusted'} + Trusted Access + {:else if $ae_loc.access_type == 'authenticated'} + Authenticated Access + {:else if $ae_loc.access_type == 'anonymous'} + Anonymous Access + {:else} + Unknown Access {/if} {:else}
@@ -234,9 +300,9 @@ function dispatch_access_type_changed() { /* background-color: hsla(60,100%,90%,.30); */ /* background-color: rgba(var(--color-surface-500) / .5); */ - border-top: solid thin hsla(0,0%,0%,.5); - border-left: solid thin hsla(0,0%,0%,.5); - border-bottom: solid thin hsla(0,0%,0%,.5); + border-top: solid thin hsla(0,0%,0%,.25); + border-left: solid thin hsla(0,0%,0%,.25); + border-bottom: solid thin hsla(0,0%,0%,.25); border-top-left-radius: .5em; border-bottom-left-radius: .5em; @@ -250,7 +316,7 @@ function dispatch_access_type_changed() { /* NOTE: transition when no longer hovering */ transition-property: opacity, background-color; transition-delay: 1.25s; - transition-duration: .5s; + transition-duration: .75s; transition-timing-function: ease-out; } @@ -268,7 +334,7 @@ function dispatch_access_type_changed() { /* NOTE: transition when hover starts */ transition-property: opacity, background-color; transition-delay: .5s; - transition-duration: .10s; + transition-duration: .25s; transition-timing-function: ease-in; } diff --git a/src/lib/element_app_cfg.svelte b/src/lib/element_app_cfg.svelte index d7cdfeb9..024147b3 100644 --- a/src/lib/element_app_cfg.svelte +++ b/src/lib/element_app_cfg.svelte @@ -106,17 +106,17 @@ function dispatch_something_changed() {
{#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} {#if $ae_loc.access_type == 'super'} - Super Access + Super Access {:else if $ae_loc.access_type == 'manager'} - Manager Access + Manager Access {:else if $ae_loc.access_type == 'administrator'} - Administrator Access + Administrator Access {:else if $ae_loc.access_type == 'trusted'} - Trusted Access + Trusted Access {:else if $ae_loc.access_type == 'authenticated'} - Authenticated Access + Authenticated Access {:else if $ae_loc.access_type == 'anonymous'} - Anonymous Access + Anonymous Access {:else} Unknown Access {/if} diff --git a/src/lib/element_data_store.svelte b/src/lib/element_data_store.svelte index d2768797..2cc00d09 100644 --- a/src/lib/element_data_store.svelte +++ b/src/lib/element_data_store.svelte @@ -41,7 +41,7 @@ let ds_submit_results: Promise|key_val; let val_json: key_val; let val_html: key_val; let val_md: key_val; -export let val_sql: key_val; +export let val_sql: null|key_val = null; let val_text: string; diff --git a/src/lib/element_manage_event_file_li.svelte b/src/lib/element_manage_event_file_li.svelte index e8734837..6e6c8703 100644 --- a/src/lib/element_manage_event_file_li.svelte +++ b/src/lib/element_manage_event_file_li.svelte @@ -78,7 +78,7 @@ onMount(() => { > Manage Files: {$lq__event_file_obj_li ? `${$lq__event_file_obj_li.length}x` : '-- none --'} diff --git a/src/routes/events_pres_mgmt/ae_comp__event_presenter_obj_li.svelte b/src/routes/events_pres_mgmt/ae_comp__event_presenter_obj_li.svelte new file mode 100644 index 00000000..06ee658a --- /dev/null +++ b/src/routes/events_pres_mgmt/ae_comp__event_presenter_obj_li.svelte @@ -0,0 +1,332 @@ + + + +
+ + + +{#if $lq__event_presenter_obj_li && $lq__event_presenter_obj_li?.length > 0} + Presenters: + + +
    + {#each $lq__event_presenter_obj_li as event_presenter_obj} + + +
  • + + + + + {#if $ae_loc.trusted_access || !$events_loc.auth__person?.id } + + {/if} + + + {#if event_presenter_obj.agree} + + + {:else} + + {/if} + + + + {#if $ae_loc.trusted_access} + + + + {#if event_presenter_obj.file_count} + + + {event_presenter_obj.file_count ? `(${event_presenter_obj.file_count}x files)` : '(0 files)'} + + {/if} + + + + + {/if} + + + + + + +
    + {#if $ae_loc.administrator_access && !event_presenter_obj.person_id_random} + + {/if} +
    + +
  • + + {/each} +
+{:else} +

No presenters available to show for this presentation at this time

+ + + +{/if} + +
+ diff --git a/src/routes/events_pres_mgmt/event/[slug]/+page.svelte b/src/routes/events_pres_mgmt/event/[slug]/+page.svelte index 87f20713..5557acc5 100644 --- a/src/routes/events_pres_mgmt/event/[slug]/+page.svelte +++ b/src/routes/events_pres_mgmt/event/[slug]/+page.svelte @@ -109,7 +109,7 @@ $: if ($events_trigger == 'load__event_session_obj_li' && $events_slct.event_id) console.log('Trusted access search'); handle_search__event_session($events_sess.pres_mgmt.fulltext_search_qry_str); } else if (!$events_sess.pres_mgmt.fulltext_search_qry_str || $events_sess?.pres_mgmt.fulltext_search_qry_str.length <= 1 ) { - $events_slct.session_obj_li = []; + $events_slct.event_session_obj_li = []; // $events_sess.pres_mgmt.fulltext_search_qry_str = ''; // return false; } else { @@ -183,7 +183,7 @@ function handle_search__event_session(search_str: string) { log_lvl: 1, }) .then(function (search_results) { - $events_slct.session_obj_li = search_results; + $events_slct.event_session_obj_li = search_results; console.log(search_results); $events_sess.status_qry__search = 'done'; }); @@ -208,7 +208,7 @@ function handle_search__event_session(search_str: string) { log_lvl: 1, }) .then(function (search_results) { - $events_slct.session_obj_li = search_results; + $events_slct.event_session_obj_li = search_results; console.log(search_results); $events_sess.status_qry__search = 'done'; }); @@ -367,19 +367,19 @@ function handle_search__event_session(search_str: string) { {/await} -{#if $events_slct?.session_obj_li && $events_slct.session_obj_li.length > 0} +{#if $events_slct?.event_session_obj_li && $events_slct.event_session_obj_li.length > 0}

Results: - {#if $events_slct.session_obj_li.length} + {#if $events_slct.event_session_obj_li.length} - {$events_slct.session_obj_li.length ?? 'None'} + {$events_slct.event_session_obj_li.length ?? 'None'} {/if}

@@ -394,7 +394,7 @@ function handle_search__event_session(search_str: string) { -{#each $events_slct.session_obj_li as session_obj} +{#each $events_slct.event_session_obj_li as session_obj} { // This should be turned into a function to correctly authenticate the person and allow them access to their presentations and presenter details. if (url_person_pass) { - console.log(`ae_events_pres_mgmt session [slug] +page.svelte: event_session_id=${$events_slct.session_id}; person_id=${url_person_id}; person_pass=${url_person_pass}; presentation_id=${url_presentation_id}; presenter_id=${url_presenter_id}`); + console.log(`ae_events_pres_mgmt session [slug] +page.svelte: event_session_id=${$events_slct.event_session_id}; person_id=${url_person_id}; person_pass=${url_person_pass}; presentation_id=${url_presentation_id}; presenter_id=${url_presenter_id}`); // Using temporary session values first. $events_sess.auth__entered_key = url_person_id; @@ -233,10 +234,10 @@ onMount(() => { // // 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.presentation_obj = event_presentation_obj; + // $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.presenter_obj = event_presenter_obj; + // $events_slct.event_presenter_obj = event_presenter_obj; // } // } @@ -350,109 +351,109 @@ $: if ($slct_trigger == 'load__event_presenter_obj_li') { } -function send_init_confirm_email( - { - to_email, - to_name, - person_id, - person_passcode, - presentation_id, - presenter_id, - presentation_name - }: { - to_email: string, - to_name: string, - person_id: string, - person_passcode: string, - presentation_id: string, - presenter_id: string, - presentation_name: string - } - ) { - console.log(`*** send_init_confirm_email() *** to ${to_email}.`); +// function send_init_confirm_email( +// { +// to_email, +// to_name, +// person_id, +// person_passcode, +// presentation_id, +// presenter_id, +// presentation_name +// }: { +// to_email: string, +// to_name: string, +// person_id: string, +// person_passcode: string, +// presentation_id: string, +// presenter_id: string, +// presentation_name: string +// } +// ) { +// console.log(`*** send_init_confirm_email() *** to ${to_email}.`); - // let new_passcode = Math.floor(Math.random() * 900000) + 100000 +// // let new_passcode = Math.floor(Math.random() * 900000) + 100000 - // to_email = 'test+agree@oneskyit.com'; +// // to_email = 'test+agree@oneskyit.com'; - let sign_in_url = encodeURI(`${data.url.origin}/events_pres_mgmt/session/${$events_slct.event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&presentation_id=${presentation_id}&presenter_id=${presenter_id}`) +// let sign_in_url = encodeURI(`${data.url.origin}/events_pres_mgmt/session/${$events_slct.event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&presentation_id=${presentation_id}&presenter_id=${presenter_id}`) - let subject = `LCI Congress 2024 - Pres Mgmt Hub Sign In Link for ${$lq__event_session_obj?.name} (ID: ${$events_slct.event_session_id})`; +// let subject = `LCI Congress 2024 - Pres Mgmt Hub Sign In Link for ${$lq__event_session_obj?.name} (ID: ${$events_slct.event_session_id})`; - let body_html = ` -
${to_name}, -

Your link to sign into the presentation management hub for LCI Congress 2024 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

-
+// let body_html = ` +//
${to_name}, +//

Your link to sign into the presentation management hub for LCI Congress 2024 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

+//
-
`; +//
+// 26th Annual Lean Construction Congress (2024):
+//

+// Session Name: ${$lq__event_session_obj?.name}
+// Session ID: ${$lq__event_session_obj?.event_session_id_random}
+// Presentation Name: ${presentation_name}
+// Presentation ID: ${presentation_id} +//

+//

Use this link to view or update your LCI 2024 presentation information.
+// Copy and paste link: ${sign_in_url}

+//
`; - api.send_email({ - api_cfg: $ae_api, - from_email: 'noreply+presmgmt@oneskyit.com', - from_name: 'LCI 2024 Pres Mgmt Hub', - to_email: to_email, - subject: subject, - body_html: body_html, - }); -} +// api.send_email({ +// api_cfg: $ae_api, +// from_email: 'noreply+presmgmt@oneskyit.com', +// from_name: 'LCI 2024 Pres Mgmt Hub', +// to_email: to_email, +// subject: subject, +// body_html: body_html, +// }); +// } -function send_sign_in_poc_email( - { - to_email, - to_name, - person_id, - person_passcode, - session_id, - }: { - to_email: string, - to_name: string, - person_id: string, - person_passcode: string, - session_id: string, - } - ) { - console.log(`*** send_sign_in_poc_email() *** to ${to_email}.`); +// function send_sign_in_poc_email( +// { +// to_email, +// to_name, +// person_id, +// person_passcode, +// session_id, +// }: { +// to_email: string, +// to_name: string, +// person_id: string, +// person_passcode: string, +// session_id: string, +// } +// ) { +// console.log(`*** send_sign_in_poc_email() *** to ${to_email}.`); - // to_email = 'test+agree@oneskyit.com'; +// // to_email = 'test+agree@oneskyit.com'; - let sign_in_url = encodeURI(`${data.url.origin}/events_pres_mgmt/session/${$events_slct.event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&session_id=${session_id}`); +// let sign_in_url = encodeURI(`${data.url.origin}/events_pres_mgmt/session/${$events_slct.event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&session_id=${session_id}`); - let subject = `LCI Congress 2024 - Pres Mgmt Hub Sign In Link for ${$lq__event_session_obj?.name} (ID: ${$events_slct.event_session_id})`; +// let subject = `LCI Congress 2024 - Pres Mgmt Hub Sign In Link for ${$lq__event_session_obj?.name} (ID: ${$events_slct.event_session_id})`; - let body_html = ` -
${to_name}, -

Your link to sign into the presentation management hub as a session Champion for LCI Congress 2024 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

-
+// let body_html = ` +//
${to_name}, +//

Your link to sign into the presentation management hub as a session Champion for LCI Congress 2024 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

+//
-
- 26th Annual Lean Construction Congress (2024):
-

- Session Name: ${$lq__event_session_obj?.name}
- Session ID: ${$lq__event_session_obj?.event_session_id_random} -

-

Use this link to view or update your LCI 2024 session information.
- Copy and paste link: ${sign_in_url}

-
`; - api.send_email({ - api_cfg: $ae_api, - from_email: 'noreply+presmgmt@oneskyit.com', - from_name: 'LCI 2024 Pres Mgmt Hub', - to_email: to_email, - subject: subject, - body_html: body_html, - }); -} +//
+// 26th Annual Lean Construction Congress (2024):
+//

+// Session Name: ${$lq__event_session_obj?.name}
+// Session ID: ${$lq__event_session_obj?.event_session_id_random} +//

+//

Use this link to view or update your LCI 2024 session information.
+// Copy and paste link: ${sign_in_url}

+//
`; +// api.send_email({ +// api_cfg: $ae_api, +// from_email: 'noreply+presmgmt@oneskyit.com', +// from_name: 'LCI 2024 Pres Mgmt Hub', +// to_email: to_email, +// subject: subject, +// body_html: body_html, +// }); +// } @@ -540,7 +541,7 @@ function send_sign_in_poc_email( field_type={'text'} field_value={$lq__event_session_obj?.name} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -565,7 +566,7 @@ function send_sign_in_poc_email( field_type={'text'} field_value={$lq__event_session_obj?.code} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -598,7 +599,7 @@ function send_sign_in_poc_email( field_type={'datetime'} field_value={$lq__event_session_obj.start_datetime} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -623,7 +624,7 @@ function send_sign_in_poc_email( field_type={'datetime'} field_value={$lq__event_session_obj.end_datetime} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -642,7 +643,7 @@ function send_sign_in_poc_email(
  • Location/Room: {@html $lq__event_session_obj.event_location_name ? $lq__event_session_obj.event_location_name : ae_html.not_set} - {#if $ae_loc.trusted_access} + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} - {#if $ae_loc.trusted_access} + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} {#if $events_loc.auth__kv.session[$events_slct.event_session_id]} - POC Signed In + Signed In {/if} {#if $ae_loc.trusted_access || !$events_loc.auth__person.id } @@ -907,13 +908,16 @@ function send_sign_in_poc_email( return false; } - send_sign_in_poc_email( + events_func.handle_email_sign_in__event_session( { + api_cfg: $ae_api, to_email: $lq__event_session_obj.poc_person_primary_email, to_name: $lq__event_session_obj?.poc_person_full_name?? '-- not set --', + base_url: $ae_loc.url_origin, person_id: $lq__event_session_obj?.poc_person_id_random?? '-- not set --', person_passcode: $lq__event_session_obj?.poc_person_passcode?? '-- not set --', - session_id: $lq__event_session_obj?.event_session_id_random?? '-- not set --', + event_session_id: $lq__event_session_obj?.event_session_id_random?? '-- not set --', + session_name: $lq__event_session_obj?.name?? '-- not set --', } ); }} @@ -959,7 +963,7 @@ function send_sign_in_poc_email( field_type={'textarea'} field_value={$lq__event_session_obj.description} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -1184,7 +1188,7 @@ function send_sign_in_poc_email(
    -{#if $ae_loc.trusted_access } +{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
    + {#await event_presentation_obj.event_presentation_id_random} + + {:then result} + + + {/await} + + - {#if $lq__event_presenter_obj_li?.length > 0} + {#if $lq__event_presenter_obj_li?.length > 0 && 1==2} Presenters: @@ -1413,10 +1428,10 @@ function send_sign_in_poc_email( console.log('View presenter details'); $events_slct.event_presentation_id = event_presentation_obj.event_presentation_id_random; - $events_slct.presentation_obj = event_presentation_obj; + $events_slct.event_presentation_obj = event_presentation_obj; $events_slct.event_presenter_id = event_presenter_obj.event_presenter_id_random; - $events_slct.presenter_obj = event_presenter_obj; + $events_slct.event_presenter_obj = event_presenter_obj; $events_sess.pres_mgmt.show_content__presenter_start = event_presenter_obj.event_presenter_id_random; } @@ -1478,10 +1493,10 @@ function send_sign_in_poc_email( () => { console.log('View terms and conditions'); $events_slct.event_presentation_id = event_presentation_obj.event_presentation_id_random; - $events_slct.presentation_obj = event_presentation_obj; + $events_slct.event_presentation_obj = event_presentation_obj; $events_slct.event_presenter_id = event_presenter_obj.event_presenter_id_random; - $events_slct.presenter_obj = event_presenter_obj; + $events_slct.event_presenter_obj = event_presenter_obj; $events_sess.pres_mgmt.show_content__agree_text = event_presenter_obj.event_presenter_id_random; } @@ -1500,10 +1515,10 @@ function send_sign_in_poc_email( () => { console.log('View terms and conditions'); $events_slct.event_presentation_id = event_presentation_obj.event_presentation_id_random; - $events_slct.presentation_obj = event_presentation_obj; + $events_slct.event_presentation_obj = event_presentation_obj; $events_slct.event_presenter_id = event_presenter_obj.event_presenter_id_random; - $events_slct.presenter_obj = event_presenter_obj; + $events_slct.event_presenter_obj = event_presenter_obj; $events_sess.pres_mgmt.show_content__agree_text = event_presenter_obj.event_presenter_id_random; } @@ -1612,10 +1627,10 @@ function send_sign_in_poc_email( {/each} {:else} -

    No presenters found...!

    - {$events_slct.event_presentation_id} - {$lq__event_presentation_obj} - {$lq__event_presenter_obj_li?.length} + + + + {/if} @@ -1711,7 +1726,7 @@ function send_sign_in_poc_email( Close - + diff --git a/src/routes/events_pres_mgmt/session/[slug]/form_agree.svelte b/src/routes/events_pres_mgmt/session/[slug]/form_agree.svelte index 8d328886..978b8648 100644 --- a/src/routes/events_pres_mgmt/session/[slug]/form_agree.svelte +++ b/src/routes/events_pres_mgmt/session/[slug]/form_agree.svelte @@ -33,7 +33,9 @@ let lq__event_presenter_obj = liveQuery( () => db_events.presenters.get($events_slct.event_presenter_id) ); -// $events_slct.event_presenter_obj = $lq__event_presenter_obj; +let lq__event_presentation_obj = liveQuery( + () => db_events.presentations.get($events_slct.event_presentation_id) +); $events_sess.pres_mgmt.disable_submit__opt_out = false; @@ -158,9 +160,9 @@ async function handle_update__event_presenter({ -{#await $lq__event_presenter_obj} + {#if $lq__event_presenter_obj}

    @@ -180,7 +182,7 @@ async function handle_update__event_presenter({

    {$lq__event_presenter_obj.full_name} ({$lq__event_presenter_obj.email}) agrees to the following terms and conditions for the presentation:

    -

    Title: "{$events_slct.presentation_obj.name}"

    +

    Title: "{$lq__event_presentation_obj?.name}"

    Opt-Out?

    diff --git a/src/routes/events_pres_mgmt/session/[slug]/presenter_view.svelte b/src/routes/events_pres_mgmt/session/[slug]/presenter_view.svelte index 988d6fd7..f271b07f 100644 --- a/src/routes/events_pres_mgmt/session/[slug]/presenter_view.svelte +++ b/src/routes/events_pres_mgmt/session/[slug]/presenter_view.svelte @@ -41,6 +41,10 @@ let lq__event_presenter_obj = liveQuery( () => db_events.presenters.get($events_slct.event_presenter_id) ); +let lq__event_presentation_obj = liveQuery( + () => db_events.presentations.get($events_slct.event_presentation_id) +); + let lq__event_file_obj_li = liveQuery( async () => await db_events.files.where('event_presenter_id_random').equals($events_slct.event_presenter_id).toArray() ); @@ -242,9 +246,9 @@ async function handle_delete__event_file({event_file_id}) { -{#await $lq__event_presenter_obj} - Loading... -{:then result} + + + {#if $lq__event_presenter_obj}

    @@ -263,7 +267,7 @@ async function handle_delete__event_file({event_file_id}) { type="button" - use:clipboard={encodeURI(`${$ae_loc.url_origin}/events_pres_mgmt/session/${$events_slct.event_session_id}?person_id=${$lq__event_presenter_obj.person_id_random}&person_pass=${$lq__event_presenter_obj.person_passcode}&presentation_id=${$events_slct.presentation_obj.event_presentation_id_random}&presenter_id=${$lq__event_presenter_obj.event_presenter_id_random}`)} + use:clipboard={encodeURI(`${$ae_loc.url_origin}/events_pres_mgmt/session/${$events_slct.event_session_id}?person_id=${$lq__event_presenter_obj.person_id_random}&person_pass=${$lq__event_presenter_obj.person_passcode}&presentation_id=${$lq__event_presenter_obj.event_presentation_id_random}&presenter_id=${$lq__event_presenter_obj.event_presenter_id_random}`)} class="btn btn-sm variant-ghost-warning float-right m-1" title="Copy the presenter access link to the clipboard." > @@ -278,19 +282,24 @@ async function handle_delete__event_file({event_file_id}) { { + console.log(`ae_crud_updated:`, e.detail); + events_func.handle_load_ae_obj_id__event_presentation({api_cfg: $ae_api, event_presentation_id: $lq__event_presentation_obj?.event_presentation_id_random, log_lvl: 1}); + }} > - Title: "{$events_slct.presentation_obj.name}" + Title: "{$lq__event_presentation_obj?.name}" +

    Presenter:

    @@ -313,7 +322,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.given_name} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -339,7 +348,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.family_name} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -379,7 +388,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.email} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={false} @@ -412,7 +421,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.person_primary_email} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -489,7 +498,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.affiliations} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={false} @@ -518,7 +527,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.person_affiliations} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={true} @@ -590,7 +599,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.professional_title} allow_null={false} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={false} @@ -618,7 +627,7 @@ async function handle_delete__event_file({event_file_id}) { field_type={'text'} field_value={$lq__event_presenter_obj.person_passcode} allow_null={true} - hide_edit_btn={!$ae_loc.trusted_access} + hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} outline_element={false} show_crud={false} display_inline={false} @@ -977,4 +986,4 @@ WARNING: The file upload and management is a work in progress. You can upload an {/if} -{/await} +