Better (less) logging and other clean up
This commit is contained in:
@@ -89,7 +89,7 @@ $slct = {
|
||||
...$slct,
|
||||
...ae_acct.slct,
|
||||
}
|
||||
console.log(`$slct = `, $slct);
|
||||
// console.log(`$slct = `, $slct);
|
||||
|
||||
if ($ae_loc.site_cfg_json.slct__event_id) {
|
||||
$events_slct.event_id = $ae_loc.site_cfg_json.slct__event_id;
|
||||
|
||||
@@ -24,7 +24,7 @@ $events_loc.qry__offset = 0;
|
||||
$slct.account_id = data.account_id;
|
||||
console.log(`$slct.account_id = `, $slct.account_id);
|
||||
let ae_acct = data[$slct.account_id];
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
// console.log(`ae_acct = `, ae_acct);
|
||||
|
||||
$events_slct.event_id = ae_acct.slct.event_id;
|
||||
$events_slct.event_obj = ae_acct.slct.event_obj;
|
||||
|
||||
@@ -5,20 +5,22 @@ import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
|
||||
export async function load({ parent }) {
|
||||
let log_lvl = 0;
|
||||
|
||||
let data = await parent();
|
||||
// console.log(`ae_events_pres_mgmt +layout.ts data:`, data);
|
||||
|
||||
|
||||
let account_id = data.account_id;
|
||||
let ae_acct = data[account_id];
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
|
||||
if (!account_id) {
|
||||
console.log(`events_pres_mgmt +layout.ts: The account_id was not found in the data!!!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
let ae_acct = data[account_id];
|
||||
if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
|
||||
// // Should we limit these to event.conference = true?
|
||||
// let load_event_obj_li = events_func.handle_load_ae_obj_li__event({
|
||||
// api_cfg: ae_acct.api,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
export let data: any;
|
||||
console.log(`ae_events_pres_mgmt +page data:`, data);
|
||||
// console.log(`ae_events_pres_mgmt +page data:`, data);
|
||||
// console.log(`ae_events_pres_mgmt Data Params:`, data.url.searchParams.get('event_id'));
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
@@ -12,7 +12,7 @@ import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { events_loc, events_slct, events_trigger } from '$lib/ae_events_stores';
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
|
||||
import Element_data_store from '$lib/element_data_store.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store.svelte';
|
||||
|
||||
|
||||
let ae_acct = data[$slct.account_id];
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
/** @type {import('./$types').PageLoad} */
|
||||
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
export async function load({ parent }) {
|
||||
let log_lvl = 0;
|
||||
|
||||
let data = await parent();
|
||||
|
||||
let account_id = data.account_id;
|
||||
if (!account_id) {
|
||||
console.log(`events_pres_mgmt +page.ts: The account_id was not found in the data!!!`);
|
||||
error(500, {
|
||||
message: 'Not found'
|
||||
});
|
||||
}
|
||||
|
||||
let ae_acct = data[account_id];
|
||||
|
||||
// Should we limit these to event.conference = true?
|
||||
|
||||
@@ -4,15 +4,14 @@ export let data: any;
|
||||
// console.log(`ae_events_pres_mgmt event [slug] +page.svelte data:`, data);
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
import { goto, invalidate, pushState, replaceState } from '$app/navigation';
|
||||
|
||||
import { clipboard, FileDropzone, getModalStore, localStorageStore, ProgressRadial, RadioGroup, RadioItem, TabGroup, Tab, TabAnchor } from '@skeletonlabs/skeleton';
|
||||
import { clipboard } from '@skeletonlabs/skeleton';
|
||||
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils';
|
||||
import { api, send_email } from '$lib/api';
|
||||
import Element_data_store from '$lib/element_data_store.svelte';
|
||||
import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store.svelte';
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
let ae_tmp: key_val = {};
|
||||
@@ -30,9 +29,9 @@ import Presenter_view from './presenter_view.svelte';
|
||||
|
||||
// Quickly save the data passed from the parent(s) to the Svelte stores, localStorage, and other.
|
||||
$slct.account_id = data.account_id;
|
||||
console.log(`$slct.account_id = `, $slct.account_id);
|
||||
// console.log(`$slct.account_id = `, $slct.account_id);
|
||||
let ae_acct = data[$slct.account_id];
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
// console.log(`ae_acct = `, ae_acct);
|
||||
|
||||
$ae_loc.url_origin = data.url.origin;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ console.log(`ae_events_pres_mgmt_event [slug] +page.ts start`);
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
export async function load({ parent }) { // route
|
||||
let log_lvl = 0;
|
||||
// console.log(`ae_events_pres_mgmt_event +page.ts data.params:`, params);
|
||||
// console.log(`ae_events_pres_mgmt_event +page.ts data.route:`, route);
|
||||
// console.log(`ae_events_pres_mgmt_event +page.ts data.url:`, url);
|
||||
@@ -13,7 +14,7 @@ export async function load({ parent }) { // route
|
||||
|
||||
let account_id = data.account_id;
|
||||
let ae_acct = data[account_id];
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
// console.log(`ae_acct = `, ae_acct);
|
||||
|
||||
if (!account_id) {
|
||||
console.log(`events_pres_mgmt_event [slug] +page.ts: The account_id was not found in the data!!!`);
|
||||
@@ -43,7 +44,9 @@ export async function load({ parent }) { // route
|
||||
try_cache: false
|
||||
})
|
||||
.then((event_presentation_obj_li) => {
|
||||
console.log(`event_presentation_obj_li = `, event_presentation_obj_li);
|
||||
if (log_lvl) {
|
||||
console.log(`event_presentation_obj_li = `, event_presentation_obj_li);
|
||||
}
|
||||
for (let index = 0; index < event_presentation_obj_li.length; index++) {
|
||||
let event_presentation_obj = event_presentation_obj_li[index];
|
||||
let event_presentation_id = event_presentation_obj.event_presentation_id_random;
|
||||
@@ -54,7 +57,9 @@ export async function load({ parent }) { // route
|
||||
params: {enabled: 'all', qry__limit: 15},
|
||||
try_cache: false
|
||||
});
|
||||
console.log(`load_event_presenter_obj_li = `, load_event_presenter_obj_li);
|
||||
if (log_lvl) {
|
||||
console.log(`load_event_presenter_obj_li = `, load_event_presenter_obj_li);
|
||||
}
|
||||
event_presentation_obj_li[index].event_presenter_li = load_event_presenter_obj_li;
|
||||
// ae_acct.slct.event_presentation_obj_li[index].event_presenter_obj_li = load_event_presenter_obj_li;
|
||||
}
|
||||
@@ -63,7 +68,9 @@ export async function load({ parent }) { // route
|
||||
|
||||
return event_presentation_obj_li;
|
||||
});
|
||||
console.log(`load_event_presentation_obj_li = `, load_event_presentation_obj_li);
|
||||
if (log_lvl) {
|
||||
console.log(`load_event_presentation_obj_li = `, load_event_presentation_obj_li);
|
||||
}
|
||||
ae_acct.slct.event_presentation_obj_li = load_event_presentation_obj_li;
|
||||
|
||||
let load_event_file_obj_li = await events_func.handle_load_ae_obj_li__event_file({
|
||||
@@ -73,10 +80,14 @@ export async function load({ parent }) { // route
|
||||
try_cache: false
|
||||
})
|
||||
.then((event_file_obj_li) => {
|
||||
console.log(`event_file_obj_li = `, event_file_obj_li);
|
||||
if (log_lvl) {
|
||||
console.log(`event_file_obj_li = `, event_file_obj_li);
|
||||
}
|
||||
return event_file_obj_li;
|
||||
});
|
||||
console.log(`load_event_file_obj_li = `, load_event_file_obj_li);
|
||||
if (log_lvl) {
|
||||
console.log(`load_event_file_obj_li = `, load_event_file_obj_li);
|
||||
}
|
||||
ae_acct.slct.event_file_obj_li = load_event_file_obj_li;
|
||||
|
||||
// WARNING: Precaution against shared data between sites and presentations.
|
||||
|
||||
Reference in New Issue
Block a user