Cleaning things up. Making it easier to find things.
This commit is contained in:
@@ -5,6 +5,7 @@ export let log_lvl = 1;
|
||||
|
||||
// Imports (external and then internal)
|
||||
import { browser } from '$app/environment';
|
||||
import { clipboard } from '@skeletonlabs/skeleton';
|
||||
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
@@ -101,8 +102,139 @@ if (!$ae_loc.authenticated_access && $events_loc.pres_mgmt.show_content__present
|
||||
|
||||
{:else if $lq__event_presenter_obj?.enable || $ae_loc.trusted_access}
|
||||
|
||||
<h2 class="h2 text-center rounded-md p-2 bg-gray-300">
|
||||
<h2 class="h2 text-center rounded-md p-1 px-2 bg-gray-300 flex flex-row gap-0.25 items-center justify-between">
|
||||
<span
|
||||
class="flex flex-row gap-1 items-center"
|
||||
>
|
||||
<span class="fas fa-user m-1"></span>
|
||||
<!-- Button to toggle between the regular presenter view and managing presenter files -->
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
if ($events_loc.pres_mgmt.show_content__presenter_view == 'manage_files') {
|
||||
$events_loc.pres_mgmt.show_content__presenter_view = null;
|
||||
} else {
|
||||
$events_loc.pres_mgmt.show_content__presenter_view = 'manage_files';
|
||||
}
|
||||
}}
|
||||
class="btn btn-md hover:variant-filled-primary"
|
||||
class:variant-ghost-tertiary={$events_loc.pres_mgmt.show_content__presenter_view == 'manage_files'}
|
||||
class:variant-filled-tertiary={$events_loc.pres_mgmt.show_content__presenter_view != 'manage_files'}
|
||||
class:hidden={!$ae_loc.authenticated_access}
|
||||
title="View presenter information or manage files for the presenter"
|
||||
>
|
||||
{#if $events_loc.pres_mgmt.show_content__presenter_view == 'manage_files'}
|
||||
<span class="fas fa-info m-1"></span>
|
||||
<!-- View Details -->
|
||||
Presenter Info?
|
||||
{:else}
|
||||
<span class="fas fa-file-archive m-1"></span>
|
||||
Presenter Files?
|
||||
<span
|
||||
class="badge badge-icon variant-glass-success absolute -top-1.5 -right-1.5 z-10"
|
||||
class:hidden={!$lq__event_presenter_obj?.file_count}
|
||||
>
|
||||
{$lq__event_presenter_obj?.file_count}×
|
||||
</span>
|
||||
{/if}
|
||||
</button>
|
||||
</span>
|
||||
|
||||
|
||||
{@html $lq__event_presenter_obj?.full_name ?? ae_snip.html__not_set}
|
||||
<!-- <span class="text-sm text-gray-600 dark:text-gray-400">
|
||||
Presenter ID: {$lq__event_presenter_obj?.event_presenter_id_random}
|
||||
</span> -->
|
||||
|
||||
|
||||
<span
|
||||
class="flex flex-col gap-0.25 justify-end items-end"
|
||||
>
|
||||
|
||||
<span class="text-sm text-gray-600 dark:text-gray-400">
|
||||
{#if (!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id] && !$events_loc.auth__kv.session[$lq__event_presenter_obj.event_session_id])}
|
||||
<!-- Only show the domain name of the email address. -->
|
||||
<!-- ( -->
|
||||
<!-- {$lq__event_presenter_obj.email.replace(/@.*$/, '@...')} -->
|
||||
<!-- {$lq__event_presenter_obj.person_primary_email.substring(0, 1) + '...@example.com'} -->
|
||||
|
||||
<!-- ) -->
|
||||
<!-- {@html $lq__event_presenter_obj?.email ? $lq__event_presenter_obj?.email.replace(/^(.{3}).*@/, '$1...@') : 'email'+ae_snip.html__not_set} -->
|
||||
<!-- ) -->
|
||||
Not signed in as presenter
|
||||
{#if $lq__event_presenter_obj?.email}
|
||||
({$lq__event_presenter_obj.email.replace(/^(.{3}).*@/, '$1...@')})
|
||||
{:else}
|
||||
<!-- email
|
||||
{ae_snip.html__not_set} -->
|
||||
{/if}
|
||||
{:else}
|
||||
({@html ($lq__event_presenter_obj?.email && $lq__event_presenter_obj?.email.length) ? $lq__event_presenter_obj?.email : 'email '+ae_snip.html__not_set})
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
<span>
|
||||
{#if $lq__event_presenter_obj.person_id && $ae_loc.trusted_access}
|
||||
<!-- A button to copy the access link to the clipboard. -->
|
||||
<!-- Example: /events_pres_mgmt/session/Wh8UnJlbIA0?person_id=fV1dl_IJ0yY&person_pass=abc123 -->
|
||||
<button
|
||||
type="button"
|
||||
use:clipboard={encodeURI(`${$ae_loc.url_origin}/events_pres_mgmt/session/${$lq__event_presenter_obj.event_session_id}?person_id=${$lq__event_presenter_obj.person_id}&person_pass=${$lq__event_presenter_obj.person_passcode}&presentation_id=${$lq__event_presenter_obj?.event_presentation_id}&presenter_id=${$lq__event_presenter_obj?.event_presenter_id}`)}
|
||||
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning m-0.25"
|
||||
title="Copy the presenter access link to the clipboard."
|
||||
>
|
||||
<span class="fas fa-copy m-1"></span>
|
||||
Copy Access Link
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{#if $events_loc.pres_mgmt?.require__presenter_agree
|
||||
&& $lq__event_presenter_obj?.email
|
||||
&& ($ae_loc.public_access || !$events_loc.auth__person?.id)
|
||||
}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
console.log('Email the access link');
|
||||
if (!$lq__event_presenter_obj.email) {
|
||||
alert('No email address found for this presenter.');
|
||||
return;
|
||||
}
|
||||
if (confirm(`This will send the sign in email to ${$lq__event_presenter_obj.email}`)) {
|
||||
console.log('Send the email to the presenter.');
|
||||
} else {
|
||||
console.log('Cancelled sending the email.');
|
||||
return false;
|
||||
}
|
||||
|
||||
events_func.email_sign_in__event_presenter(
|
||||
{
|
||||
api_cfg: $ae_api,
|
||||
to_email: $lq__event_presenter_obj?.email,
|
||||
to_name: $lq__event_presenter_obj?.full_name?? '-- not set --',
|
||||
base_url: $ae_loc.url_origin,
|
||||
person_id: $lq__event_presenter_obj?.person_id?? '-- not set --',
|
||||
person_passcode: $lq__event_presenter_obj?.person_passcode?? '-- not set --',
|
||||
event_session_id: $lq__event_presenter_obj?.event_session_id,
|
||||
event_presentation_id: $lq__event_presenter_obj?.event_presentation_id,
|
||||
event_presenter_id: $lq__event_presenter_obj?.event_presenter_id,
|
||||
session_name: $lq__event_presenter_obj?.event_session_name?? '-- not set --',
|
||||
presentation_name: $lq__event_presenter_obj?.event_presentation_name?? '-- not set --',
|
||||
}
|
||||
);
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary m-0.25"
|
||||
title="Email the access link to the presenter"
|
||||
>
|
||||
<span class="fas fa-envelope m-1"></span>
|
||||
Email Access Link
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
{#if !$events_loc.pres_mgmt.show_content__presenter_view || $events_loc.pres_mgmt.show_content__presenter_view == 'default' && $lq__event_presenter_obj}
|
||||
@@ -134,7 +266,7 @@ if (!$ae_loc.authenticated_access && $events_loc.pres_mgmt.show_content__present
|
||||
<h3 class="h5 text-center">
|
||||
<span class="fas fa-tasks m-1"></span>
|
||||
<span class="fas fa-mail-bulk m-1"></span>
|
||||
Manage and Upload Presenter Files:
|
||||
Manage and Upload Presenter Files
|
||||
</h3>
|
||||
|
||||
<!-- Yes... This is a duplicate of what is shown when they press "Presenter Files" button. It can be cleaned up later. -->
|
||||
@@ -174,7 +306,7 @@ if (!$ae_loc.authenticated_access && $events_loc.pres_mgmt.show_content__present
|
||||
<h3 class="h5 text-center">
|
||||
<span class="fas fa-tasks m-1"></span>
|
||||
<span class="fas fa-mail-bulk m-1"></span>
|
||||
Manage and Upload Presenter Files:
|
||||
Manage and Upload Presenter Files
|
||||
</h3>
|
||||
|
||||
{#if $ae_loc.public_access || $events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id_random]}
|
||||
|
||||
@@ -56,7 +56,7 @@ let ae_triggers: key_val = {};
|
||||
class="{ae_snip.classes__events_pres_mgmt_menu__button_special}"
|
||||
class:variant-filled-primary={$events_loc.pres_mgmt.show_content__presenter_view == 'manage_files'}
|
||||
class:variant-glass-primary={$events_loc.pres_mgmt.show_content__presenter_view != 'manage_files'}
|
||||
class:hidden={!$ae_loc.authenticated_access}
|
||||
class:hidden={!$ae_loc.authenticated_access || 1==1}
|
||||
title="View presenter information or manage files for the presenter"
|
||||
>
|
||||
{#if $events_loc.pres_mgmt.show_content__presenter_view == 'manage_files'}
|
||||
|
||||
@@ -305,92 +305,15 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
|
||||
{#if $lq__event_presenter_obj}
|
||||
<h2 class="h3">
|
||||
Presenter Details for:<br>
|
||||
<strong>
|
||||
{$lq__event_presenter_obj.full_name}
|
||||
</strong>
|
||||
<span class="text-sm">
|
||||
{#if (!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id] && !$events_loc.auth__kv.session[$lq__event_presenter_obj.event_session_id])}
|
||||
<!-- Only show the domain name of the email address. -->
|
||||
<!-- ( -->
|
||||
<!-- {$lq__event_presenter_obj.email.replace(/@.*$/, '@...')} -->
|
||||
<!-- {$lq__event_presenter_obj.person_primary_email.substring(0, 1) + '...@example.com'} -->
|
||||
{#if $lq__event_presenter_obj?.email}
|
||||
({$lq__event_presenter_obj.email.replace(/^(.{3}).*@/, '$1...@')})
|
||||
{:else}
|
||||
<!-- email
|
||||
{ae_snip.html__not_set} -->
|
||||
{/if}
|
||||
<!-- ) -->
|
||||
<!-- {@html $lq__event_presenter_obj?.email ? $lq__event_presenter_obj?.email.replace(/^(.{3}).*@/, '$1...@') : 'email'+ae_snip.html__not_set} -->
|
||||
<!-- ) -->
|
||||
(Not signed in as presenter)
|
||||
{:else}
|
||||
({@html ($lq__event_presenter_obj?.email && $lq__event_presenter_obj?.email.length) ? $lq__event_presenter_obj?.email : 'email '+ae_snip.html__not_set})
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
{#if $lq__event_presenter_obj.person_id && $ae_loc.trusted_access}
|
||||
<!-- A button to copy the access link to the clipboard. -->
|
||||
<!-- Example: /events_pres_mgmt/session/Wh8UnJlbIA0?person_id=fV1dl_IJ0yY&person_pass=abc123 -->
|
||||
<button
|
||||
type="button"
|
||||
use:clipboard={encodeURI(`${$ae_loc.url_origin}/events_pres_mgmt/session/${$lq__event_presenter_obj.event_session_id}?person_id=${$lq__event_presenter_obj.person_id}&person_pass=${$lq__event_presenter_obj.person_passcode}&presentation_id=${$lq__event_presenter_obj?.event_presentation_id}&presenter_id=${$lq__event_presenter_obj?.event_presenter_id}`)}
|
||||
class="btn btn-sm variant-ghost-warning float-right m-1"
|
||||
title="Copy the presenter access link to the clipboard."
|
||||
>
|
||||
<span class="fas fa-copy mx-1"></span>
|
||||
Copy Access Link
|
||||
</button>
|
||||
{/if}
|
||||
{#if $events_loc.pres_mgmt?.require__presenter_agree
|
||||
&& $lq__event_presenter_obj?.email
|
||||
&& ($ae_loc.public_access || !$events_loc.auth__person?.id)
|
||||
}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
console.log('Email the access link');
|
||||
if (!$lq__event_presenter_obj.email) {
|
||||
alert('No email address found for this presenter.');
|
||||
return;
|
||||
}
|
||||
if (confirm(`This will send the sign in email to ${$lq__event_presenter_obj.email}`)) {
|
||||
console.log('Send the email to the presenter.');
|
||||
} else {
|
||||
console.log('Cancelled sending the email.');
|
||||
return false;
|
||||
}
|
||||
|
||||
events_func.email_sign_in__event_presenter(
|
||||
{
|
||||
api_cfg: $ae_api,
|
||||
to_email: $lq__event_presenter_obj?.email,
|
||||
to_name: $lq__event_presenter_obj?.full_name?? '-- not set --',
|
||||
base_url: $ae_loc.url_origin,
|
||||
person_id: $lq__event_presenter_obj?.person_id?? '-- not set --',
|
||||
person_passcode: $lq__event_presenter_obj?.person_passcode?? '-- not set --',
|
||||
event_session_id: $lq__event_presenter_obj?.event_session_id,
|
||||
event_presentation_id: $lq__event_presenter_obj?.event_presentation_id,
|
||||
event_presenter_id: $lq__event_presenter_obj?.event_presenter_id,
|
||||
session_name: $lq__event_presenter_obj?.event_session_name?? '-- not set --',
|
||||
presentation_name: $lq__event_presenter_obj?.event_presentation_name?? '-- not set --',
|
||||
}
|
||||
);
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary my-0.5 float-right"
|
||||
title="Email the access link to the presenter"
|
||||
>
|
||||
<span class="fas fa-envelope mx-1"></span>
|
||||
Email Access Link
|
||||
</button>
|
||||
{/if}
|
||||
</h2>
|
||||
<h3 class="h5 text-center">
|
||||
<span class="fas fa-id-card"></span>
|
||||
<!-- <span class="fas fa-info"></span> -->
|
||||
Presenter Details
|
||||
</h3>
|
||||
|
||||
<section class="p-2">
|
||||
<h3 class="h4">
|
||||
<span class="text-md font-normal">
|
||||
<span class="text-base">
|
||||
Session:
|
||||
</span>
|
||||
<a
|
||||
@@ -418,7 +341,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
events_func.load_ae_obj_id__event_presentation({api_cfg: $ae_api, event_presentation_id: $lq__event_presentation_obj?.event_presentation_id, log_lvl: 0});
|
||||
}}
|
||||
>
|
||||
<span class="text-md font-normal">
|
||||
<span class="text-base">
|
||||
Presentation Title:
|
||||
</span>
|
||||
<span
|
||||
@@ -432,9 +355,9 @@ $: if ($lq__event_presenter_obj) {
|
||||
</h3>
|
||||
|
||||
<h3 class="h4">
|
||||
<span class="text-md font-normal">
|
||||
<span class="text-base">
|
||||
Presenter:
|
||||
<span class="text-md font-normal">
|
||||
</span>
|
||||
</h3>
|
||||
|
||||
|
||||
@@ -486,7 +409,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
class="space-y-2 px-4"
|
||||
>
|
||||
<li
|
||||
class:hidden={!$ae_loc.trusted_access && !$ae_loc.edit_mode}
|
||||
class:hidden={!$ae_loc.trusted_access || !$ae_loc.edit_mode && !$ae_loc.manager_access}
|
||||
>
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
@@ -507,10 +430,6 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
})
|
||||
.then(function (load_results) {
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -541,10 +460,6 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
})
|
||||
.then(function (load_results) {
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -574,10 +489,6 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
})
|
||||
.then(function (load_results) {
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -600,17 +511,11 @@ $: if ($lq__event_presenter_obj) {
|
||||
{/if}
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="fas fa-user"></span>
|
||||
<!-- {#if !$events_sess.pres_mgmt.show_edit__event_presenter_name}
|
||||
{$events_slct.presenter_obj.full_name}
|
||||
{:else} -->
|
||||
<!-- <div
|
||||
hidden={!$events_sess.pres_mgmt.show_edit__event_presenter_name}
|
||||
> -->
|
||||
<li
|
||||
class:hidden={!$ae_loc.trusted_access || !$ae_loc.edit_mode && !$ae_loc.manager_access}
|
||||
>
|
||||
|
||||
<!-- </div> -->
|
||||
<!-- {/if} -->
|
||||
<span class="fas fa-user"></span>
|
||||
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
@@ -631,10 +536,6 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
})
|
||||
.then(function (load_results) {
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -642,6 +543,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
{$lq__event_presenter_obj.given_name}
|
||||
</span>
|
||||
</Element_ae_crud>
|
||||
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
object_type={'event_presenter'}
|
||||
@@ -660,10 +562,6 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
})
|
||||
.then(function (load_results) {
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -671,6 +569,174 @@ $: if ($lq__event_presenter_obj) {
|
||||
{$lq__event_presenter_obj.family_name}
|
||||
</span>
|
||||
</Element_ae_crud>
|
||||
|
||||
|
||||
{#if $lq__event_presenter_obj.person_given_name != $lq__event_presenter_obj.given_name || $lq__event_presenter_obj.person_family_name != $lq__event_presenter_obj.family_name}
|
||||
|
||||
{#if $lq__event_presenter_obj.person_given_name != $lq__event_presenter_obj.given_name}
|
||||
<div>
|
||||
<span class="fas fa-star-of-life"></span>
|
||||
<span class="fas fa-user-circle"></span>
|
||||
given name:
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
object_type={'person'}
|
||||
object_id={$lq__event_presenter_obj.person_id}
|
||||
field_name={'given_name'}
|
||||
field_type={'text'}
|
||||
field_value={$lq__event_presenter_obj.person_given_name}
|
||||
allow_null={false}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
class_li={''}
|
||||
on:ae_crud_updated={e => {
|
||||
console.log(`ae_crud_updated:`, e.detail);
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api,
|
||||
event_presenter_id: $lq__event_presenter_obj?.event_presenter_id,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span class="font-bold">
|
||||
{@html $lq__event_presenter_obj.person_given_name ?? ae_snip.html__not_set}
|
||||
</span>
|
||||
</Element_ae_crud>
|
||||
|
||||
{#if $ae_loc.edit_mode && $ae_loc.trusted_access}
|
||||
<!-- We need a way to let them re-sync the names. The update here should flow back to the person.given_name. -->
|
||||
<Element_ae_crud
|
||||
trigger_patch={ae_triggers.update_person_given_name}
|
||||
api_cfg={$ae_api}
|
||||
object_type={'person'}
|
||||
object_id={$lq__event_presenter_obj.person_id}
|
||||
field_name={'given_name'}
|
||||
field_type={'text'}
|
||||
field_value={$lq__event_presenter_obj.given_name}
|
||||
allow_null={false}
|
||||
hide_edit_btn={true}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
class_li={''}
|
||||
on:ae_crud_updated={e => {
|
||||
console.log(`ae_crud_updated:`, e.detail);
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api,
|
||||
event_presenter_id: $lq__event_presenter_obj?.event_presenter_id,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
}}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
console.log('*** Sync name button clicked ***');
|
||||
if (!confirm('Are you sure you want to sync the names?')) {return false;}
|
||||
|
||||
ae_triggers.update_person_given_name = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||
title="Use the name from this presenter record to overwrite the person record. Presenter ID: {$lq__event_presenter_obj?.event_presenter_id} to Person ID: {$lq__event_presenter_obj?.person_id}"
|
||||
>
|
||||
<span class="fas fa-sync-alt mx-1"></span>
|
||||
Sync
|
||||
</button>
|
||||
</Element_ae_crud>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if $lq__event_presenter_obj.person_family_name != $lq__event_presenter_obj.family_name}
|
||||
<div>
|
||||
<span class="fas fa-star-of-life"></span>
|
||||
<span class="fas fa-user-circle"></span>
|
||||
family name:
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
object_type={'person'}
|
||||
object_id={$lq__event_presenter_obj.person_id}
|
||||
field_name={'family_name'}
|
||||
field_type={'text'}
|
||||
field_value={$lq__event_presenter_obj.person_family_name}
|
||||
allow_null={true}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
class_li={''}
|
||||
on:ae_crud_updated={e => {
|
||||
console.log(`ae_crud_updated:`, e.detail);
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
})
|
||||
.then(function (load_results) {
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span class="font-bold">
|
||||
{@html $lq__event_presenter_obj.person_family_name ?? ae_snip.html__not_set}
|
||||
</span>
|
||||
</Element_ae_crud>
|
||||
|
||||
{#if $ae_loc.edit_mode && $ae_loc.trusted_access}
|
||||
<!-- We need a way to let them re-sync the names. The update here should flow back to the person.family_name. -->
|
||||
<Element_ae_crud
|
||||
trigger_patch={ae_triggers.update_person_family_name}
|
||||
api_cfg={$ae_api}
|
||||
object_type={'person'}
|
||||
object_id={$lq__event_presenter_obj.person_id}
|
||||
field_name={'family_name'}
|
||||
field_type={'text'}
|
||||
field_value={$lq__event_presenter_obj.family_name}
|
||||
allow_null={true}
|
||||
hide_edit_btn={true}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
class_li={''}
|
||||
on:ae_crud_updated={e => {
|
||||
console.log(`ae_crud_updated:`, e.detail);
|
||||
|
||||
events_func.load_ae_obj_id__event_presenter({
|
||||
api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0
|
||||
})
|
||||
.then(function (load_results) {
|
||||
// Maybe reload page?
|
||||
// window.location.reload();
|
||||
});
|
||||
}}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
console.log('*** Sync name button clicked ***');
|
||||
if (!confirm('Are you sure you want to sync the names?')) {return false;}
|
||||
|
||||
ae_triggers.update_person_family_name = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||
title="Use the name from this presenter record to overwrite the person record. Presenter ID: {$lq__event_presenter_obj?.event_presenter_id} to Person ID: {$lq__event_presenter_obj?.person_id}"
|
||||
>
|
||||
<span class="fas fa-sync-alt mx-1"></span>
|
||||
Sync
|
||||
</button>
|
||||
</Element_ae_crud>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
{/if} <!-- $lq__event_presenter_obj.person_given_name != $lq__event_presenter_obj.given_name || $lq__event_presenter_obj.person_family_name != $lq__event_presenter_obj.family_name -->
|
||||
|
||||
</li>
|
||||
|
||||
<li
|
||||
@@ -815,7 +881,9 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li
|
||||
class:hidden={!$ae_loc.authenticated_access && !$lq__event_presenter_obj.affiliations}
|
||||
>
|
||||
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
@@ -929,7 +997,9 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li
|
||||
class:hidden={!$ae_loc.authenticated_access && !$lq__event_presenter_obj.professional_title}
|
||||
>
|
||||
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
@@ -1044,7 +1114,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
</li>
|
||||
|
||||
<li
|
||||
class:hidden={!$ae_loc.trusted_access}
|
||||
class:hidden={!$ae_loc.trusted_access || !$ae_loc.edit_mode && !$ae_loc.manager_access}
|
||||
>
|
||||
<span class="fas fa-user-check"></span>
|
||||
Person link:
|
||||
@@ -1158,6 +1228,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
ae_tmp.show__edit_person = true;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||
title="Edit the person record linked to this presenter. Presenter ID: {$lq__event_presenter_obj.event_presenter_id}"
|
||||
>
|
||||
<span class="fas fa-edit mx-1"></span>
|
||||
Re-link
|
||||
@@ -1202,7 +1273,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
return person_update_result;
|
||||
}}
|
||||
class="btn btn-sm variant-soft-warning hover:variant-ghost-warning"
|
||||
title="Sync the person record fields to the presenter record. person_id: {$lq__event_presenter_obj.person_id}; presenter_id: {$lq__event_presenter_obj?.event_presenter_id}"
|
||||
title="Sync the person record fields to the presenter record. Person ID: {$lq__event_presenter_obj.person_id} to Presenter ID: {$lq__event_presenter_obj?.event_presenter_id}"
|
||||
>
|
||||
<span class="fas fa-sync-alt mx-1"></span>
|
||||
Sync Person
|
||||
@@ -1251,6 +1322,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
}}
|
||||
class:hidden={!$ae_loc.edit_mode}
|
||||
class="btn btn-sm variant-soft-warning hover:variant-filled-warning"
|
||||
title="Add a new person based on this presenter. Presenter ID: {$lq__event_presenter_obj?.event_presenter_id}"
|
||||
>
|
||||
<span class="fas fa-plus mx-1"></span>
|
||||
Add Person
|
||||
@@ -1352,7 +1424,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
|
||||
<!-- The presenters biography. There should be a character counter. -->
|
||||
<li
|
||||
class:hidden={$events_loc.pres_mgmt?.hide__presenter_biography}
|
||||
class:hidden={$events_loc.pres_mgmt?.hide__presenter_biography || (!$ae_loc.authenticated_access && !$lq__event_presenter_obj.biography)}
|
||||
>
|
||||
<div class="label event_presenter__biography required space-y-4">
|
||||
<button
|
||||
@@ -1381,16 +1453,20 @@ $: if ($lq__event_presenter_obj) {
|
||||
class="textarea ae_value event_presenter__biography font-mono"
|
||||
class:variant-glass-error={(ae_tmp.biography && ae_tmp.biography.length >600 ? true : false)}
|
||||
required
|
||||
rows="8" cols="70"
|
||||
rows={(!ae_tmp.biography ? 1 : 8)}
|
||||
cols="70"
|
||||
bind:value={ae_tmp.biography}
|
||||
placeholder="Enter brief biography here"></textarea>
|
||||
|
||||
</div>
|
||||
<p>Biography length: {(ae_tmp.biography ? ae_util.number_w_commas(ae_tmp.biography.length) : 0)} characters; {(ae_tmp.biography ? ae_util.number_w_commas(ae_util.count_words(ae_tmp.biography)) : 0)} estimated words</p>
|
||||
<!-- <p>Biography length: </p> -->
|
||||
<p>The biography should be plain text only and be at most 100 words.</p>
|
||||
<!-- <p>1,250 characters is roughly 250 words</p> -->
|
||||
<!-- <p>1,375 characters is roughly 250 to 300 words</p> -->
|
||||
|
||||
{#if ae_tmp.biography}
|
||||
<p>Biography length: {(ae_tmp.biography ? ae_util.number_w_commas(ae_tmp.biography.length) : 0)} characters; {(ae_tmp.biography ? ae_util.number_w_commas(ae_util.count_words(ae_tmp.biography)) : 0)} estimated words</p>
|
||||
<!-- <p>Biography length: </p> -->
|
||||
<p>The biography should be plain text only and be at most 100 words.</p>
|
||||
<!-- <p>1,250 characters is roughly 250 words</p> -->
|
||||
<!-- <p>1,375 characters is roughly 250 to 300 words</p> -->
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-wrap gap-2 p-1 items-center">
|
||||
<button
|
||||
@@ -1420,6 +1496,7 @@ $: if ($lq__event_presenter_obj) {
|
||||
});
|
||||
|
||||
}}
|
||||
class:hidden={!ae_tmp.biography || ae_tmp.biography?.length < 20}
|
||||
>
|
||||
{#await ae_promises.update__event_presenter_obj}
|
||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||
|
||||
@@ -167,7 +167,44 @@ onMount(() => {
|
||||
|
||||
{:else if $lq__event_session_obj?.enable || $ae_loc.trusted_access}
|
||||
|
||||
<h2 class="h2 text-center rounded-md p-2 bg-gray-300">
|
||||
<h2 class="h2 text-center rounded-md p-1 px-2 bg-gray-300 flex flex-row gap-0.25 items-center justify-between">
|
||||
<span
|
||||
class="flex flex-row gap-1 items-center"
|
||||
>
|
||||
<!-- <span class="fas fa-calendar-day m-1"></span> -->
|
||||
<span class="fas fa-chalkboard-teacher m-1"></span>
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
if ($events_loc.pres_mgmt.show_content__session_view == 'manage_files') {
|
||||
$events_loc.pres_mgmt.show_content__session_view = null;
|
||||
} else {
|
||||
$events_loc.pres_mgmt.show_content__session_view = 'manage_files';
|
||||
}
|
||||
}}
|
||||
class="btn btn-md hover:variant-filled-primary"
|
||||
class:variant-ghost-tertiary={$events_loc.pres_mgmt.show_content__session_view == 'manage_files'}
|
||||
class:variant-filled-tertiary={$events_loc.pres_mgmt.show_content__session_view != 'manage_files'}
|
||||
class:hidden={!$ae_loc.public_access}
|
||||
title="Manage files for the session"
|
||||
>
|
||||
{#if $events_loc.pres_mgmt.show_content__session_view == 'manage_files'}
|
||||
<span class="fas fa-users m-1"></span>
|
||||
<!-- View Details -->
|
||||
Session Presenters?
|
||||
{:else}
|
||||
<span class="fas fa-file-archive m-1"></span>
|
||||
Session Files?
|
||||
<span
|
||||
class="badge badge-icon variant-glass-success absolute -top-1.5 -right-1.5 z-10"
|
||||
class:hidden={!$lq__event_session_obj?.file_count}
|
||||
>
|
||||
{$lq__event_session_obj?.file_count}×
|
||||
</span>
|
||||
{/if}
|
||||
</button>
|
||||
</span>
|
||||
|
||||
{@html $lq__event_session_obj?.name ?? ae_snip.html__not_set}
|
||||
</h2>
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ let ae_triggers: key_val = {};
|
||||
class="{ae_snip.classes__events_pres_mgmt_menu__button_special}"
|
||||
class:variant-filled-primary={$events_loc.pres_mgmt.show_content__session_view == 'manage_files'}
|
||||
class:variant-glass-primary={$events_loc.pres_mgmt.show_content__session_view != 'manage_files'}
|
||||
class:hidden={!$ae_loc.public_access}
|
||||
class:hidden={!$ae_loc.public_access || 1==1}
|
||||
title="Manage files for the session"
|
||||
>
|
||||
{#if $events_loc.pres_mgmt.show_content__session_view == 'manage_files'}
|
||||
|
||||
Reference in New Issue
Block a user