Create presentations and presenters. Making things look nicer.
This commit is contained in:
0
src/lib/ae_core__person.ts
Normal file
0
src/lib/ae_core__person.ts
Normal file
@@ -113,6 +113,64 @@ export async function handle_load_ae_obj_li__event_presentation(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Updated 2024-06-24
|
||||||
|
export async function handle_create_ae_obj__event_presentation(
|
||||||
|
{
|
||||||
|
api_cfg,
|
||||||
|
event_id,
|
||||||
|
event_session_id,
|
||||||
|
data_kv,
|
||||||
|
params={},
|
||||||
|
log_lvl=0
|
||||||
|
}: {
|
||||||
|
api_cfg: any,
|
||||||
|
event_id: string,
|
||||||
|
event_session_id: string,
|
||||||
|
data_kv: key_val,
|
||||||
|
params?: key_val,
|
||||||
|
log_lvl?: number
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
console.log(`*** handle_create_ae_obj__event_presentation() *** event_id=${event_id} event_session_id=${event_session_id}`);
|
||||||
|
|
||||||
|
ae_promises.create__event_presentation = await api.create_ae_obj_crud({
|
||||||
|
api_cfg: api_cfg,
|
||||||
|
obj_type: 'event_presentation',
|
||||||
|
fields: {
|
||||||
|
event_id_random: event_id,
|
||||||
|
event_session_id_random: event_session_id,
|
||||||
|
...data_kv
|
||||||
|
},
|
||||||
|
key: api_cfg.api_crud_super_key,
|
||||||
|
params: params,
|
||||||
|
return_obj: true,
|
||||||
|
log_lvl: log_lvl
|
||||||
|
})
|
||||||
|
.then(function (event_presentation_obj_create_result) {
|
||||||
|
if (event_presentation_obj_create_result) {
|
||||||
|
handle_db_save_ae_obj_li__event_presentation(
|
||||||
|
{
|
||||||
|
obj_type: 'event_presentation',
|
||||||
|
obj_li: [event_presentation_obj_create_result]
|
||||||
|
});
|
||||||
|
return event_presentation_obj_create_result;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log('No results returned or failed.', error);
|
||||||
|
})
|
||||||
|
.finally(function () {
|
||||||
|
});
|
||||||
|
|
||||||
|
if (log_lvl) {
|
||||||
|
console.log('ae_promises.create__event_presentation:', ae_promises.create__event_presentation);
|
||||||
|
}
|
||||||
|
return ae_promises.create__event_presentation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// This function will loop through the event_presentation_obj_li and save each one to the DB.
|
// This function will loop through the event_presentation_obj_li and save each one to the DB.
|
||||||
// Updated 2024-06-10
|
// Updated 2024-06-10
|
||||||
export function handle_db_save_ae_obj_li__event_presentation(
|
export function handle_db_save_ae_obj_li__event_presentation(
|
||||||
|
|||||||
@@ -112,6 +112,65 @@ export async function handle_load_ae_obj_li__event_presenter(
|
|||||||
return ae_promises.load__event_presenter_obj_li;
|
return ae_promises.load__event_presenter_obj_li;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Updated 2024-06-24
|
||||||
|
export async function handle_create_ae_obj__event_presenter(
|
||||||
|
{
|
||||||
|
api_cfg,
|
||||||
|
event_id,
|
||||||
|
event_session_id,
|
||||||
|
event_presentation_id,
|
||||||
|
data_kv,
|
||||||
|
params={},
|
||||||
|
log_lvl=0
|
||||||
|
}: {
|
||||||
|
api_cfg: any,
|
||||||
|
event_id: string,
|
||||||
|
event_session_id: string,
|
||||||
|
event_presentation_id: string,
|
||||||
|
data_kv: key_val,
|
||||||
|
params?: key_val,
|
||||||
|
log_lvl?: number
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
console.log(`*** handle_create_ae_obj__event_presenter() *** event_id=${event_id} event_session_id=${event_session_id} event_presentation_id=${event_presentation_id}`);
|
||||||
|
|
||||||
|
ae_promises.create__event_presenter = await api.create_ae_obj_crud({
|
||||||
|
api_cfg: api_cfg,
|
||||||
|
obj_type: 'event_presenter',
|
||||||
|
fields: {
|
||||||
|
event_id_random: event_id,
|
||||||
|
event_session_id_random: event_session_id,
|
||||||
|
event_presentation_id_random: event_presentation_id,
|
||||||
|
...data_kv
|
||||||
|
},
|
||||||
|
key: api_cfg.api_crud_super_key,
|
||||||
|
params: params,
|
||||||
|
return_obj: true,
|
||||||
|
log_lvl: log_lvl
|
||||||
|
})
|
||||||
|
.then(function (event_presenter_obj_create_result) {
|
||||||
|
if (event_presenter_obj_create_result) {
|
||||||
|
handle_db_save_ae_obj_li__event_presenter(
|
||||||
|
{
|
||||||
|
obj_type: 'event_presenter', obj_li: [event_presenter_obj_create_result]
|
||||||
|
});
|
||||||
|
return event_presenter_obj_create_result;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log('No results returned or failed.', error);
|
||||||
|
})
|
||||||
|
.finally(function () {
|
||||||
|
});
|
||||||
|
|
||||||
|
if (log_lvl) {
|
||||||
|
console.log('ae_promises.create__event_presenter:', ae_promises.create__event_presenter);
|
||||||
|
}
|
||||||
|
return ae_promises.create__event_presenter;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Updated 2024-06-13
|
// Updated 2024-06-13
|
||||||
export async function handle_update_ae_obj__event_presenter(
|
export async function handle_update_ae_obj__event_presenter(
|
||||||
|
|||||||
@@ -35,12 +35,14 @@ import {
|
|||||||
import {
|
import {
|
||||||
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,
|
||||||
|
handle_create_ae_obj__event_presentation,
|
||||||
handle_db_save_ae_obj_li__event_presentation
|
handle_db_save_ae_obj_li__event_presentation
|
||||||
} from "$lib/ae_events__event_presentation";
|
} from "$lib/ae_events__event_presentation";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
handle_load_ae_obj_id__event_presenter,
|
handle_load_ae_obj_id__event_presenter,
|
||||||
handle_load_ae_obj_li__event_presenter,
|
handle_load_ae_obj_li__event_presenter,
|
||||||
|
handle_create_ae_obj__event_presenter,
|
||||||
handle_update_ae_obj__event_presenter,
|
handle_update_ae_obj__event_presenter,
|
||||||
handle_db_save_ae_obj_li__event_presenter
|
handle_db_save_ae_obj_li__event_presenter
|
||||||
} from "$lib/ae_events__event_presenter";
|
} from "$lib/ae_events__event_presenter";
|
||||||
@@ -67,9 +69,11 @@ let export_obj = {
|
|||||||
|
|
||||||
handle_load_ae_obj_id__event_presentation: handle_load_ae_obj_id__event_presentation,
|
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,
|
handle_load_ae_obj_li__event_presentation: handle_load_ae_obj_li__event_presentation,
|
||||||
|
handle_create_ae_obj__event_presentation: handle_create_ae_obj__event_presentation,
|
||||||
|
|
||||||
handle_load_ae_obj_id__event_presenter: handle_load_ae_obj_id__event_presenter,
|
handle_load_ae_obj_id__event_presenter: handle_load_ae_obj_id__event_presenter,
|
||||||
handle_load_ae_obj_li__event_presenter: handle_load_ae_obj_li__event_presenter,
|
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_update_ae_obj__event_presenter: handle_update_ae_obj__event_presenter,
|
||||||
|
|
||||||
handle_load_ae_obj_id__badge: handle_load_ae_obj_id__badge,
|
handle_load_ae_obj_id__badge: handle_load_ae_obj_id__badge,
|
||||||
|
|||||||
@@ -912,120 +912,185 @@ function send_sign_in_poc_email(
|
|||||||
|
|
||||||
<!-- Presentations in the session -->
|
<!-- Presentations in the session -->
|
||||||
<section>
|
<section>
|
||||||
|
|
||||||
|
<div class="float-right space-2 flex flex-row items-center">
|
||||||
|
{#if $ae_loc.trusted_access }
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
on:click={() => {
|
||||||
|
console.log('Add Presentation');
|
||||||
|
|
||||||
|
let presentation_data = {
|
||||||
|
event_id_random: $events_slct.event_id,
|
||||||
|
event_session_id_random: $events_slct.event_session_id,
|
||||||
|
name: 'New Presentation',
|
||||||
|
code: 'new_presentation',
|
||||||
|
enable: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
events_func.handle_create_ae_obj__event_presentation({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_id: $events_slct.event_id,
|
||||||
|
event_session_id: $events_slct.event_session_id,
|
||||||
|
data_kv: presentation_data,
|
||||||
|
log_lvl: 1,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
class="btn btn-sm variant-soft-warning hover:variant-filled-warning"
|
||||||
|
>
|
||||||
|
<span class="fas fa-plus mx-1"></span>
|
||||||
|
Add Presentation
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3 class="h3">Presentations:</h3>
|
<h3 class="h3">Presentations:</h3>
|
||||||
{#await $events_slct.event_presentation_obj_li}
|
{#await $events_slct.event_presentation_obj_li}
|
||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
{:then event_presentation_obj_li}
|
{:then event_presentation_obj_li}
|
||||||
{#if event_presentation_obj_li && event_presentation_obj_li.length > 0}
|
{#if event_presentation_obj_li && event_presentation_obj_li.length > 0}
|
||||||
<ul
|
<ul
|
||||||
class="space-y-2 px-4"
|
class="space-y-4 p-4 m-2 bg-gray-100 rounded-md"
|
||||||
>
|
>
|
||||||
{#each event_presentation_obj_li as event_presentation_obj}
|
{#each event_presentation_obj_li as event_presentation_obj}
|
||||||
<li>
|
<li
|
||||||
|
class="space-y-2 border border-gray-200 p-2 rounded-md"
|
||||||
|
>
|
||||||
|
|
||||||
|
<div class="float-right space-2 flex flex-row items-center">
|
||||||
|
{#if $ae_loc.trusted_access }
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
on:click={() => {
|
||||||
|
console.log('Add Presenter');
|
||||||
|
|
||||||
|
let presenter_data = {
|
||||||
|
event_id_random: $events_slct.event_id,
|
||||||
|
event_session_id_random: $events_slct.event_session_id,
|
||||||
|
event_presentation_id_random: event_presentation_obj.event_presentation_id_random,
|
||||||
|
given_name: 'New',
|
||||||
|
family_name: 'Presenter',
|
||||||
|
email: 'test+newpres@oneskyit.com',
|
||||||
|
code: 'new_presenter',
|
||||||
|
enable: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
events_func.handle_create_ae_obj__event_presenter({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_id: $events_slct.event_id,
|
||||||
|
event_session_id: $events_slct.event_session_id,
|
||||||
|
event_presentation_id: event_presentation_obj.event_presentation_id_random,
|
||||||
|
data_kv: presenter_data,
|
||||||
|
log_lvl: 1,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
class="btn btn-sm variant-soft-warning hover:variant-filled-warning"
|
||||||
|
>
|
||||||
|
<span class="fas fa-plus mx-1"></span>
|
||||||
|
Add Presenter
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<!-- Make sure to show the edit button only if the user has the correct permissions. Need to set the presentation ID in the store. -->
|
<!-- Make sure to show the edit button only if the user has the correct permissions. Need to set the presentation ID in the store. -->
|
||||||
{#if event_presentation_obj && ($ae_loc.trusted_access || $events_loc.auth__kv.presentation[event_presentation_obj.event_presentation_id_random])}
|
{#if event_presentation_obj && ($ae_loc.trusted_access || $events_loc.auth__kv.presentation[event_presentation_obj.event_presentation_id_random])}
|
||||||
|
|
||||||
{#if $events_slct.event_presentation_id == event_presentation_obj.event_presentation_id_random && ae_tmp[$events_slct.event_presentation_id]?.show__edit_presentation_name}
|
{#if $events_slct.event_presentation_id == event_presentation_obj.event_presentation_id_random && ae_tmp[$events_slct.event_presentation_id]?.show__edit_presentation_name}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
console.log('Cancel edit presentation');
|
console.log('Cancel edit presentation');
|
||||||
ae_tmp[$events_slct.event_presentation_id].show__edit_presentation_name = false;
|
|
||||||
|
|
||||||
// Careful with the trigger_patch. It will keep firing if not reset.
|
|
||||||
ae_triggers.update_event_presentation_name = false;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm variant-soft-warning float-right"
|
|
||||||
>
|
|
||||||
<span class="fas fa-times mx-1">
|
|
||||||
</span>
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
on:click={() => {
|
|
||||||
console.log('Edit presentation title and description');
|
|
||||||
$events_slct.event_presentation_id = event_presentation_obj.event_presentation_id_random;
|
|
||||||
$events_slct.event_presentation_obj = event_presentation_obj;
|
|
||||||
ae_tmp[$events_slct.event_presentation_id] = {
|
|
||||||
show__edit_presentation_name: true,
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
title="Edit presentation title and description"
|
|
||||||
class="btn btn-sm variant-soft-warning float-right">
|
|
||||||
<span class="fas fa-edit mx-1">
|
|
||||||
</span>
|
|
||||||
Edit
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if $events_slct.event_presentation_id == event_presentation_obj.event_presentation_id_random && ae_tmp[$events_slct.event_presentation_id]?.show__edit_presentation_name && $events_slct.event_presentation_obj}
|
|
||||||
<!-- Edit the presentation title -->
|
|
||||||
<Element_ae_crud
|
|
||||||
trigger_patch={ae_triggers.update_event_presentation_name}
|
|
||||||
api_cfg={$ae_api}
|
|
||||||
object_type={'event_presentation'}
|
|
||||||
object_id={$events_slct.event_presentation_obj.event_presentation_id_random}
|
|
||||||
field_name={'name'}
|
|
||||||
field_type={'input'}
|
|
||||||
field_value={$events_slct.event_presentation_obj.name}
|
|
||||||
allow_null={false}
|
|
||||||
hide_edit_btn={true}
|
|
||||||
outline_element={false}
|
|
||||||
show_crud={false}
|
|
||||||
display_inline={true}
|
|
||||||
class_li={'m-1'}
|
|
||||||
on:ae_crud_updated={e => {
|
|
||||||
console.log(`ae_crud_updated:`, e.detail);
|
|
||||||
|
|
||||||
events_func.handle_load_ae_obj_id__event_presentation({api_cfg: $ae_api, event_presentation_id: $events_slct.event_presentation_obj.event_presentation_id_random, log_lvl: 1})
|
|
||||||
.then(function (load_results) {
|
|
||||||
// We need to force reload the Indexed DB - Dexie.js?
|
|
||||||
// Sometimes the changes are not seen. The file disappears when the Save button is pressed.
|
|
||||||
|
|
||||||
// Maybe reload page?
|
|
||||||
// window.location.reload();
|
|
||||||
})
|
|
||||||
.finally(function () {
|
|
||||||
ae_tmp[$events_slct.event_presentation_id].show__edit_presentation_name = false;
|
ae_tmp[$events_slct.event_presentation_id].show__edit_presentation_name = false;
|
||||||
|
|
||||||
// Careful with the trigger_patch. It will keep firing if not reset.
|
// Careful with the trigger_patch. It will keep firing if not reset.
|
||||||
ae_triggers.update_event_presentation_name = false;
|
ae_triggers.update_event_presentation_name = false;
|
||||||
});
|
|
||||||
}}
|
}}
|
||||||
>
|
class="btn btn-sm variant-soft-warning"
|
||||||
<input
|
>
|
||||||
bind:value={$events_slct.event_presentation_obj.name}
|
<span class="fas fa-times mx-1">
|
||||||
class="input min-w-96 max-w-96 text-sm"
|
</span>
|
||||||
/>
|
Cancel
|
||||||
|
</button>
|
||||||
<!-- disabled={$events_slct.event_presentation_obj.name == event_presentation_obj.name} -->
|
{:else}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
console.log('*** Save button clicked ***');
|
console.log('Edit presentation title and description');
|
||||||
// if (!confirm('Are you sure you want to save this event_presenter?')) {return false;}
|
$events_slct.event_presentation_id = event_presentation_obj.event_presentation_id_random;
|
||||||
|
$events_slct.event_presentation_obj = event_presentation_obj;
|
||||||
console.log(`Selected event_presentation_id: ${$events_slct.event_presentation_obj.event_presentation_id_random}`);
|
ae_tmp[$events_slct.event_presentation_id] = {
|
||||||
|
show__edit_presentation_name: true,
|
||||||
ae_triggers.update_event_presentation_name = true;
|
}
|
||||||
// ae_triggers.update_event_presentation_name = $events_slct.event_presentation_obj.event_presentation_id_random;
|
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm variant-soft-success hover:variant-ghost-success mx-1"
|
title="Edit presentation title and description"
|
||||||
>
|
class="btn btn-sm variant-soft-warning">
|
||||||
<span class="fas fa-save mx-1"></span>
|
<span class="fas fa-edit mx-1">
|
||||||
Save
|
</span>
|
||||||
|
Edit Presentation Name
|
||||||
</button>
|
</button>
|
||||||
</Element_ae_crud>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if $events_slct.event_presentation_id == event_presentation_obj.event_presentation_id_random && ae_tmp[$events_slct.event_presentation_id]?.show__edit_presentation_name && $events_slct.event_presentation_obj}
|
||||||
|
<!-- Edit the presentation title -->
|
||||||
|
<Element_ae_crud
|
||||||
|
trigger_patch={ae_triggers.update_event_presentation_name}
|
||||||
|
api_cfg={$ae_api}
|
||||||
|
object_type={'event_presentation'}
|
||||||
|
object_id={$events_slct.event_presentation_obj.event_presentation_id_random}
|
||||||
|
field_name={'name'}
|
||||||
|
field_type={'input'}
|
||||||
|
field_value={$events_slct.event_presentation_obj.name}
|
||||||
|
allow_null={false}
|
||||||
|
hide_edit_btn={true}
|
||||||
|
outline_element={false}
|
||||||
|
show_crud={false}
|
||||||
|
display_inline={true}
|
||||||
|
class_li={'m-1'}
|
||||||
|
on:ae_crud_updated={e => {
|
||||||
|
console.log(`ae_crud_updated:`, e.detail);
|
||||||
|
|
||||||
|
events_func.handle_load_ae_obj_id__event_presentation({api_cfg: $ae_api, event_presentation_id: $events_slct.event_presentation_obj.event_presentation_id_random, log_lvl: 1})
|
||||||
|
.then(function (load_results) {
|
||||||
|
// We need to force reload the Indexed DB - Dexie.js?
|
||||||
|
// Sometimes the changes are not seen. The file disappears when the Save button is pressed.
|
||||||
|
|
||||||
|
// Maybe reload page?
|
||||||
|
// window.location.reload();
|
||||||
|
})
|
||||||
|
.finally(function () {
|
||||||
|
ae_tmp[$events_slct.event_presentation_id].show__edit_presentation_name = false;
|
||||||
|
|
||||||
|
// Careful with the trigger_patch. It will keep firing if not reset.
|
||||||
|
ae_triggers.update_event_presentation_name = false;
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
bind:value={$events_slct.event_presentation_obj.name}
|
||||||
|
class="input min-w-96 max-w-96 text-sm"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- disabled={$events_slct.event_presentation_obj.name == event_presentation_obj.name} -->
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
on:click={() => {
|
||||||
|
console.log('*** Save button clicked ***');
|
||||||
|
// if (!confirm('Are you sure you want to save this event_presenter?')) {return false;}
|
||||||
|
|
||||||
|
console.log(`Selected event_presentation_id: ${$events_slct.event_presentation_obj.event_presentation_id_random}`);
|
||||||
|
|
||||||
|
ae_triggers.update_event_presentation_name = true;
|
||||||
|
// ae_triggers.update_event_presentation_name = $events_slct.event_presentation_obj.event_presentation_id_random;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm variant-soft-success hover:variant-ghost-success mx-1"
|
||||||
|
>
|
||||||
|
<span class="fas fa-save mx-1"></span>
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
</Element_ae_crud>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4 class="h5">
|
<h4 class="h5">
|
||||||
"{event_presentation_obj.name}"
|
"{event_presentation_obj.name}"
|
||||||
@@ -1040,35 +1105,45 @@ function send_sign_in_poc_email(
|
|||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<strong class="text-sm">
|
{#if event_presentation_obj.description}
|
||||||
Description:
|
<strong class="text-sm">
|
||||||
</strong>
|
Description:
|
||||||
<button
|
</strong>
|
||||||
type="button"
|
|
||||||
on:click={() => {
|
|
||||||
console.log('Show/Hide Description');
|
|
||||||
if ($events_loc.pres_mgmt.show_content__presentation_description == event_presentation_obj.event_presentation_id_random) {
|
|
||||||
$events_loc.pres_mgmt.show_content__presentation_description = null;
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_content__presentation_description = event_presentation_obj.event_presentation_id_random;
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm variant-soft-surface hover:variant-filled-surface text-xs"
|
|
||||||
>
|
|
||||||
{#if $events_loc.pres_mgmt.show_content__presentation_description == event_presentation_obj.event_presentation_id_random}
|
|
||||||
<span class="fas fa-eye-slash mx-1"></span>
|
|
||||||
<span>Hide Description</span>
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-eye mx-1"></span>
|
|
||||||
<span>Show</span>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<pre
|
<button
|
||||||
class="whitespace-pre-wrap p-2 bg-gray-100 rounded-md"
|
type="button"
|
||||||
class:hidden={$events_loc.pres_mgmt.show_content__presentation_description !== event_presentation_obj.event_presentation_id_random}
|
on:click={() => {
|
||||||
>{event_presentation_obj.description}</pre>
|
console.log('Show/Hide Description');
|
||||||
|
if ($events_loc.pres_mgmt.show_content__presentation_description == event_presentation_obj.event_presentation_id_random) {
|
||||||
|
$events_loc.pres_mgmt.show_content__presentation_description = null;
|
||||||
|
} else {
|
||||||
|
$events_loc.pres_mgmt.show_content__presentation_description = event_presentation_obj.event_presentation_id_random;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
class="btn btn-sm variant-soft-surface hover:variant-filled-surface text-xs"
|
||||||
|
>
|
||||||
|
{#if $events_loc.pres_mgmt.show_content__presentation_description == event_presentation_obj.event_presentation_id_random}
|
||||||
|
<span class="fas fa-eye-slash mx-1"></span>
|
||||||
|
<span>Hide Description</span>
|
||||||
|
{:else}
|
||||||
|
<span class="fas fa-eye mx-1"></span>
|
||||||
|
<span>Show</span>
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<pre
|
||||||
|
class="whitespace-pre-wrap p-2 bg-gray-100 rounded-md"
|
||||||
|
class:hidden={$events_loc.pres_mgmt.show_content__presentation_description !== event_presentation_obj.event_presentation_id_random}
|
||||||
|
>{event_presentation_obj.description}</pre>
|
||||||
|
{:else}
|
||||||
|
<div class="text-sm text-gray-500 bg-gray-100 p-1 rounded-md border border-gray-200"
|
||||||
|
class:hidden={!$ae_loc.administrator_access}
|
||||||
|
>
|
||||||
|
<span class="fas fa-exclamation-triangle mx-1"></span>
|
||||||
|
No description provided.
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Show presenters for this presentation -->
|
<!-- Show presenters for this presentation -->
|
||||||
{#await event_presentation_obj.event_presenter_li}
|
{#await event_presentation_obj.event_presenter_li}
|
||||||
|
|||||||
Reference in New Issue
Block a user