Trying to get things ready for tomorrow. Now with saving of opt outs and other.
This commit is contained in:
@@ -461,6 +461,53 @@ async function handle_load_ae_obj_li__event_presenter(
|
||||
}
|
||||
|
||||
|
||||
// Updated 2024-06-13
|
||||
async function handle_update_ae_obj__event_presenter(
|
||||
{
|
||||
api_cfg,
|
||||
event_presenter_id,
|
||||
data,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
event_presenter_id: string,
|
||||
data: any,
|
||||
params?: key_val,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_update_ae_obj__event_presenter() *** event_presenter_id=${event_presenter_id}`);
|
||||
|
||||
ae_promises.update__event_presenter_obj = await api.update_ae_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_presenter',
|
||||
obj_id: event_presenter_id, // NOTE: This is the FQDN, not normally the ID.
|
||||
fields: data,
|
||||
key: api_cfg.api_crud_super_key,
|
||||
params: params,
|
||||
return_obj: true,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (event_presenter_obj_update_result) {
|
||||
if (event_presenter_obj_update_result) {
|
||||
handle_db_save_ae_obj_li__event_presenter({obj_type: 'event_presenter', obj_li: [event_presenter_obj_update_result]});
|
||||
return event_presenter_obj_update_result;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log('No results returned or failed.', error);
|
||||
})
|
||||
.finally(function () {
|
||||
});
|
||||
|
||||
console.log('ae_promises.update__event_presenter_obj:', ae_promises.update__event_presenter_obj);
|
||||
return ae_promises.update__event_presenter_obj;
|
||||
}
|
||||
|
||||
|
||||
async function handle_load_ae_obj_id__badge({api_cfg, badge_id, try_cache=false}) {
|
||||
console.log(`*** handle_load_ae_obj_id__badge() *** badge_id=${badge_id}`);
|
||||
|
||||
@@ -1327,6 +1374,8 @@ function handle_db_save_ae_obj_li__event_session({obj_type, obj_li}) {
|
||||
alert: obj.alert,
|
||||
alert_msg: obj.alert_msg,
|
||||
|
||||
data_json: obj.data_json,
|
||||
|
||||
enable: obj.enable,
|
||||
hide: obj.hide,
|
||||
priority: obj.priority,
|
||||
@@ -1393,6 +1442,8 @@ function handle_db_save_ae_obj_li__event_presentation({obj_type, obj_li}) {
|
||||
|
||||
hide_event_launcher: obj.hide_event_launcher,
|
||||
|
||||
// data_json: obj.data_json,
|
||||
|
||||
enable: obj.enable,
|
||||
hide: obj.hide,
|
||||
priority: obj.priority,
|
||||
@@ -1467,6 +1518,8 @@ function handle_db_save_ae_obj_li__event_presenter({obj_type, obj_li}) {
|
||||
|
||||
hide_event_launcher: obj.hide_event_launcher,
|
||||
|
||||
data_json: obj.data_json,
|
||||
|
||||
enable: obj.enable,
|
||||
hide: obj.hide,
|
||||
priority: obj.priority,
|
||||
@@ -1538,6 +1591,7 @@ let export_obj = {
|
||||
|
||||
handle_load_ae_obj_id__event_presenter: handle_load_ae_obj_id__event_presenter,
|
||||
handle_load_ae_obj_li__event_presenter: handle_load_ae_obj_li__event_presenter,
|
||||
handle_update_ae_obj__event_presenter: handle_update_ae_obj__event_presenter,
|
||||
|
||||
handle_load_ae_obj_id__badge: handle_load_ae_obj_id__badge,
|
||||
handle_load_ae_obj_li__badge: handle_load_ae_obj_li__badge,
|
||||
|
||||
@@ -137,6 +137,9 @@ let events_local_data_struct: key_val = {
|
||||
show_content__presentation_description: false,
|
||||
show_content__agree_text: false,
|
||||
show_content__presenter_start: false,
|
||||
|
||||
disable_submit__opt_out: true,
|
||||
submit_status__opt_out: null,
|
||||
},
|
||||
|
||||
// Speakers Management (Collection)
|
||||
|
||||
@@ -281,6 +281,8 @@ export interface Presenter {
|
||||
|
||||
hide_event_launcher: null|boolean;
|
||||
|
||||
data_json: null|string;
|
||||
|
||||
enable: null|boolean;
|
||||
hide: null|boolean;
|
||||
priority: null|boolean
|
||||
@@ -365,6 +367,7 @@ export class MySubClassedDexie extends Dexie {
|
||||
professional_title, full_name, affiliations, email,
|
||||
biography, agree, comments, passcode,
|
||||
hide_event_launcher,
|
||||
data_json,
|
||||
enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user