This should have been saved earlier. Lots of moving code around to and clean up.
This commit is contained in:
@@ -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 = `
|
||||
<div>${to_name},
|
||||
<p>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.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>26th Annual Lean Construction Congress (2024)</strong>:<br>
|
||||
<p>
|
||||
Session Name: ${session_name}<br>
|
||||
Session ID: ${event_session_id}<br>
|
||||
Presentation Name: ${presentation_name}<br>
|
||||
Presentation ID: ${event_presentation_id}
|
||||
</p>
|
||||
<p>Use this link to view or update your LCI 2024 presentation information.<br>
|
||||
Copy and paste link: <a href="${sign_in_url}">${sign_in_url}</a></p>
|
||||
</div>`;
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
@@ -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 = `
|
||||
<div>${to_name},
|
||||
<p>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.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>26th Annual Lean Construction Congress (2024)</strong>:<br>
|
||||
<p>
|
||||
Session Name: ${session_name}<br>
|
||||
Session ID: ${event_session_id}
|
||||
</p>
|
||||
<p>Use this link to view or update your LCI 2024 session information.<br>
|
||||
Copy and paste link: <a href="${sign_in_url}">${sign_in_url}</a></p>
|
||||
</div>`;
|
||||
|
||||
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,
|
||||
});
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher, onMount, tick } from 'svelte';
|
||||
|
||||
// import { liveQuery } from "dexie";
|
||||
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { events_loc } from '$lib/ae_events_stores';
|
||||
// import { db_events } from "$lib/db_events";
|
||||
|
||||
let entered_passcode: null|string = null;
|
||||
let show_passcode_input: boolean = false;
|
||||
@@ -158,29 +162,90 @@ function dispatch_access_type_changed() {
|
||||
access_type: $ae_loc.access_type
|
||||
});
|
||||
}
|
||||
|
||||
function dispatch_edit_mode_changed() {
|
||||
console.log('*** dispatch_edit_mode_changed() ***');
|
||||
|
||||
console.log(ae_util);
|
||||
console.log($ae_loc);
|
||||
|
||||
window.localStorage.setItem('edit_mode', $ae_loc.edit_mode);
|
||||
|
||||
dispatch('edit_mode_changed', {
|
||||
edit_mode: $ae_loc.edit_mode
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<section id="AE-Quick-Access-Type" class="ae_access_type bg-surface-100 text-surface-800 transition duration-300 delay-150 hover:delay-1000 hover:ease-out hover:transition-all hidden-print">
|
||||
{#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'}
|
||||
{#if $ae_loc.access_type == 'super'}
|
||||
<span class="fas fa-unlock"></span> Super Access
|
||||
{:else if $ae_loc.access_type == 'manager'}
|
||||
<span class="fas fa-unlock"></span> Manager Access
|
||||
{:else if $ae_loc.access_type == 'administrator'}
|
||||
<span class="fas fa-unlock"></span> Administrator Access
|
||||
{:else if $ae_loc.access_type == 'trusted'}
|
||||
<span class="fas fa-unlock"></span> Trusted Access
|
||||
{:else if $ae_loc.access_type == 'authenticated'}
|
||||
<span class="fas fa-unlock"></span> Authenticated Access
|
||||
{:else if $ae_loc.access_type == 'anonymous'}
|
||||
<span class="fas fa-unlock"></span> Anonymous Access
|
||||
<section id="AE-Quick-Access-Type" class="ae_access_type bg-surface-100 text-surface-800 transition duration-300 delay-150 hover:delay-1000 hover:ease-out hover:transition-all hidden-print flex flex-col items-end gap-1">
|
||||
|
||||
|
||||
<!-- Show list of authorized sessions and presentations for a user -->
|
||||
<!-- {#if $ae_loc.access_type == 'administrator'}
|
||||
{#if $events_loc.auth__kv.session}
|
||||
Sessions:
|
||||
<ul>
|
||||
{#each Object.entries($events_loc.auth__kv.session) as [key, value]}
|
||||
<li><a href="/events_pres_mgmt/session/{key}">
|
||||
{key}
|
||||
</a></li>
|
||||
{/each}
|
||||
</ul>
|
||||
{/if}
|
||||
{/if} -->
|
||||
|
||||
|
||||
<div>
|
||||
{#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous' && $ae_loc.access_type != 'authenticated'}
|
||||
{#if $ae_loc.edit_mode}
|
||||
<button
|
||||
on:click={() => {
|
||||
$ae_loc.edit_mode = false;
|
||||
dispatch_edit_mode_changed();
|
||||
}}
|
||||
class="btn btn-sm variant-soft-success"
|
||||
>
|
||||
<span class="fas fa-toggle-on mx-1"></span>
|
||||
Edit Mode On
|
||||
</button>
|
||||
{:else}
|
||||
<span class="fas fa-unlock mx-1"></span> Unknown Access
|
||||
<button
|
||||
on:click={() => {
|
||||
$ae_loc.edit_mode = true;
|
||||
dispatch_edit_mode_changed();
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning"
|
||||
>
|
||||
<span class="fas fa-toggle-off mx-1"></span>
|
||||
Edit Mode?
|
||||
</button>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'}
|
||||
<span class="fas fa-unlock mx-1"></span>
|
||||
|
||||
{#if $ae_loc.access_type == 'super'}
|
||||
<span class="fas fa-secret mx-1"></span> Super
|
||||
{:else if $ae_loc.access_type == 'manager'}
|
||||
<span class="fas fa-user-shield mx-1"></span> Manager
|
||||
{:else if $ae_loc.access_type == 'administrator'}
|
||||
<span class="fas fa-user-ninja mx-1"></span> 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}
|
||||
|
||||
<button
|
||||
class="btn btn-sm access_type_lock_btn hover:transition-all"
|
||||
class="btn btn-sm variant-soft-warning access_type_lock_btn hover:transition-all"
|
||||
on:click={() => {
|
||||
handle_clear_access();
|
||||
}}
|
||||
@@ -190,7 +255,7 @@ function dispatch_access_type_changed() {
|
||||
</button>
|
||||
{:else}
|
||||
<button
|
||||
class="btn btn-sm access_type_unlock_btn hover:transition-all"
|
||||
class="btn btn-sm variant-soft-success access_type_unlock_btn hover:transition-all"
|
||||
on:click={async () => {
|
||||
show_passcode_input = !show_passcode_input;
|
||||
await tick();
|
||||
@@ -212,7 +277,8 @@ function dispatch_access_type_changed() {
|
||||
placeholder="Access code"
|
||||
/>
|
||||
<!-- <div class="current_text transition-all">{$ae_loc.access_type}</div> -->
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,17 +106,17 @@ function dispatch_something_changed() {
|
||||
<div>
|
||||
{#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'}
|
||||
{#if $ae_loc.access_type == 'super'}
|
||||
<span class="fas fa-secret"></span> Super Access
|
||||
<span class="fas fa-secret mx-1"></span> Super Access
|
||||
{:else if $ae_loc.access_type == 'manager'}
|
||||
<span class="fas fa-user-shield"></span> Manager Access
|
||||
<span class="fas fa-user-shield mx-1"></span> Manager Access
|
||||
{:else if $ae_loc.access_type == 'administrator'}
|
||||
<span class="fas fa-user-ninja"></span> Administrator Access
|
||||
<span class="fas fa-user-ninja mx-1"></span> Administrator Access
|
||||
{:else if $ae_loc.access_type == 'trusted'}
|
||||
<span class="fas fa-user-nurse"></span> Trusted Access
|
||||
<span class="fas fa-user-nurse mx-1"></span> Trusted Access
|
||||
{:else if $ae_loc.access_type == 'authenticated'}
|
||||
<span class="fas fa-user-friends"></span> Authenticated Access
|
||||
<span class="fas fa-user-friends mx-1"></span> Authenticated Access
|
||||
{:else if $ae_loc.access_type == 'anonymous'}
|
||||
<span class="fas fa-users"></span> Anonymous Access
|
||||
<span class="fas fa-users mx-1"></span> Anonymous Access
|
||||
{:else}
|
||||
<span class="fas fa-unlock mx-1"></span> Unknown Access
|
||||
{/if}
|
||||
|
||||
@@ -41,7 +41,7 @@ let ds_submit_results: Promise<any>|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;
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ onMount(() => {
|
||||
>
|
||||
Manage Files:
|
||||
<span class="font-bold bg-success-100 px-4 border rounded-lg border-success-200"
|
||||
title="Files for {link_to_type ?? '-- not set --'} {link_to_id ?? '-- not set --'}: {$events_slct.session_obj_li.length ?? 'None'}"
|
||||
title="Files for {link_to_type ?? '-- not set --'}: {link_to_id ?? '-- not set --'} (files: {$lq__event_file_obj_li?.length ?? 'None'})"
|
||||
>
|
||||
<span class="fas fa-folder-open mx-1"></span>
|
||||
{$lq__event_file_obj_li ? `${$lq__event_file_obj_li.length}x` : '-- none --'}
|
||||
|
||||
Reference in New Issue
Block a user