More fixes related to id_random vs id.

This commit is contained in:
Scott Idem
2025-11-20 16:56:13 -05:00
parent f164caf65f
commit a1a33f794d
5 changed files with 78 additions and 78 deletions

View File

@@ -167,37 +167,37 @@
class:dim={event_file_obj?.hide} class:dim={event_file_obj?.hide}
> >
<td class="event_file__file align-middle"> <td class="event_file__file align-middle">
{#if $events_sess.pres_mgmt?.show_field_edit__filename != event_file_obj.event_file_id_random} {#if $events_sess.pres_mgmt?.show_field_edit__filename != event_file_obj.event_file_id}
<button <button
type="button" type="button"
disabled={!allow_basic && disabled={!allow_basic &&
!allow_moderator && !allow_moderator &&
!$ae_loc.trusted_access} !$ae_loc.trusted_access}
onclick={() => { onclick={() => {
// ae_promises[event_file_obj.event_file_id_random] // ae_promises[event_file_obj.event_file_id]
ae_promises[event_file_obj.event_file_id_random] = ae_promises[event_file_obj.event_file_id] =
api.download_hosted_file({ api.download_hosted_file({
api_cfg: $ae_api, api_cfg: $ae_api,
hosted_file_id: hosted_file_id:
event_file_obj.hosted_file_id_random, event_file_obj.hosted_file_id,
return_file: true, return_file: true,
filename: event_file_obj.filename, filename: event_file_obj.filename,
auto_download: true, auto_download: true,
log_lvl: 0 log_lvl: 0
}); });
// window.postMessage({ type: 'download_event_file', event_file_id: event_file_obj.event_file_id_random, filename: event_file_obj.filename, auto_download: true }, '*'); // window.postMessage({ type: 'download_event_file', event_file_id: event_file_obj.event_file_id, filename: event_file_obj.filename, auto_download: true }, '*');
}} }}
class="btn btn-sm lg:btn-md preset-tonal-primary hover:preset-filled-primary-500 min-w-72 lg:min-w-96" class="btn btn-sm lg:btn-md preset-tonal-primary hover:preset-filled-primary-500 min-w-72 lg:min-w-96"
title={`Download this file:\n${event_file_obj.filename}\n[API] SHA256: ${event_file_obj.hash_sha256.slice(0, 10)}... Hosted ID: ${event_file_obj.hosted_file_id_random} Event File ID: ${event_file_obj.event_file_id_random}`} title={`Download this file:\n${event_file_obj.filename}\n[API] SHA256: ${event_file_obj.hash_sha256.slice(0, 10)}... Hosted ID: ${event_file_obj.hosted_file_id} Event File ID: ${event_file_obj.event_file_id}`}
> >
{#await ae_promises[event_file_obj.event_file_id_random]} {#await ae_promises[event_file_obj.event_file_id]}
<span class="fas fa-spinner fa-spin mx-1"></span> <span class="fas fa-spinner fa-spin mx-1"></span>
<span class=""> <span class="">
Downloading Downloading
{#if $ae_sess.api_download_kv[event_file_obj.hosted_file_id_random]} {#if $ae_sess.api_download_kv[event_file_obj.hosted_file_id]}
{$ae_sess.api_download_kv[ {$ae_sess.api_download_kv[
event_file_obj.hosted_file_id_random event_file_obj.hosted_file_id
].percent_completed}% ].percent_completed}%
{/if} {/if}
: :
@@ -238,11 +238,11 @@
Original: Original:
</span> </span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id_random}/download?filename={ae_util.clean_filename( href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={ae_util.clean_filename(
event_file_obj?.filename event_file_obj?.filename
)}&x_no_account_id_token=direct-download" )}&x_no_account_id_token=direct-download"
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline"
title={`Download this file:\n${ae_util.clean_filename(event_file_obj?.filename)}\n[API] SHA256: ${event_file_obj?.hash_sha256.slice(0, 10)}...\nHosted ID: ${event_file_obj?.hosted_file_id_random} Event File ID: ${event_file_obj?.event_file_id_random}`} title={`Download this file:\n${ae_util.clean_filename(event_file_obj?.filename)}\n[API] SHA256: ${event_file_obj?.hash_sha256.slice(0, 10)}...\nHosted ID: ${event_file_obj?.hosted_file_id} Event File ID: ${event_file_obj?.event_file_id}`}
> >
<span class="fas fa-download mx-1"></span> <span class="fas fa-download mx-1"></span>
<span class="hidden"> Download </span> <span class="hidden"> Download </span>
@@ -250,7 +250,7 @@
<!-- {#if clipboard_success}Copied!{:else}Copy Access Link{/if} --> <!-- {#if clipboard_success}Copied!{:else}Copy Access Link{/if} -->
<!-- <span class="fas fa-copy mx-1"></span> --> <!-- <span class="fas fa-copy mx-1"></span> -->
<!-- <Clipboard <!-- <Clipboard
value={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download`)} value={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download`)}
bind:success={clipboard_success} bind:success={clipboard_success}
class="w-24" class="w-24"
> >
@@ -258,7 +258,7 @@
</Clipboard> --> </Clipboard> -->
<MyClipboard <MyClipboard
value={encodeURI( value={encodeURI(
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download`
)} )}
btn_text="Copy Link" btn_text="Copy Link"
btn_title="Copy the direct download link to the clipboard." btn_title="Copy the direct download link to the clipboard."
@@ -271,7 +271,7 @@
Session Name: Session Name:
</span> </span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id_random}/download?filename={event_file_obj?.event_session_code}-{ae_util href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util
.clean_filename( .clean_filename(
event_file_obj?.event_presentation_name event_file_obj?.event_presentation_name
) )
@@ -285,7 +285,7 @@
<span class="hidden"> Renamed </span> <span class="hidden"> Renamed </span>
</a> </a>
<!-- <Clipboard <!-- <Clipboard
value={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)} value={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)}
bind:success={clipboard_success} bind:success={clipboard_success}
class="w-24" class="w-24"
> >
@@ -293,7 +293,7 @@
</Clipboard> --> </Clipboard> -->
<MyClipboard <MyClipboard
value={encodeURI( value={encodeURI(
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`
)} )}
btn_text="Copy Renamed" btn_text="Copy Renamed"
btn_title="Copy the renamed download link to the clipboard." btn_title="Copy the renamed download link to the clipboard."
@@ -306,7 +306,7 @@
Presentation Name: Presentation Name:
</span> </span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id_random}/download?filename={event_file_obj?.event_session_code}-{ae_util href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util
.clean_filename( .clean_filename(
event_file_obj?.event_presentation_name event_file_obj?.event_presentation_name
) )
@@ -322,7 +322,7 @@
<!-- {#if clipboard_success}Copied!{:else}Copy Access Link{/if} --> <!-- {#if clipboard_success}Copied!{:else}Copy Access Link{/if} -->
<!-- <span class="fas fa-copy mx-1"></span> --> <!-- <span class="fas fa-copy mx-1"></span> -->
<!-- <Clipboard <!-- <Clipboard
value={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)} value={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)}
bind:success={clipboard_success} bind:success={clipboard_success}
class="w-24" class="w-24"
> >
@@ -330,7 +330,7 @@
</Clipboard> --> </Clipboard> -->
<MyClipboard <MyClipboard
value={encodeURI( value={encodeURI(
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`
)} )}
btn_text="Copy Renamed" btn_text="Copy Renamed"
btn_title="Copy the renamed download link to the clipboard." btn_title="Copy the renamed download link to the clipboard."
@@ -384,7 +384,7 @@
.update_ae_obj__event_file({ .update_ae_obj__event_file({
api_cfg: $ae_api, api_cfg: $ae_api,
event_file_id: event_file_id:
event_file_obj.event_file_id_random, event_file_obj.event_file_id,
data_kv: event_file_data, data_kv: event_file_data,
log_lvl: 0 log_lvl: 0
}) })
@@ -428,7 +428,7 @@
if ( if (
$events_sess.pres_mgmt $events_sess.pres_mgmt
.show_field_edit__filename == .show_field_edit__filename ==
event_file_obj.event_file_id_random event_file_obj.event_file_id
) { ) {
$events_sess.pres_mgmt.tmp_val__filename_no_ext = $events_sess.pres_mgmt.tmp_val__filename_no_ext =
''; '';
@@ -437,17 +437,17 @@
$events_sess.pres_mgmt.tmp_val__filename_no_ext = $events_sess.pres_mgmt.tmp_val__filename_no_ext =
event_file_obj.filename_no_ext; event_file_obj.filename_no_ext;
$events_sess.pres_mgmt.show_field_edit__filename = $events_sess.pres_mgmt.show_field_edit__filename =
event_file_obj.event_file_id_random; event_file_obj.event_file_id;
} }
}} }}
class="btn btn-sm preset-tonal-tertiary hover:preset-tonal-success" class="btn btn-sm preset-tonal-tertiary hover:preset-tonal-success"
class:preset-tonal-warning={$events_sess.pres_mgmt class:preset-tonal-warning={$events_sess.pres_mgmt
.show_field_edit__filename == .show_field_edit__filename ==
event_file_obj.event_file_id_random} event_file_obj.event_file_id}
title={`Rename this file? "${event_file_obj.filename}"`} title={`Rename this file? "${event_file_obj.filename}"`}
> >
<span class="fas fa-edit mx-1"></span> <span class="fas fa-edit mx-1"></span>
{#if $events_sess.pres_mgmt?.show_field_edit__filename == event_file_obj.event_file_id_random} {#if $events_sess.pres_mgmt?.show_field_edit__filename == event_file_obj.event_file_id}
Cancel? Cancel?
{:else} {:else}
Rename Rename
@@ -466,7 +466,7 @@
.update_ae_obj__event_file({ .update_ae_obj__event_file({
api_cfg: $ae_api, api_cfg: $ae_api,
event_file_id: event_file_id:
event_file_obj.event_file_id_random, event_file_obj.event_file_id,
data_kv: event_file_data, data_kv: event_file_data,
log_lvl: 0 log_lvl: 0
}) })
@@ -522,19 +522,19 @@
onclick={async () => { onclick={async () => {
if ( if (
!confirm( !confirm(
`Are you sure you want to delete this file?\n${event_file_obj.filename} [${event_file_obj.event_file_id_random}]` `Are you sure you want to delete this file?\n${event_file_obj.filename} [${event_file_obj.event_file_id}]`
) )
) { ) {
return false; return false;
} }
// ae_promises[event_file_obj.event_file_id_random] = handle_delete__event_file({event_file_id: event_file_obj.event_file_id_random}); // ae_promises[event_file_obj.event_file_id] = handle_delete__event_file({event_file_id: event_file_obj.event_file_id});
ae_promises.delete__event_file_obj = ae_promises.delete__event_file_obj =
await events_func.delete_ae_obj_id__event_file({ await events_func.delete_ae_obj_id__event_file({
api_cfg: $ae_api, api_cfg: $ae_api,
event_file_id: event_file_id:
event_file_obj.event_file_id_random, event_file_obj.event_file_id,
log_lvl: 1 log_lvl: 1
}); });
}} }}
@@ -578,14 +578,14 @@
!$ae_loc.trusted_access} !$ae_loc.trusted_access}
value={event_file_obj.file_purpose} value={event_file_obj.file_purpose}
onchange={(e) => { onchange={(e) => {
// ae_tmp[event_file_obj.event_file_id_random].file_purpose = e.target.value; // ae_tmp[event_file_obj.event_file_id].file_purpose = e.target.value;
console.log( console.log(
`Selected file_purpose: ${e.target.value}` `Selected file_purpose: ${e.target.value}`
); );
let event_file_data = { let event_file_data = {
event_file_id_random: event_file_id:
event_file_obj.event_file_id_random, event_file_obj.event_file_id,
file_purpose: e.target.value file_purpose: e.target.value
}; };
@@ -593,7 +593,7 @@
.update_ae_obj__event_file({ .update_ae_obj__event_file({
api_cfg: $ae_api, api_cfg: $ae_api,
event_file_id: event_file_id:
event_file_obj.event_file_id_random, event_file_obj.event_file_id,
data_kv: event_file_data, data_kv: event_file_data,
log_lvl: 1 log_lvl: 1
}) })
@@ -698,7 +698,7 @@
<span class:hidden={display_mode != 'default'}> <span class:hidden={display_mode != 'default'}>
ID: ID:
</span> </span>
<strong>{event_file_obj.hosted_file_id_random}</strong> <strong>{event_file_obj.hosted_file_id}</strong>
</span> </span>
</span> </span>

View File

@@ -182,7 +182,7 @@
onclick={() => { onclick={() => {
if ( if (
!confirm( !confirm(
`Are you sure you want to delete this hosted file?\n${hosted_file_obj.filename} [${hosted_file_obj.hosted_file_id_random}]` `Are you sure you want to delete this hosted file?\n${hosted_file_obj.filename} [${hosted_file_obj.hosted_file_id}]`
) )
) { ) {
return false; return false;
@@ -191,7 +191,7 @@
ae_promises.delete__hosted_file_obj = ae_promises.delete__hosted_file_obj =
core_func.delete_ae_obj_id__hosted_file({ core_func.delete_ae_obj_id__hosted_file({
api_cfg: $ae_api, api_cfg: $ae_api,
hosted_file_id: hosted_file_obj.hosted_file_id_random, hosted_file_id: hosted_file_obj.hosted_file_id,
link_to_type: link_to_type, link_to_type: link_to_type,
link_to_id: link_to_id, link_to_id: link_to_id,
rm_orphan: true, rm_orphan: true,

View File

@@ -330,7 +330,7 @@
<td class="px-4 py-2"> <td class="px-4 py-2">
<span class="fas fa-user"></span> <span class="fas fa-user"></span>
<a <a
href="/events/{event_presenter_obj?.event_id_random}/presenter/{event_presenter_obj?.event_presenter_id_random}" href="/events/{event_presenter_obj?.event_id}/presenter/{event_presenter_obj?.event_presenter_id}"
class="text-blue-500 underline hover:text-blue-800" class="text-blue-500 underline hover:text-blue-800"
> >
{event_presenter_obj?.full_name ?? '-- not set --'} {event_presenter_obj?.full_name ?? '-- not set --'}

View File

@@ -167,13 +167,13 @@
csv_row.push( csv_row.push(
encodeURI( encodeURI(
`${$ae_api.base_url}/event/file/${ae_obj_li[i]?.event_file_id_random}/download?filename=${ae_util.clean_filename(ae_obj_li[i]?.filename)}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${ae_obj_li[i]?.event_file_id}/download?filename=${ae_util.clean_filename(ae_obj_li[i]?.filename)}&x_no_account_id_token=direct-download`
) )
); );
csv_row.push( csv_row.push(
encodeURI( encodeURI(
`${$ae_api.base_url}/event/file/${ae_obj_li[i]?.event_file_id_random}/download?filename=${ae_obj_li[i]?.event_session_code}-${ae_util.clean_filename(ae_obj_li[i]?.filename)}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${ae_obj_li[i]?.event_file_id}/download?filename=${ae_obj_li[i]?.event_session_code}-${ae_util.clean_filename(ae_obj_li[i]?.filename)}&x_no_account_id_token=direct-download`
) )
); );
@@ -376,30 +376,30 @@
!allow_moderator && !allow_moderator &&
!$ae_loc.trusted_access} !$ae_loc.trusted_access}
onclick={() => { onclick={() => {
// ae_promises[event_file_obj?.event_file_id_random] // ae_promises[event_file_obj?.event_file_id]
ae_promises[event_file_obj?.event_file_id_random] = ae_promises[event_file_obj?.event_file_id] =
api.download_hosted_file({ api.download_hosted_file({
api_cfg: $ae_api, api_cfg: $ae_api,
hosted_file_id: hosted_file_id:
event_file_obj?.hosted_file_id_random, event_file_obj?.hosted_file_id,
return_file: true, return_file: true,
filename: event_file_obj?.filename, filename: event_file_obj?.filename,
auto_download: true, auto_download: true,
log_lvl: 0 log_lvl: 0
}); });
// window.postMessage({ type: 'download_event_file', event_file_id: event_file_obj?.event_file_id_random, filename: event_file_obj?.filename, auto_download: true }, '*'); // window.postMessage({ type: 'download_event_file', event_file_id: event_file_obj?.event_file_id, filename: event_file_obj?.filename, auto_download: true }, '*');
}} }}
class="btn btn-sm preset-tonal-primary hover:preset-filled-primary-500 min-w-72" class="btn btn-sm preset-tonal-primary hover:preset-filled-primary-500 min-w-72"
title={`Download this file: ${event_file_obj?.filename} [API] -- SHA256 hash: ${event_file_obj?.hash_sha256.slice(0, 10)}...`} title={`Download this file: ${event_file_obj?.filename} [API] -- SHA256 hash: ${event_file_obj?.hash_sha256.slice(0, 10)}...`}
> >
{#await ae_promises[event_file_obj?.event_file_id_random]} {#await ae_promises[event_file_obj?.event_file_id]}
<span class="fas fa-spinner fa-spin mx-1"></span> <span class="fas fa-spinner fa-spin mx-1"></span>
<span class=""> <span class="">
Downloading Downloading
{#if $ae_sess.api_download_kv[event_file_obj?.hosted_file_id_random]} {#if $ae_sess.api_download_kv[event_file_obj?.hosted_file_id]}
{$ae_sess.api_download_kv[ {$ae_sess.api_download_kv[
event_file_obj?.hosted_file_id_random event_file_obj?.hosted_file_id
].percent_completed}% ].percent_completed}%
{/if} {/if}
: :
@@ -442,18 +442,18 @@
> >
<span class="text-xs text-gray-500 w-32"> Original: </span> <span class="text-xs text-gray-500 w-32"> Original: </span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id_random}/download?filename={ae_util.clean_filename( href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={ae_util.clean_filename(
event_file_obj?.filename event_file_obj?.filename
)}&x_no_account_id_token=direct-download" )}&x_no_account_id_token=direct-download"
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline"
title={`Download this file:\n${ae_util.clean_filename(event_file_obj?.filename)}\n[API] SHA256: ${event_file_obj?.hash_sha256.slice(0, 10)}...\nHosted ID: ${event_file_obj?.hosted_file_id_random} Event File ID: ${event_file_obj?.event_file_id_random}`} title={`Download this file:\n${ae_util.clean_filename(event_file_obj?.filename)}\n[API] SHA256: ${event_file_obj?.hash_sha256.slice(0, 10)}...\nHosted ID: ${event_file_obj?.hosted_file_id} Event File ID: ${event_file_obj?.event_file_id}`}
> >
<span class="fas fa-download mx-1"></span> <span class="fas fa-download mx-1"></span>
<span class="hidden"> Download </span> <span class="hidden"> Download </span>
</a> </a>
<!-- <button <!-- <button
type="button" type="button"
use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download`)} use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download`)}
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs"
title="Copy the direct download file link: {ae_util.clean_filename(event_file_obj?.filename ?? 'unknown')}" title="Copy the direct download file link: {ae_util.clean_filename(event_file_obj?.filename ?? 'unknown')}"
> >
@@ -465,7 +465,7 @@
<MyClipboard <MyClipboard
value={encodeURI( value={encodeURI(
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&x_no_account_id_token=direct-download`
)} )}
btn_text="Copy Link" btn_text="Copy Link"
btn_title="Copy the direct download file link: {ae_util.clean_filename( btn_title="Copy the direct download file link: {ae_util.clean_filename(
@@ -481,7 +481,7 @@
> >
<span class="text-xs text-gray-500 w-32"> Session Name: </span> <span class="text-xs text-gray-500 w-32"> Session Name: </span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id_random}/download?filename={event_file_obj?.event_session_code}-{ae_util href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util
.clean_filename(event_file_obj?.event_presentation_name) .clean_filename(event_file_obj?.event_presentation_name)
.substring(0, 20)}-{ae_util.clean_filename( .substring(0, 20)}-{ae_util.clean_filename(
event_file_obj?.event_presenter_full_name event_file_obj?.event_presenter_full_name
@@ -494,7 +494,7 @@
</a> </a>
<!-- <button <!-- <button
type="button" type="button"
use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)} use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)}
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs"
title="Copy the renamed file link" title="Copy the renamed file link"
> >
@@ -505,7 +505,7 @@
</button> --> </button> -->
<MyClipboard <MyClipboard
value={encodeURI( value={encodeURI(
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`
)} )}
btn_text="Copy Renamed" btn_text="Copy Renamed"
btn_title="Copy the renamed file link" btn_title="Copy the renamed file link"
@@ -521,7 +521,7 @@
Presentation Name: Presentation Name:
</span> </span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id_random}/download?filename={event_file_obj?.event_session_code}-{ae_util href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util
.clean_filename(event_file_obj?.event_presentation_name) .clean_filename(event_file_obj?.event_presentation_name)
.substring(0, 20)}-{ae_util.clean_filename( .substring(0, 20)}-{ae_util.clean_filename(
event_file_obj?.event_presenter_full_name event_file_obj?.event_presenter_full_name
@@ -534,7 +534,7 @@
</a> </a>
<!-- <button <!-- <button
type="button" type="button"
use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)} use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`)}
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs"
title="Copy the renamed file link" title="Copy the renamed file link"
> >
@@ -545,7 +545,7 @@
</button> --> </button> -->
<MyClipboard <MyClipboard
value={encodeURI( value={encodeURI(
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id_random}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download` `${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&x_no_account_id_token=direct-download`
)} )}
btn_text="Copy Renamed" btn_text="Copy Renamed"
btn_title="Copy the renamed file link" btn_title="Copy the renamed file link"

View File

@@ -188,7 +188,7 @@
{#if show__session_presentations && $ae_loc.manager_access} {#if show__session_presentations && $ae_loc.manager_access}
<Comp_event_presenter_obj_li <Comp_event_presenter_obj_li
link_to_type={'event_session'} link_to_type={'event_session'}
link_to_id={session_obj?.event_session_id_random} link_to_id={session_obj?.event_session_id}
display_mode={'minimal'} display_mode={'minimal'}
{log_lvl} {log_lvl}
></Comp_event_presenter_obj_li> ></Comp_event_presenter_obj_li>
@@ -197,7 +197,7 @@
{#if show__session_files && $ae_loc.manager_access} {#if show__session_files && $ae_loc.manager_access}
<Element_manage_event_file_li <Element_manage_event_file_li
link_to_type={'event_session'} link_to_type={'event_session'}
link_to_id={session_obj?.event_session_id_random} link_to_id={session_obj?.event_session_id}
allow_basic={$events_loc.auth__kv.session[ allow_basic={$events_loc.auth__kv.session[
$events_slct.event_session_id $events_slct.event_session_id
] || ] ||
@@ -271,7 +271,7 @@
class:hidden={hide__launcher_link_legacy && class:hidden={hide__launcher_link_legacy &&
!($ae_loc.trusted_access && $ae_loc.edit_mode)} !($ae_loc.trusted_access && $ae_loc.edit_mode)}
class="btn btn-sm preset-tonal-secondary hover:preset-filled-secondary-500 transition-all group" class="btn btn-sm preset-tonal-secondary hover:preset-filled-secondary-500 transition-all group"
title={`Legacy Launcher (Flask): ${session_obj?.event_location_name}\n${session_obj?.event_location_id_random}`} title={`Legacy Launcher (Flask): ${session_obj?.event_location_name}\n${session_obj?.event_location_id}`}
> >
<span class="fas fa-paper-plane m-1"></span> <span class="fas fa-paper-plane m-1"></span>
<span class="hidden"> <span class="hidden">
@@ -289,7 +289,7 @@
class:hidden={hide__launcher_link && class:hidden={hide__launcher_link &&
!($ae_loc.trusted_access && $ae_loc.edit_mode)} !($ae_loc.trusted_access && $ae_loc.edit_mode)}
class="btn btn-sm preset-tonal-tertiary hover:preset-filled-secondary-500 group transition-all" class="btn btn-sm preset-tonal-tertiary hover:preset-filled-secondary-500 group transition-all"
title={`Launcher (Svelte): ${session_obj?.event_location_name}\n${session_obj?.event_location_id_random}`} title={`Launcher (Svelte): ${session_obj?.event_location_name}\n${session_obj?.event_location_id}`}
> >
<span class="fas fa-plane"></span> <span class="fas fa-plane"></span>
<span class="hidden"> <span class="hidden">
@@ -305,7 +305,7 @@
class:hidden={hide__location_link && class:hidden={hide__location_link &&
!($ae_loc.trusted_access && $ae_loc.edit_mode)} !($ae_loc.trusted_access && $ae_loc.edit_mode)}
class="btn btn-sm preset-tonal-surface hover:preset-filled-tertiary-500 group transition-all" class="btn btn-sm preset-tonal-surface hover:preset-filled-tertiary-500 group transition-all"
title={`Location Details: ${session_obj?.event_location_name}\n${session_obj?.event_location_id_random}`} title={`Location Details: ${session_obj?.event_location_name}\n${session_obj?.event_location_id}`}
> >
<span class="fas fa-map-marker-alt m-1"></span> <span class="fas fa-map-marker-alt m-1"></span>
<span class="hidden group-hover:inline"> <span class="hidden group-hover:inline">
@@ -321,18 +321,18 @@
api_cfg={$ae_api} api_cfg={$ae_api}
trigger_patch={ae_triggers.update_location} trigger_patch={ae_triggers.update_location}
object_type={'event_session'} object_type={'event_session'}
object_id={session_obj?.event_session_id_random} object_id={session_obj?.event_session_id}
object_reload={true} object_reload={true}
field_name={'event_location_id_random'} field_name={'event_location_id_random'}
field_type={'select'} field_type={'select'}
current_field_value={session_obj?.event_location_id_random} current_field_value={session_obj?.event_location_id}
allow_null={true} allow_null={true}
select_option_kv={$slct.event_location_obj_kv} select_option_kv={$slct.event_location_obj_kv}
hide_element={!$ae_loc.edit_mode} hide_element={!$ae_loc.edit_mode}
hide_edit_btn={true} hide_edit_btn={true}
bind:show_edit_form={ bind:show_edit_form={
$events_sess.pres_mgmt.show__edit_location[ $events_sess.pres_mgmt.show__edit_location[
session_obj?.event_session_id_random session_obj?.event_session_id
] ]
} }
outline_element={false} outline_element={false}
@@ -342,7 +342,7 @@
></Element_ae_crud_v2> ></Element_ae_crud_v2>
{/if} {/if}
{#if $events_sess.pres_mgmt.show__edit_location[session_obj?.event_session_id_random]} {#if $events_sess.pres_mgmt.show__edit_location[session_obj?.event_session_id]}
<!-- Nothing here --> <!-- Nothing here -->
{:else if $ae_loc.edit_mode} {:else if $ae_loc.edit_mode}
<button <button
@@ -356,7 +356,7 @@
.load_ae_obj_li__event_location({ .load_ae_obj_li__event_location({
api_cfg: $ae_api, api_cfg: $ae_api,
for_obj_type: 'event', for_obj_type: 'event',
for_obj_id: session_obj?.event_id_random, for_obj_id: session_obj?.event_id,
limit: 50, limit: 50,
log_lvl: log_lvl log_lvl: log_lvl
}) })
@@ -376,7 +376,7 @@
(event_location_obj) => { (event_location_obj) => {
let option_text = `${event_location_obj.name} (${event_location_obj.code})`; let option_text = `${event_location_obj.name} (${event_location_obj.code})`;
event_location_obj_kv[ event_location_obj_kv[
event_location_obj.event_location_id_random event_location_obj.event_location_id
] = option_text; ] = option_text;
} }
); );
@@ -393,11 +393,11 @@
.finally(function () { .finally(function () {
console.log(`Finally...`); console.log(`Finally...`);
ae_tmp.event_location_id = ae_tmp.event_location_id =
session_obj?.event_location_id_random; session_obj?.event_location_id;
ae_tmp.show__edit_event_location = true; ae_tmp.show__edit_event_location = true;
$events_sess.pres_mgmt.show__edit_location[ $events_sess.pres_mgmt.show__edit_location[
session_obj?.event_session_id_random session_obj?.event_session_id
] = true; ] = true;
}); });
}} }}
@@ -454,18 +454,18 @@
api_cfg={$ae_api} api_cfg={$ae_api}
trigger_patch={ae_triggers.update_person_poc} trigger_patch={ae_triggers.update_person_poc}
object_type={'event_session'} object_type={'event_session'}
object_id={session_obj?.event_session_id_random} object_id={session_obj?.event_session_id}
object_reload={true} object_reload={true}
field_name={'poc_person_id_random'} field_name={'poc_person_id_random'}
field_type={'select'} field_type={'select'}
current_field_value={session_obj?.poc_person_id_random} current_field_value={session_obj?.poc_person_id}
allow_null={true} allow_null={true}
select_option_kv={$slct.person_obj_kv} select_option_kv={$slct.person_obj_kv}
hide_element={!$ae_loc.edit_mode} hide_element={!$ae_loc.edit_mode}
hide_edit_btn={true} hide_edit_btn={true}
bind:show_edit_form={ bind:show_edit_form={
$events_sess.pres_mgmt.show__edit_poc_person[ $events_sess.pres_mgmt.show__edit_poc_person[
session_obj?.event_session_id_random session_obj?.event_session_id
] ]
} }
outline_element={false} outline_element={false}
@@ -503,7 +503,7 @@
person_obj_li.forEach((person_obj) => { person_obj_li.forEach((person_obj) => {
let option_text = `${person_obj.full_name} (${person_obj.primary_email})`; let option_text = `${person_obj.full_name} (${person_obj.primary_email})`;
person_obj_kv[ person_obj_kv[
person_obj.person_id_random person_obj.person_id
] = option_text; ] = option_text;
}); });
$slct.person_obj_kv = person_obj_kv; $slct.person_obj_kv = person_obj_kv;
@@ -518,11 +518,11 @@
.finally(function () { .finally(function () {
console.log(`Finally...`); console.log(`Finally...`);
ae_tmp.poc_person_id = ae_tmp.poc_person_id =
session_obj?.poc_person_id_random; session_obj?.poc_person_id;
ae_tmp.show__edit_event_poc_person = true; ae_tmp.show__edit_event_poc_person = true;
$events_sess.pres_mgmt.show__edit_poc_person[ $events_sess.pres_mgmt.show__edit_poc_person[
session_obj?.event_session_id_random session_obj?.event_session_id
] = true; ] = true;
}); });
}} }}
@@ -554,7 +554,7 @@
trigger_patch={ae_triggers.update_session_hide} trigger_patch={ae_triggers.update_session_hide}
object_type={'event_session'} object_type={'event_session'}
object_id={session_obj?.event_session_id_random} object_id={session_obj?.event_session_id}
object_reload={true} object_reload={true}
field_name={'hide'} field_name={'hide'}
@@ -598,7 +598,7 @@
.update_ae_obj_id_crud_v2({ .update_ae_obj_id_crud_v2({
api_cfg: $ae_api, api_cfg: $ae_api,
object_type: 'event_session', object_type: 'event_session',
object_id: session_obj?.event_session_id_random, object_id: session_obj?.event_session_id,
object_reload: true, object_reload: true,
field_name: 'hide', field_name: 'hide',
new_field_value: new_hide_value, new_field_value: new_hide_value,
@@ -647,7 +647,7 @@
.update_ae_obj_id_crud_v2({ .update_ae_obj_id_crud_v2({
api_cfg: $ae_api, api_cfg: $ae_api,
object_type: 'event_session', object_type: 'event_session',
object_id: session_obj?.event_session_id_random, object_id: session_obj?.event_session_id,
object_reload: true, object_reload: true,
field_name: 'hide_event_launcher', field_name: 'hide_event_launcher',
new_field_value: new_hide_event_launcher_value, new_field_value: new_hide_event_launcher_value,
@@ -691,7 +691,7 @@
.update_ae_obj_id_crud_v2({ .update_ae_obj_id_crud_v2({
api_cfg: $ae_api, api_cfg: $ae_api,
object_type: 'event_session', object_type: 'event_session',
object_id: session_obj?.event_session_id_random, object_id: session_obj?.event_session_id,
object_reload: true, object_reload: true,
field_name: 'alert', field_name: 'alert',
new_field_value: new_alert_value, new_field_value: new_alert_value,