Removing hardcoded LCI related. General clean up of things.

This commit is contained in:
Scott Idem
2024-08-20 12:59:35 -04:00
parent 608bef7f21
commit 5139a706d0
12 changed files with 749 additions and 1332 deletions

View File

@@ -10,7 +10,7 @@ import { liveQuery } from "dexie";
import type { key_val } from '$lib/ae_stores';
import { ae_util } from '$lib/ae_utils';
import Element_ae_crud from '$lib/element_ae_crud.svelte';
// import Element_data_store from '$lib/element_data_store.svelte';
import Element_data_store from '$lib/element_data_store.svelte';
let ae_promises: key_val = {};
let ae_tmp: key_val = {};
@@ -24,8 +24,6 @@ import { events_func } from '$lib/ae_events_functions';
import Form_agree from './form_agree.svelte';
import Comp_event_presentation_obj_li from './ae_comp__event_presentation_obj_li.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_all.svelte';
// Exports
@@ -714,78 +712,48 @@ $: if ($lq__event_session_obj) {
{/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)}
<div class="min-w-max flex flex-col gap-1">
<!-- The account_id should not be hardcoded! -->
{#if $lq__event_session_obj?.account_id_random == 'xFP7AhU8Zlc'}
<!-- This styling took a while and finally looks good on most sized screens. -->
<a
class="btn btn-md variant-ghost-primary hover:variant-filled-primary flex flex-row items-center justify-between max-w-xs md:max-w-full text-wrap md:text-nowrap"
href="https://static.oneskyit.com/c/LCI/files/LCI_Congress_Template_2024.pptx"
>
<span class="fas fa-download mx-1"></span>
<!-- This is subtle but helps with the button layout. -->
<span class="text-center grow">
<span class="text-sm">Download</span><br>
LCI Congress Template 2024 (PowerPoint)
</span>
</a>
<a
class="btn btn-md variant-ghost-primary hover:variant-filled-primary flex flex-row items-center justify-between max-w-xs md:max-w-full text-wrap md:text-nowrap"
href="https://static.oneskyit.com/c/LCI/files/LCI_Speaker_and_Champion_Congress_Task_List_2024.xlsx"
>
<span class="fas fa-download mx-1"></span>
<!-- This is subtle but helps with the button layout. -->
<span class="text-center grow wrap">
<span class="text-sm">Download</span><br>
LCI Speaker and Champion Congress Task List (Excel)
</span>
</a>
<!-- Message if they have agreed -->
<Element_data_store
ds_code="events__pres_mgmt__session_page_authorized_info"
ds_name="Default: Events - Pres Mgmt Session Authorized Info"
ds_type="html"
for_type="event"
for_id={$lq__event_presenter_obj?.event_id_random}
class_li="w-fit max-w-screen-lg flex flex-col gap-1"
show_edit={false}
show_edit_btn={true}
/>
{:else}
<p>Please select your name below to upload presentation files.</p>
<!-- Message if they have not yet agreed -->
<Element_data_store
ds_code="events__pres_mgmt__presenter_agree_read_consent"
ds_name="Default: Events - Pres Mgmt Session Restricted Access"
ds_type="html"
for_type="event"
for_id={$lq__event_presenter_obj?.event_id_random}
class_li="w-fit max-w-screen-lg text-lg text-red-500 font-bold text-center p-1 m-1 border border-red-200 rounded-md bg-red-100 space-y-2"
show_edit={false}
show_edit_btn={true}
/>
{/if}
</div>
{:else}
<span class="text-lg text-red-500 font-bold text-center p-1 m-1 border border-red-200 rounded-md bg-red-100 space-y-2">
<p><strong>Read and Consent Agreement?</strong></p>
<p>Please select your name below to view, read, and consent the agreement.</p>
<p>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.</p>
</span>
{/if}
<!-- {#if $events_loc.auth__person?.id}
<button
type="button"
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
on:click={() => {
sign_out();
alert('You have been signed out.');
}}
>
<span class="fas fa-times mx-1"></span>
Sign Out (Clear Session)
</button>
{/if} -->
{:else}
<div
class="text-xl text-red-500 font-bold text-center p-1 m-1 border border-red-200 rounded-md bg-red-100"
>
<p><strong>Restricted access!</strong></p>
<p>
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.
<!-- This email address must match your LCI member record. -->
</p>
</div>
<Element_data_store
ds_code="events__pres_mgmt__session_page_restricted_access"
ds_name="Default: Events - Pres Mgmt Session Restricted Access"
ds_type="html"
for_type="event"
for_id={$lq__event_presenter_obj?.event_id_random}
class_li="w-fit max-w-screen-lg text-xl text-red-500 font-bold text-center p-1 m-1 border border-red-200 rounded-md bg-red-100"
show_edit={false}
show_edit_btn={true}
/>
{/if}
</div>
</section>
@@ -793,6 +761,7 @@ $: if ($lq__event_session_obj) {
<!-- Presentations in the session -->
<section>
{#await $lq__event_presentation_obj_li}
Loading....
{:then event_presentation_obj_li}
@@ -807,7 +776,6 @@ $: if ($lq__event_session_obj) {
{/if}
{/await}
</section>
{/if}