Fixes for the reports. General clean up all around. Better usage of log_lvl.
This commit is contained in:
@@ -413,12 +413,26 @@ export async function handle_download_export__event_exhibit_tracking(
|
||||
|
||||
|
||||
// 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() ***`);
|
||||
export function handle_db_save_ae_obj_li__exhibitor(
|
||||
{
|
||||
obj_type,
|
||||
obj_li=[],
|
||||
log_lvl=0
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any[],
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
if (log_lvl) {
|
||||
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);
|
||||
if (log_lvl) {
|
||||
console.log(`ae_obj ${obj_type}:`, obj);
|
||||
}
|
||||
|
||||
try {
|
||||
const id_random = await db_events.exhibits.put({
|
||||
@@ -468,17 +482,23 @@ export function handle_db_save_ae_obj_li__exhibitor({obj_type, obj_li=[]}: {obj_
|
||||
export function handle_db_save_ae_obj_li__exhibitor_tracking(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
obj_li,
|
||||
log_lvl=0
|
||||
}: {
|
||||
obj_type: string,
|
||||
obj_li: any
|
||||
obj_li: any,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_db_save_ae_obj_li__exhibitor_tracking() ***`);
|
||||
if (log_lvl) {
|
||||
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);
|
||||
if (log_lvl) {
|
||||
console.log(`ae_obj ${obj_type}:`, obj);
|
||||
}
|
||||
|
||||
try {
|
||||
const id_random = await db_events.exhibit_tracking.put({
|
||||
|
||||
Reference in New Issue
Block a user