Split up the giant events functions file!
This commit is contained in:
588
src/lib/ae_events__exhibit.ts
Normal file
588
src/lib/ae_events__exhibit.ts
Normal file
@@ -0,0 +1,588 @@
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
import { api } from '$lib/api';
|
||||
|
||||
import { db_events } from "$lib/db_events";
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
|
||||
|
||||
// Updated 2024-03
|
||||
export async function handle_load_ae_obj_id__exhibit(
|
||||
{
|
||||
api_cfg,
|
||||
exhibit_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
exhibit_id: string,
|
||||
try_cache?: boolean,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_load_ae_obj_id__exhibit() *** exhibit_id=${exhibit_id}`);
|
||||
|
||||
let params = {};
|
||||
|
||||
// $events_sess.exhibits.status_load__exhibit_obj = 'loading';
|
||||
ae_promises.load__exhibit_obj = await api.get_ae_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_exhibit',
|
||||
obj_id: exhibit_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 in the API config.
|
||||
params: params,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (exhibit_obj_get_result) {
|
||||
if (exhibit_obj_get_result) {
|
||||
// This is expecting a list
|
||||
handle_db_save_ae_obj_li__exhibitor({obj_type: 'event_exhibit', obj_li: [exhibit_obj_get_result]});
|
||||
return exhibit_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__exhibit_obj;
|
||||
}
|
||||
|
||||
|
||||
// Updated 2024-03-06
|
||||
export async function handle_load_ae_obj_li__exhibit(
|
||||
{
|
||||
api_cfg,
|
||||
event_id,
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
event_id: any,
|
||||
params: any,
|
||||
try_cache?: boolean
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_load_ae_obj_li__exhibit() *** event_id=${event_id}`);
|
||||
|
||||
let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled
|
||||
let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden
|
||||
let limit: number = (params.qry__limit ?? 99); // 99
|
||||
let offset: number = (params.qry__offset ?? 0); // 0
|
||||
|
||||
// if ($ae_loc.administrator_access) {
|
||||
// enabled = 'all';
|
||||
// hidden = 'all';
|
||||
// limit = 500;
|
||||
// } else if ($ae_loc.trusted_access) {
|
||||
// // enabled = 'all';
|
||||
// hidden = 'all';
|
||||
// limit = 50;
|
||||
// }
|
||||
|
||||
// let params = {};
|
||||
|
||||
let params_json: key_val = {};
|
||||
// params_json['and_qry'] = {};
|
||||
// params_json['and_qry']['license_max'] = 10;
|
||||
|
||||
params_json['and_in_li'] = {
|
||||
license_max : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
};
|
||||
|
||||
// if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) {
|
||||
// params_json['ft_qry'] = {
|
||||
// 'default_qry_str': fulltext_search_qry_str,
|
||||
// // 'location_address_json_ext': fulltext_search_qry_str, // JSON extracted text DB field
|
||||
// // 'contact_li_json_ext': fulltext_search_qry_str, // JSON extracted text DB field
|
||||
// };
|
||||
// }
|
||||
|
||||
// console.log('params_json:', params_json);
|
||||
// console.log(params_json);
|
||||
|
||||
// $events_sess.exhibits.status_qry__search = 'loading';
|
||||
ae_promises.load__event_exhibit_obj_li = await api.get_ae_obj_li_for_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_exhibit',
|
||||
for_obj_type: 'event',
|
||||
for_obj_id: event_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 in the API config.
|
||||
enabled: enabled,
|
||||
hidden: hidden,
|
||||
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||
// order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'created_on': 'DESC', 'updated_on': 'DESC'},
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
params_json: params_json,
|
||||
params: params,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
|
||||
.then(function (exhibit_obj_li_get_result) {
|
||||
// console.log('Badge list:', exhibit_obj_li_get_result);
|
||||
if (exhibit_obj_li_get_result) {
|
||||
// $slct.exhibit_obj_li = exhibit_obj_li_get_result;
|
||||
handle_db_save_ae_obj_li__exhibitor({obj_type: 'event_exhibit', obj_li: exhibit_obj_li_get_result});
|
||||
return exhibit_obj_li_get_result;
|
||||
} else {
|
||||
// $slct.exhibit_obj_li = [];
|
||||
return [];
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log('No results returned or failed.', error);
|
||||
})
|
||||
.finally(function () {
|
||||
// $events_sess.exhibits.status_qry__search = 'done';
|
||||
|
||||
// console.log('Badge list:', exhibit_obj_li_get_result);
|
||||
// return exhibit_obj_li_get_result;
|
||||
});
|
||||
|
||||
console.log('ae_promises.load__event_exhibit_obj_li:', ae_promises.load__event_exhibit_obj_li);
|
||||
return ae_promises.load__event_exhibit_obj_li;
|
||||
}
|
||||
|
||||
|
||||
// // This function will loop through the badge_obj_li and save each one to the DB.
|
||||
// function handle_db_save_ae_obj_li({obj_type, obj_li}) {
|
||||
// console.log(`*** handle_db_save_ae_obj_li() ***`);
|
||||
|
||||
// if (obj_li && obj_li.length) {
|
||||
// obj_li.forEach(async function (obj) {
|
||||
// // console.log(`ae_obj ${obj_type}:`, obj);
|
||||
|
||||
// try {
|
||||
// const id_random = await db_events.badges.put({
|
||||
// id_random: obj.event_badge_id_random,
|
||||
// full_name: obj.full_name,
|
||||
// full_name_override: obj.full_name_override,
|
||||
// email: obj.email,
|
||||
// email_override: obj.email_override,
|
||||
// affiliations: obj.affiliations,
|
||||
// affiliations_override: obj.affiliations_override,
|
||||
// badge_type: obj.badge_type,
|
||||
// badge_type_override: obj.badge_type_override,
|
||||
// badge_type_code: obj.badge_type_code,
|
||||
// badge_type_code_override: obj.badge_type_code_override,
|
||||
// external_event_id: obj.external_event_id,
|
||||
// external_id: obj.external_id,
|
||||
// external_person_id: obj.external_person_id,
|
||||
// created_on: obj.created_on,
|
||||
// updated_on: obj.updated_on,
|
||||
// });
|
||||
// console.log(`Put obj with ID: ${obj.event_badge_id_random} or ${id_random}`);
|
||||
// } catch (error) {
|
||||
// let status = `Failed to put ${obj.event_badge_id_random}: ${error}`;
|
||||
// console.log(status);
|
||||
// }
|
||||
|
||||
// // const id_random = await db_events.badges.put(obj);
|
||||
// // console.log(`Put obj with ID: ${obj.event_badge_id_random}`);
|
||||
// });
|
||||
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
export async function handle_load_ae_obj_id__exhibit_tracking(
|
||||
{
|
||||
api_cfg,
|
||||
exhibit_tracking_id,
|
||||
try_cache=false,
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
exhibit_tracking_id: string,
|
||||
try_cache?: boolean,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_load_ae_obj_id__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}`);
|
||||
|
||||
let params = {};
|
||||
|
||||
// $events_sess.exhibits.status_load__exhibit_tracking_obj = 'loading';
|
||||
ae_promises.load__event_exhibit_tracking_obj = await api.get_ae_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_exhibit_tracking',
|
||||
obj_id: exhibit_tracking_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 in the API config.
|
||||
params: params,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (exhibit_tracking_obj_get_result) {
|
||||
if (exhibit_tracking_obj_get_result) {
|
||||
// This is expecting a list
|
||||
handle_db_save_ae_obj_li__exhibitor_tracking({obj_type: 'event_exhibit_tracking', obj_li: [exhibit_tracking_obj_get_result]});
|
||||
return exhibit_tracking_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_exhibit_tracking_obj;
|
||||
}
|
||||
|
||||
|
||||
// Updated 2024-03-19
|
||||
export async function handle_load_ae_obj_li__exhibit_tracking(
|
||||
{
|
||||
api_cfg,
|
||||
exhibit_id,
|
||||
params={},
|
||||
try_cache=true,
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
exhibit_id: any,
|
||||
params: any,
|
||||
try_cache?: boolean,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_load_ae_obj_li__exhibit_tracking() *** exhibit_id=${exhibit_id}`);
|
||||
|
||||
let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled
|
||||
let hidden: string = (params.qry__hidden ?? 'all'); // all, hidden, not_hidden
|
||||
let limit: number = (params.qry__limit ?? 99); // 99
|
||||
let offset: number = (params.qry__offset ?? 0); // 0
|
||||
|
||||
let params_json: key_val = {};
|
||||
|
||||
ae_promises.load__event_exhibit_tracking_obj_li = await api.get_ae_obj_li_for_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_exhibit_tracking',
|
||||
for_obj_type: 'event_exhibit',
|
||||
for_obj_id: exhibit_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 in the API config.
|
||||
enabled: enabled,
|
||||
hidden: hidden,
|
||||
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
params_json: params_json,
|
||||
params: params,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
|
||||
.then(function (exhibit_tracking_obj_li_get_result) {
|
||||
// console.log('Exhibit tracking list:', exhibit_tracking_obj_li_get_result);
|
||||
if (exhibit_tracking_obj_li_get_result) {
|
||||
// $slct.exhibit_tracking_obj_li = exhibit_tracking_obj_li_get_result;
|
||||
handle_db_save_ae_obj_li__exhibitor_tracking({obj_type: 'event_exhibit_tracking', obj_li: exhibit_tracking_obj_li_get_result});
|
||||
return exhibit_tracking_obj_li_get_result;
|
||||
} else {
|
||||
// $slct.exhibit_tracking_obj_li = [];
|
||||
return [];
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log('No results returned or failed.', error);
|
||||
})
|
||||
.finally(function () {
|
||||
// console.log('Exhibit tracking list:', exhibit_tracking_obj_li_get_result);
|
||||
// return exhibit_tracking_obj_li_get_result;
|
||||
});
|
||||
|
||||
console.log('ae_promises.load__event_exhibit_tracking_obj_li:', ae_promises.load__event_exhibit_tracking_obj_li);
|
||||
return ae_promises.load__event_exhibit_tracking_obj_li;
|
||||
}
|
||||
|
||||
|
||||
// Updated 2024-03-22
|
||||
export async function handle_create_ae_obj__exhibit_tracking(
|
||||
{
|
||||
api_cfg,
|
||||
exhibit_id,
|
||||
event_badge_id,
|
||||
external_person_id,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
exhibit_id: string,
|
||||
event_badge_id: string,
|
||||
external_person_id: string,
|
||||
params: key_val,
|
||||
log_lvl: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_create_ae_obj__exhibit_tracking() *** exhibit_id=${exhibit_id}, event_badge_id=${event_badge_id}`);
|
||||
|
||||
let params_json: key_val = {};
|
||||
|
||||
// $events_sess.exhibits.status_create__exhibit_tracking = 'loading';
|
||||
ae_promises.create__event_exhibit_tracking = await api.create_ae_obj_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_exhibit_tracking',
|
||||
fields: {
|
||||
event_exhibit_id_random: exhibit_id,
|
||||
event_badge_id_random: event_badge_id,
|
||||
external_person_id: external_person_id,
|
||||
},
|
||||
key: api_cfg.api_crud_super_key,
|
||||
params: params,
|
||||
return_obj: true,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
|
||||
.then(function (exhibit_tracking_obj_create_result) {
|
||||
// console.log('Exhibit tracking create:', exhibit_tracking_obj_create_result);
|
||||
if (exhibit_tracking_obj_create_result) {
|
||||
// $slct.exhibit_tracking_obj = exhibit_tracking_obj_create_result;
|
||||
handle_db_save_ae_obj_li__exhibitor_tracking({obj_type: 'event_exhibit_tracking', obj_li: [exhibit_tracking_obj_create_result]});
|
||||
return exhibit_tracking_obj_create_result;
|
||||
} else {
|
||||
// $slct.exhibit_tracking_obj = [];
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log('No results returned or failed.', error);
|
||||
})
|
||||
.finally(function () {
|
||||
// console.log('Exhibit tracking create:', exhibit_tracking_obj_create_result);
|
||||
// return exhibit_tracking_obj_create_result;
|
||||
});
|
||||
|
||||
console.log('ae_promises.create__event_exhibit_tracking:', ae_promises.create__event_exhibit_tracking);
|
||||
return ae_promises.create__event_exhibit_tracking;
|
||||
}
|
||||
|
||||
|
||||
// Updated 2024-03-28
|
||||
export async function handle_update_ae_obj__exhibit_tracking(
|
||||
{
|
||||
api_cfg,
|
||||
exhibit_tracking_id,
|
||||
data,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
exhibit_tracking_id: string,
|
||||
data: any,
|
||||
params: key_val,
|
||||
log_lvl: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_update_ae_obj__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}`);
|
||||
|
||||
ae_promises.update__event_exhibit_tracking = await api.update_ae_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
obj_type: 'event_exhibit_tracking',
|
||||
obj_id: exhibit_tracking_id,
|
||||
fields: data,
|
||||
key: api_cfg.api_crud_super_key,
|
||||
params: params,
|
||||
return_obj: true,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (exhibit_tracking_obj_update_result) {
|
||||
if (exhibit_tracking_obj_update_result) {
|
||||
handle_db_save_ae_obj_li__exhibitor_tracking({obj_type: 'event_exhibit_tracking', obj_li: [exhibit_tracking_obj_update_result]});
|
||||
return exhibit_tracking_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_exhibit_tracking:', ae_promises.update__event_exhibit_tracking);
|
||||
return ae_promises.update__event_exhibit_tracking;
|
||||
}
|
||||
|
||||
|
||||
export async function handle_download_export__event_exhibit_tracking(
|
||||
{
|
||||
api_cfg,
|
||||
exhibit_id,
|
||||
file_type='CSV', // 'CSV' or 'Excel'
|
||||
return_file=true,
|
||||
filename='no_filename.csv',
|
||||
auto_download=false,
|
||||
params={},
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
exhibit_id: string,
|
||||
file_type?: string,
|
||||
return_file?: boolean,
|
||||
filename?: string,
|
||||
auto_download?: boolean,
|
||||
params?: key_val,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log('*** ae_events_functions.js: get_event_exhibit_tracking_export() ***');
|
||||
|
||||
const endpoint = `/event/exhibit/${exhibit_id}/tracking/export`;
|
||||
if (file_type == 'CSV' || file_type == 'Excel') {
|
||||
params['file_type'] = file_type;
|
||||
}
|
||||
params['return_file'] = true;
|
||||
|
||||
ae_promises.download__event_exhibit_tracking_export_file = await api.get_object({
|
||||
api_cfg: api_cfg,
|
||||
endpoint: endpoint,
|
||||
params: params,
|
||||
return_blob: true,
|
||||
filename: filename,
|
||||
auto_download: auto_download,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
|
||||
console.log('ae_promises.download__event_exhibit_tracking_export_file:', ae_promises.download__event_exhibit_tracking_export_file);
|
||||
return ae_promises.download__event_exhibit_tracking_export_file;
|
||||
}
|
||||
|
||||
|
||||
// This function will loop through the event_exhibit_obj_li and save each one to the DB.
|
||||
export function handle_db_save_ae_obj_li__exhibitor({obj_type, obj_li=[]}: {obj_type: string, obj_li: any[]}) {
|
||||
console.log(`*** handle_db_save_ae_obj_li__exhibitor() ***`);
|
||||
|
||||
if (obj_li && obj_li.length) {
|
||||
obj_li.forEach(async function (obj) {
|
||||
// console.log(`ae_obj ${obj_type}:`, obj);
|
||||
|
||||
try {
|
||||
const id_random = await db_events.exhibits.put({
|
||||
id_random: obj.event_exhibit_id_random,
|
||||
event_exhibit_id_random: obj.event_exhibit_id_random,
|
||||
|
||||
event_id_random: obj.event_id_random,
|
||||
code: obj.code,
|
||||
name: obj.name,
|
||||
description: obj.description,
|
||||
staff_passcode: obj.staff_passcode,
|
||||
data_json: obj.data_json,
|
||||
|
||||
leads_api_access: obj.leads_api_access,
|
||||
leads_custom_questions_json: obj.leads_custom_questions_json,
|
||||
leads_device_sm_qty: obj.leads_device_sm_qty,
|
||||
leads_device_lg_qty: obj.leads_device_lg_qty,
|
||||
license_max: obj.license_max,
|
||||
license_li_json: obj.license_li_json,
|
||||
cfg_json: obj.cfg_json,
|
||||
|
||||
enable: obj.enable,
|
||||
hide: obj.hide,
|
||||
priority: obj.priority,
|
||||
sort: obj.sort,
|
||||
group: obj.group,
|
||||
notes: obj.notes,
|
||||
created_on: obj.created_on,
|
||||
updated_on: obj.updated_on,
|
||||
});
|
||||
// console.log(`Put obj with ID: ${obj.event_exhibit_id_random} or ${id_random}`);
|
||||
} catch (error) {
|
||||
let status = `Failed to put ${obj.event_exhibit_id_random}: ${error}`;
|
||||
console.log(status);
|
||||
}
|
||||
|
||||
// const id_random = await db_events.exhibits.put(obj);
|
||||
// console.log(`Put obj with ID: ${obj.event_exhibit_id_random}`);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This function will loop through the event_exhibit_tracking_obj_li and save each one to the DB.
|
||||
export function handle_db_save_ae_obj_li__exhibitor_tracking(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
} : {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_db_save_ae_obj_li__exhibitor_tracking() ***`);
|
||||
|
||||
if (obj_li && obj_li.length) {
|
||||
obj_li.forEach(async function (obj: any) {
|
||||
// console.log(`ae_obj ${obj_type}:`, obj);
|
||||
|
||||
try {
|
||||
const id_random = await db_events.exhibit_tracking.put({
|
||||
id_random: obj.event_exhibit_tracking_id_random,
|
||||
event_exhibit_tracking_id_random: obj.event_exhibit_tracking_id_random,
|
||||
|
||||
event_exhibit_id_random: obj.event_exhibit_id_random,
|
||||
event_badge_id_random: obj.event_badge_id_random,
|
||||
event_person_id_random: obj.event_person_id_random,
|
||||
|
||||
external_person_id: obj.external_person_id,
|
||||
|
||||
exhibitor_notes: obj.exhibitor_notes,
|
||||
|
||||
responses_json: obj.responses_json,
|
||||
data_json: obj.data_json,
|
||||
|
||||
event_exhibit_name: obj.event_exhibit_name,
|
||||
|
||||
event_badge_title_names: obj.event_badge_title_names,
|
||||
event_badge_given_name: obj.event_badge_given_name,
|
||||
event_badge_family_name: obj.event_badge_family_name,
|
||||
event_badge_designations: obj.event_badge_designations,
|
||||
event_badge_full_name: obj.event_badge_full_name,
|
||||
event_badge_full_name_override: obj.event_badge_full_name_override,
|
||||
|
||||
event_badge_professional_title: obj.event_badge_professional_title,
|
||||
event_badge_professional_title_override: obj.event_badge_professional_title_override,
|
||||
|
||||
event_badge_affiliations: obj.event_badge_affiliations,
|
||||
event_badge_affiliations_override: obj.event_badge_affiliations_override,
|
||||
|
||||
event_badge_email: obj.event_badge_email,
|
||||
event_badge_email_override: obj.event_badge_email_override,
|
||||
|
||||
event_badge_location: obj.event_badge_location,
|
||||
event_badge_location_override: obj.event_badge_location_override,
|
||||
|
||||
event_badge_country: obj.event_badge_country,
|
||||
|
||||
enable: obj.enable,
|
||||
hide: obj.hide,
|
||||
priority: obj.priority,
|
||||
sort: obj.sort,
|
||||
group: obj.group,
|
||||
notes: obj.notes,
|
||||
|
||||
created_on: obj.created_on,
|
||||
updated_on: obj.updated_on,
|
||||
});
|
||||
// console.log(`Put obj with ID: ${obj.event_exhibit_tracking_id_random} or ${id_random}`);
|
||||
} catch (error) {
|
||||
let status = `Failed to put ${obj.event_exhibit_tracking_id_random}: ${error}`;
|
||||
console.log(status);
|
||||
}
|
||||
|
||||
// const id_random = await db_events.exhibit_tracking.put(obj);
|
||||
// console.log(`Put obj with ID: ${obj.event_exhibit_tracking_id_random}`);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user