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

@@ -330,7 +330,7 @@
<td class="px-4 py-2">
<span class="fas fa-user"></span>
<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"
>
{event_presenter_obj?.full_name ?? '-- not set --'}

View File

@@ -167,13 +167,13 @@
csv_row.push(
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(
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 &&
!$ae_loc.trusted_access}
onclick={() => {
// ae_promises[event_file_obj?.event_file_id_random]
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] =
api.download_hosted_file({
api_cfg: $ae_api,
hosted_file_id:
event_file_obj?.hosted_file_id_random,
event_file_obj?.hosted_file_id,
return_file: true,
filename: event_file_obj?.filename,
auto_download: true,
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"
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="">
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[
event_file_obj?.hosted_file_id_random
event_file_obj?.hosted_file_id
].percent_completed}%
{/if}
:
@@ -442,18 +442,18 @@
>
<span class="text-xs text-gray-500 w-32"> Original: </span>
<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
)}&x_no_account_id_token=direct-download"
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="hidden"> Download </span>
</a>
<!-- <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"
title="Copy the direct download file link: {ae_util.clean_filename(event_file_obj?.filename ?? 'unknown')}"
>
@@ -465,7 +465,7 @@
<MyClipboard
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_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>
<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)
.substring(0, 20)}-{ae_util.clean_filename(
event_file_obj?.event_presenter_full_name
@@ -494,7 +494,7 @@
</a>
<!-- <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"
title="Copy the renamed file link"
>
@@ -505,7 +505,7 @@
</button> -->
<MyClipboard
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_title="Copy the renamed file link"
@@ -521,7 +521,7 @@
Presentation Name:
</span>
<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)
.substring(0, 20)}-{ae_util.clean_filename(
event_file_obj?.event_presenter_full_name
@@ -534,7 +534,7 @@
</a>
<!-- <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"
title="Copy the renamed file link"
>
@@ -545,7 +545,7 @@
</button> -->
<MyClipboard
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_title="Copy the renamed file link"

View File

@@ -188,7 +188,7 @@
{#if show__session_presentations && $ae_loc.manager_access}
<Comp_event_presenter_obj_li
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'}
{log_lvl}
></Comp_event_presenter_obj_li>
@@ -197,7 +197,7 @@
{#if show__session_files && $ae_loc.manager_access}
<Element_manage_event_file_li
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[
$events_slct.event_session_id
] ||
@@ -271,7 +271,7 @@
class:hidden={hide__launcher_link_legacy &&
!($ae_loc.trusted_access && $ae_loc.edit_mode)}
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="hidden">
@@ -289,7 +289,7 @@
class:hidden={hide__launcher_link &&
!($ae_loc.trusted_access && $ae_loc.edit_mode)}
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="hidden">
@@ -305,7 +305,7 @@
class:hidden={hide__location_link &&
!($ae_loc.trusted_access && $ae_loc.edit_mode)}
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="hidden group-hover:inline">
@@ -321,18 +321,18 @@
api_cfg={$ae_api}
trigger_patch={ae_triggers.update_location}
object_type={'event_session'}
object_id={session_obj?.event_session_id_random}
object_id={session_obj?.event_session_id}
object_reload={true}
field_name={'event_location_id_random'}
field_type={'select'}
current_field_value={session_obj?.event_location_id_random}
current_field_value={session_obj?.event_location_id}
allow_null={true}
select_option_kv={$slct.event_location_obj_kv}
hide_element={!$ae_loc.edit_mode}
hide_edit_btn={true}
bind:show_edit_form={
$events_sess.pres_mgmt.show__edit_location[
session_obj?.event_session_id_random
session_obj?.event_session_id
]
}
outline_element={false}
@@ -342,7 +342,7 @@
></Element_ae_crud_v2>
{/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 -->
{:else if $ae_loc.edit_mode}
<button
@@ -356,7 +356,7 @@
.load_ae_obj_li__event_location({
api_cfg: $ae_api,
for_obj_type: 'event',
for_obj_id: session_obj?.event_id_random,
for_obj_id: session_obj?.event_id,
limit: 50,
log_lvl: log_lvl
})
@@ -376,7 +376,7 @@
(event_location_obj) => {
let option_text = `${event_location_obj.name} (${event_location_obj.code})`;
event_location_obj_kv[
event_location_obj.event_location_id_random
event_location_obj.event_location_id
] = option_text;
}
);
@@ -393,11 +393,11 @@
.finally(function () {
console.log(`Finally...`);
ae_tmp.event_location_id =
session_obj?.event_location_id_random;
session_obj?.event_location_id;
ae_tmp.show__edit_event_location = true;
$events_sess.pres_mgmt.show__edit_location[
session_obj?.event_session_id_random
session_obj?.event_session_id
] = true;
});
}}
@@ -454,18 +454,18 @@
api_cfg={$ae_api}
trigger_patch={ae_triggers.update_person_poc}
object_type={'event_session'}
object_id={session_obj?.event_session_id_random}
object_id={session_obj?.event_session_id}
object_reload={true}
field_name={'poc_person_id_random'}
field_type={'select'}
current_field_value={session_obj?.poc_person_id_random}
current_field_value={session_obj?.poc_person_id}
allow_null={true}
select_option_kv={$slct.person_obj_kv}
hide_element={!$ae_loc.edit_mode}
hide_edit_btn={true}
bind:show_edit_form={
$events_sess.pres_mgmt.show__edit_poc_person[
session_obj?.event_session_id_random
session_obj?.event_session_id
]
}
outline_element={false}
@@ -503,7 +503,7 @@
person_obj_li.forEach((person_obj) => {
let option_text = `${person_obj.full_name} (${person_obj.primary_email})`;
person_obj_kv[
person_obj.person_id_random
person_obj.person_id
] = option_text;
});
$slct.person_obj_kv = person_obj_kv;
@@ -518,11 +518,11 @@
.finally(function () {
console.log(`Finally...`);
ae_tmp.poc_person_id =
session_obj?.poc_person_id_random;
session_obj?.poc_person_id;
ae_tmp.show__edit_event_poc_person = true;
$events_sess.pres_mgmt.show__edit_poc_person[
session_obj?.event_session_id_random
session_obj?.event_session_id
] = true;
});
}}
@@ -554,7 +554,7 @@
trigger_patch={ae_triggers.update_session_hide}
object_type={'event_session'}
object_id={session_obj?.event_session_id_random}
object_id={session_obj?.event_session_id}
object_reload={true}
field_name={'hide'}
@@ -598,7 +598,7 @@
.update_ae_obj_id_crud_v2({
api_cfg: $ae_api,
object_type: 'event_session',
object_id: session_obj?.event_session_id_random,
object_id: session_obj?.event_session_id,
object_reload: true,
field_name: 'hide',
new_field_value: new_hide_value,
@@ -647,7 +647,7 @@
.update_ae_obj_id_crud_v2({
api_cfg: $ae_api,
object_type: 'event_session',
object_id: session_obj?.event_session_id_random,
object_id: session_obj?.event_session_id,
object_reload: true,
field_name: 'hide_event_launcher',
new_field_value: new_hide_event_launcher_value,
@@ -691,7 +691,7 @@
.update_ae_obj_id_crud_v2({
api_cfg: $ae_api,
object_type: 'event_session',
object_id: session_obj?.event_session_id_random,
object_id: session_obj?.event_session_id,
object_reload: true,
field_name: 'alert',
new_field_value: new_alert_value,