Working on ability to change the presentation name and session name... Making progress. Need to figure out why the file list does not reload correctly right after saving.

This commit is contained in:
Scott Idem
2024-06-20 17:45:00 -04:00
parent d49f73583c
commit 991cb1e9da
5 changed files with 247 additions and 80 deletions

View File

@@ -196,6 +196,7 @@ async function handle_load_ae_obj_li__event_file(
handle_db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: event_file_obj_li_get_result});
return event_file_obj_li_get_result;
} else {
console.log('No results returned.');
return [];
}
})
@@ -269,7 +270,7 @@ async function handle_load_ae_obj_id__event_session(
use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config.
use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config.
params: params,
log_lvl: 0
log_lvl: log_lvl
})
.then(function (event_session_obj_get_result) {
if (event_session_obj_get_result) {
@@ -436,6 +437,51 @@ async function handle_search__event_session(
}
// Updated 2024-06-20
async function handle_load_ae_obj_id__event_presentation(
{
api_cfg,
event_presentation_id,
try_cache=false,
log_lvl=0
} : {
api_cfg: any,
event_presentation_id: string,
try_cache?: boolean,
log_lvl?: number
}
) {
console.log(`*** handle_load_ae_obj_id__event_presentation() *** event_presentation_id=${event_presentation_id}`);
let params = {};
ae_promises.load__event_presentation_obj = await api.get_ae_obj_id_crud({
api_cfg: api_cfg,
obj_type: 'event_presentation',
obj_id: event_presentation_id, // NOTE: This is the FQDN, not normally the ID.
use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config.
use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value
params: params,
log_lvl: log_lvl
})
.then(function (event_presentation_obj_get_result) {
if (event_presentation_obj_get_result) {
// This is expecting a list
handle_db_save_ae_obj_li__event_presentation({obj_type: 'event_presentation', obj_li: [event_presentation_obj_get_result]});
return event_presentation_obj_get_result;
} else {
console.log('No results returned.');
return null;
}
})
.catch(function (error) {
console.log('No results returned or failed.', error);
});
return ae_promises.load__event_presentation_obj;
}
// Updated 2024-06-10
async function handle_load_ae_obj_li__event_presentation(
{
@@ -1900,6 +1946,7 @@ let export_obj = {
handle_load_ae_obj_li__event_session: handle_load_ae_obj_li__event_session,
handle_search__event_session: handle_search__event_session,
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_id__event_presenter: handle_load_ae_obj_id__event_presenter,