refactor: standardize event file actions and apply batch formatting
- Updated 'create_event_file_obj_from_hosted_file_async' to use the modern V3 action endpoint. - Standardized 'prevent_default' helper names in root Event and Archive components. - Applied batch formatting (printWidth: 80) across the settings and events modules.
This commit is contained in:
@@ -66,7 +66,8 @@
|
||||
>
|
||||
<div class="float-right flex flex-row items-center">
|
||||
{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
console.log('Add Presentation');
|
||||
if (
|
||||
@@ -108,7 +109,8 @@
|
||||
{#if $lq__event_presentation_obj_li?.length}
|
||||
<span
|
||||
class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg"
|
||||
title="Count {$lq__event_presentation_obj_li.length ?? 'None'}"
|
||||
title="Count {$lq__event_presentation_obj_li.length ??
|
||||
'None'}"
|
||||
>
|
||||
<span class="fas fa-list-ol mx-4"></span>
|
||||
{$lq__event_presentation_obj_li.length ?? 'None'}×
|
||||
@@ -131,7 +133,8 @@
|
||||
<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 && $ae_loc.edit_mode}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
console.log('Add Presenter');
|
||||
if (
|
||||
@@ -155,7 +158,8 @@
|
||||
events_func.create_ae_obj__event_presenter({
|
||||
api_cfg: $ae_api,
|
||||
event_id: $events_slct.event_id,
|
||||
event_session_id: $events_slct.event_session_id,
|
||||
event_session_id:
|
||||
$events_slct.event_session_id,
|
||||
event_presentation_id:
|
||||
event_presentation_obj.event_presentation_id,
|
||||
data_kv: presenter_data,
|
||||
@@ -173,7 +177,8 @@
|
||||
<h4 class="h5 rounded-md p-2 preset-filled-surface-300-700">
|
||||
<span
|
||||
class:hidden={!event_presentation_obj.start_datetime ||
|
||||
$events_loc.pres_mgmt.hide__presentation_datetime}
|
||||
$events_loc.pres_mgmt
|
||||
.hide__presentation_datetime}
|
||||
class="text-base border-r-2 border-gray-800/50 px-1"
|
||||
>
|
||||
{ae_util.iso_datetime_formatter(
|
||||
@@ -197,7 +202,8 @@
|
||||
field_type={'text'}
|
||||
field_value={event_presentation_obj?.name}
|
||||
allow_null={false}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
hide_edit_btn={!$ae_loc.trusted_access ||
|
||||
!$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -235,7 +241,8 @@
|
||||
field_type={'text'}
|
||||
field_value={event_presentation_obj?.code}
|
||||
allow_null={false}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
hide_edit_btn={!$ae_loc.trusted_access ||
|
||||
!$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -265,13 +272,19 @@
|
||||
>
|
||||
<span class="fas fa-barcode"></span>
|
||||
{event_presentation_obj?.code ?? ''}
|
||||
{event_presentation_obj?.abstract_code ?? ''}
|
||||
{event_presentation_obj?.abstract_code ??
|
||||
''}
|
||||
</span>
|
||||
{:else if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||
<span class="text-sm text-semibold text-success-800-400">
|
||||
<span
|
||||
class="text-sm text-semibold text-success-800-400"
|
||||
>
|
||||
<span class="fas fa-barcode"></span>
|
||||
Code:
|
||||
<span class="" title="No code provided for this presentation">
|
||||
<span
|
||||
class=""
|
||||
title="No code provided for this presentation"
|
||||
>
|
||||
{@html event_presentation_obj?.code ??
|
||||
ae_snip.html__not_set}
|
||||
</span>
|
||||
@@ -281,19 +294,32 @@
|
||||
<!-- Can not edit the abstract code here at this time. -->
|
||||
</h4>
|
||||
|
||||
<div class:hidden={!($ae_loc.trusted_access && $ae_loc.edit_mode)}>
|
||||
<span class="text-sm text-semibold text-success-800-400">
|
||||
<div
|
||||
class:hidden={!(
|
||||
$ae_loc.trusted_access && $ae_loc.edit_mode
|
||||
)}
|
||||
>
|
||||
<span
|
||||
class="text-sm text-semibold text-success-800-400"
|
||||
>
|
||||
Date &
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
if ($events_loc.pres_mgmt.time_hours == 12) {
|
||||
if (
|
||||
$events_loc.pres_mgmt.time_hours == 12
|
||||
) {
|
||||
$events_loc.pres_mgmt.time_hours = 24;
|
||||
$events_loc.pres_mgmt.datetime_format = 'datetime_long';
|
||||
$events_loc.pres_mgmt.time_format = 'time_short';
|
||||
$events_loc.pres_mgmt.datetime_format =
|
||||
'datetime_long';
|
||||
$events_loc.pres_mgmt.time_format =
|
||||
'time_short';
|
||||
} else {
|
||||
$events_loc.pres_mgmt.time_hours = 12;
|
||||
$events_loc.pres_mgmt.datetime_format = 'datetime_12_long';
|
||||
$events_loc.pres_mgmt.time_format = 'time_12_short';
|
||||
$events_loc.pres_mgmt.datetime_format =
|
||||
'datetime_12_long';
|
||||
$events_loc.pres_mgmt.time_format =
|
||||
'time_12_short';
|
||||
}
|
||||
}}
|
||||
>
|
||||
@@ -301,7 +327,8 @@
|
||||
</button>
|
||||
:</span
|
||||
>
|
||||
<span class="fas fa-calendar-alt text-success-800-400"></span>
|
||||
<span class="fas fa-calendar-alt text-success-800-400"
|
||||
></span>
|
||||
<Element_ae_crud
|
||||
api_cfg={$ae_api}
|
||||
object_type={'event_presentation'}
|
||||
@@ -310,7 +337,8 @@
|
||||
field_type={'datetime'}
|
||||
field_value={event_presentation_obj.start_datetime}
|
||||
allow_null={false}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
hide_edit_btn={!$ae_loc.trusted_access ||
|
||||
!$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -347,7 +375,8 @@
|
||||
field_type={'datetime'}
|
||||
field_value={event_presentation_obj.end_datetime}
|
||||
allow_null={false}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
hide_edit_btn={!$ae_loc.trusted_access ||
|
||||
!$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -384,7 +413,8 @@
|
||||
field_type={'textarea'}
|
||||
field_value={event_presentation_obj?.description}
|
||||
allow_null={false}
|
||||
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode}
|
||||
hide_edit_btn={!$ae_loc.trusted_access ||
|
||||
!$ae_loc.edit_mode}
|
||||
outline_element={false}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -402,12 +432,15 @@
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span class="text-sm text-semibold text-success-800-400">
|
||||
<span
|
||||
class="text-sm text-semibold text-success-800-400"
|
||||
>
|
||||
Description:
|
||||
</span>
|
||||
|
||||
{#if event_presentation_obj?.description}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
console.log('Show/Hide Description');
|
||||
if (
|
||||
@@ -419,7 +452,8 @@
|
||||
null;
|
||||
|
||||
// Was testing with LiveQuery
|
||||
$events_slct.event_presentation_id = null;
|
||||
$events_slct.event_presentation_id =
|
||||
null;
|
||||
} else {
|
||||
$events_sess.pres_mgmt.show_content__presentation_description =
|
||||
event_presentation_obj.event_presentation_id;
|
||||
@@ -432,7 +466,8 @@
|
||||
class="btn btn-sm preset-tonal-surface hover:preset-filled-surface-500 text-xs"
|
||||
>
|
||||
{#if $events_sess.pres_mgmt.show_content__presentation_description == event_presentation_obj.event_presentation_id}
|
||||
<span class="fas fa-eye-slash mx-1"></span>
|
||||
<span class="fas fa-eye-slash mx-1"
|
||||
></span>
|
||||
<span>Hide Description</span>
|
||||
{:else}
|
||||
<span class="fas fa-eye mx-1"></span>
|
||||
@@ -473,8 +508,12 @@
|
||||
<Element_manage_event_file_li_wrap
|
||||
link_to_type={'event_presentation'}
|
||||
link_to_id={event_presentation_obj?.event_presentation_id}
|
||||
allow_basic={$events_loc.auth__kv.session[$events_slct.event_session_id] ||
|
||||
$events_loc.auth__kv.presenter[$events_slct.event_presenter_id]}
|
||||
allow_basic={$events_loc.auth__kv.session[
|
||||
$events_slct.event_session_id
|
||||
] ||
|
||||
$events_loc.auth__kv.presenter[
|
||||
$events_slct.event_presenter_id
|
||||
]}
|
||||
allow_moderator={$events_loc.auth__kv.session[
|
||||
$events_slct.event_session_id
|
||||
]}
|
||||
|
||||
Reference in New Issue
Block a user