Moving things to SK. Added events and sessions.
This commit is contained in:
@@ -41,6 +41,128 @@ async function handle_load_ae_obj_id__event({api_cfg, event_id, try_cache=false}
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Updated 2024-05-24
|
||||||
|
async function handle_load_ae_obj_li__event(
|
||||||
|
{
|
||||||
|
api_cfg,
|
||||||
|
account_id,
|
||||||
|
params={},
|
||||||
|
try_cache=true,
|
||||||
|
log_lvl=0
|
||||||
|
} : {
|
||||||
|
api_cfg: any,
|
||||||
|
account_id: string,
|
||||||
|
params?: key_val,
|
||||||
|
try_cache?: boolean,
|
||||||
|
log_lvl?: number
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
console.log(`*** handle_load_ae_obj_li__event() ***`);
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
let params_json: key_val = {};
|
||||||
|
|
||||||
|
// console.log('params_json:', params_json);
|
||||||
|
|
||||||
|
ae_promises.load__event_obj_li = await api.get_ae_obj_li_for_obj_id_crud({
|
||||||
|
api_cfg: api_cfg,
|
||||||
|
obj_type: 'event',
|
||||||
|
for_obj_type: 'account',
|
||||||
|
for_obj_id: account_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
|
||||||
|
enabled: enabled,
|
||||||
|
hidden: hidden,
|
||||||
|
order_by_li: {'start_datetime': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||||
|
limit: limit,
|
||||||
|
offset: offset,
|
||||||
|
params_json: params_json,
|
||||||
|
params: params,
|
||||||
|
log_lvl: log_lvl
|
||||||
|
})
|
||||||
|
.then(function (event_obj_li_get_result) {
|
||||||
|
if (event_obj_li_get_result) {
|
||||||
|
handle_db_save_ae_obj_li__event({obj_type: 'event', obj_li: event_obj_li_get_result});
|
||||||
|
return event_obj_li_get_result;
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log('No results returned or failed.', error);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('ae_promises.load__event_obj_li:', ae_promises.load__event_obj_li);
|
||||||
|
return ae_promises.load__event_obj_li;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Updated 2024-05-24
|
||||||
|
async function handle_load_ae_obj_li__event_session(
|
||||||
|
{
|
||||||
|
api_cfg,
|
||||||
|
event_id,
|
||||||
|
params={},
|
||||||
|
try_cache=true,
|
||||||
|
log_lvl=0
|
||||||
|
} : {
|
||||||
|
api_cfg: any,
|
||||||
|
event_id: string,
|
||||||
|
params?: key_val,
|
||||||
|
try_cache?: boolean,
|
||||||
|
log_lvl?: number
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
console.log(`*** handle_load_ae_obj_li__event_session() ***`);
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
let params_json: key_val = {};
|
||||||
|
|
||||||
|
// console.log('params_json:', params_json);
|
||||||
|
|
||||||
|
ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud({
|
||||||
|
api_cfg: api_cfg,
|
||||||
|
obj_type: 'event_session',
|
||||||
|
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
|
||||||
|
enabled: enabled,
|
||||||
|
hidden: hidden,
|
||||||
|
order_by_li: {'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||||
|
limit: limit,
|
||||||
|
offset: offset,
|
||||||
|
params_json: params_json,
|
||||||
|
params: params,
|
||||||
|
log_lvl: log_lvl
|
||||||
|
})
|
||||||
|
.then(function (event_session_obj_li_get_result) {
|
||||||
|
if (event_session_obj_li_get_result) {
|
||||||
|
handle_db_save_ae_obj_li__event_session({obj_type: 'event_session', obj_li: event_session_obj_li_get_result});
|
||||||
|
return event_session_obj_li_get_result;
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log('No results returned or failed.', error);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('ae_promises.load__event_session_obj_li:', ae_promises.load__event_session_obj_li);
|
||||||
|
return ae_promises.load__event_session
|
||||||
|
}
|
||||||
|
|
||||||
async function handle_load_ae_obj_id__badge({api_cfg, badge_id, try_cache=false}) {
|
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}`);
|
console.log(`*** handle_load_ae_obj_id__badge() *** badge_id=${badge_id}`);
|
||||||
|
|
||||||
@@ -601,6 +723,62 @@ async function handle_update_ae_obj__exhibit_tracking({api_cfg, exhibit_tracking
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// This function will loop through the event_obj_li and save each one to the DB.
|
||||||
|
function handle_db_save_ae_obj_li__event({obj_type, obj_li}) {
|
||||||
|
console.log(`*** handle_db_save_ae_obj_li__event() ***`);
|
||||||
|
|
||||||
|
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.events.put({
|
||||||
|
id_random: obj.event_id_random,
|
||||||
|
event_id_random: obj.event_id_random,
|
||||||
|
|
||||||
|
account_id_random: obj.account_id_random,
|
||||||
|
|
||||||
|
code: obj.event_code,
|
||||||
|
|
||||||
|
conference: obj.conference,
|
||||||
|
type: obj.type,
|
||||||
|
name: obj.name,
|
||||||
|
description: obj.description,
|
||||||
|
|
||||||
|
start_datetime: obj.start_datetime,
|
||||||
|
end_datetime: obj.end_datetime,
|
||||||
|
timezone: obj.timezone,
|
||||||
|
location_address_json: obj.location_address_json,
|
||||||
|
|
||||||
|
mod_abstracts_json: obj.mod_abstracts_json,
|
||||||
|
mod_badges_json: obj.mod_badges_json,
|
||||||
|
mod_exhibits_json: obj.mod_exhibits_json,
|
||||||
|
mod_pres_mgmt_json: obj.mod_pres_mgmt_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_id_random} or ${id_random}`);
|
||||||
|
} catch (error) {
|
||||||
|
let status = `Failed to put ${obj.event_id_random}: ${error}`;
|
||||||
|
console.log(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
// const id_random = await db_events.events.put(obj);
|
||||||
|
// console.log(`Put obj with ID: ${obj.event_id_random}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// This function will loop through the badge_obj_li and save each one to the DB.
|
// This function will loop through the badge_obj_li and save each one to the DB.
|
||||||
@@ -808,6 +986,62 @@ function handle_db_save_ae_obj_li__exhibitor_tracking({obj_type, obj_li}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// This function will loop through the event_session_obj_li and save each one to the DB.
|
||||||
|
function handle_db_save_ae_obj_li__event_session({obj_type, obj_li}) {
|
||||||
|
console.log(`*** handle_db_save_ae_obj_li__event_session() ***`);
|
||||||
|
|
||||||
|
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.sessions.put({
|
||||||
|
id_random: obj.event_session_id_random,
|
||||||
|
event_session_id_random: obj.event_session_id_random,
|
||||||
|
external_id: obj.external_id,
|
||||||
|
code: obj.code,
|
||||||
|
|
||||||
|
for_type: obj.for_type,
|
||||||
|
for_id_random: obj.for_id_random,
|
||||||
|
|
||||||
|
type_code: obj.type_code,
|
||||||
|
|
||||||
|
event_id_random: obj.event_id_random,
|
||||||
|
event_location_id_random: obj.event_location_id_random,
|
||||||
|
|
||||||
|
name: obj.name,
|
||||||
|
description: obj.description,
|
||||||
|
|
||||||
|
start_datetime: obj.start_datetime,
|
||||||
|
end_datetime: obj.end_datetime,
|
||||||
|
|
||||||
|
hide_event_launcher: obj.hide_event_launcher,
|
||||||
|
|
||||||
|
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_session_id_random} or ${id_random}`);
|
||||||
|
} catch (error) {
|
||||||
|
let status = `Failed to put ${obj.event_session_id_random}: ${error}`;
|
||||||
|
console.log(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
// const id_random = await db_events.sessions.put(obj);
|
||||||
|
// console.log(`Put obj with ID: ${obj.event_session_id_random}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function handle_download_export__event_exhibit_tracking(
|
async function handle_download_export__event_exhibit_tracking(
|
||||||
{
|
{
|
||||||
api_cfg,
|
api_cfg,
|
||||||
@@ -845,9 +1079,14 @@ async function handle_download_export__event_exhibit_tracking(
|
|||||||
|
|
||||||
let export_obj = {
|
let export_obj = {
|
||||||
handle_load_ae_obj_id__event: handle_load_ae_obj_id__event,
|
handle_load_ae_obj_id__event: handle_load_ae_obj_id__event,
|
||||||
|
handle_load_ae_obj_li__event: handle_load_ae_obj_li__event,
|
||||||
|
|
||||||
|
handle_load_ae_obj_li__event_session: handle_load_ae_obj_li__event_session,
|
||||||
|
|
||||||
handle_load_ae_obj_id__badge: handle_load_ae_obj_id__badge,
|
handle_load_ae_obj_id__badge: handle_load_ae_obj_id__badge,
|
||||||
handle_load_ae_obj_li__badge: handle_load_ae_obj_li__badge,
|
handle_load_ae_obj_li__badge: handle_load_ae_obj_li__badge,
|
||||||
handle_search__event_badge: handle_search__event_badge,
|
handle_search__event_badge: handle_search__event_badge,
|
||||||
|
|
||||||
handle_load_ae_obj_id__exhibit: handle_load_ae_obj_id__exhibit,
|
handle_load_ae_obj_id__exhibit: handle_load_ae_obj_id__exhibit,
|
||||||
handle_load_ae_obj_li__exhibit: handle_load_ae_obj_li__exhibit,
|
handle_load_ae_obj_li__exhibit: handle_load_ae_obj_li__exhibit,
|
||||||
handle_load_ae_obj_id__exhibit_tracking: handle_load_ae_obj_id__exhibit_tracking,
|
handle_load_ae_obj_id__exhibit_tracking: handle_load_ae_obj_id__exhibit_tracking,
|
||||||
|
|||||||
@@ -195,8 +195,8 @@ export let get_ae_obj_li_for_obj_id_crud = async function get_ae_obj_li_for_obj_
|
|||||||
order_by_li=null,
|
order_by_li=null,
|
||||||
limit=999999,
|
limit=999999,
|
||||||
offset=0,
|
offset=0,
|
||||||
key,
|
// key,
|
||||||
jwt=null,
|
// jwt=null,
|
||||||
headers={},
|
headers={},
|
||||||
params_json=null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the API endpoint. Example: { "fulltext_search": { "default_qry_str": "Search string for default", "address_default_qry_str": "Search string for address", "contact_1_default_qry_str": "Search string for contact_1" } }
|
params_json=null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the API endpoint. Example: { "fulltext_search": { "default_qry_str": "Search string for default", "address_default_qry_str": "Search string for address", "contact_1_default_qry_str": "Search string for contact_1" } }
|
||||||
// json_obj=null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint.
|
// json_obj=null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint.
|
||||||
@@ -210,18 +210,18 @@ export let get_ae_obj_li_for_obj_id_crud = async function get_ae_obj_li_for_obj_
|
|||||||
for_obj_id?: string,
|
for_obj_id?: string,
|
||||||
use_alt_table?: boolean,
|
use_alt_table?: boolean,
|
||||||
use_alt_base?: boolean,
|
use_alt_base?: boolean,
|
||||||
inc?: any,
|
inc?: key_val
|
||||||
enabled?: string,
|
enabled?: string,
|
||||||
hidden?: string,
|
hidden?: string,
|
||||||
order_by_li?: any,
|
order_by_li?: any,
|
||||||
limit?: number,
|
limit?: number,
|
||||||
offset?: number,
|
offset?: number,
|
||||||
key: string,
|
// key: string,
|
||||||
jwt?: string,
|
// jwt?: string,
|
||||||
headers?: any,
|
headers?: any,
|
||||||
params_json?: any,
|
params_json?: any,
|
||||||
// json_obj?: any,
|
// json_obj?: any,
|
||||||
params?: any,
|
params?: key_val,
|
||||||
return_meta?: boolean,
|
return_meta?: boolean,
|
||||||
log_lvl?: number
|
log_lvl?: number
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,37 @@
|
|||||||
import Dexie, { type Table } from 'dexie';
|
import Dexie, { type Table } from 'dexie';
|
||||||
|
|
||||||
|
export interface Event {
|
||||||
|
id_random: string;
|
||||||
|
code: string;
|
||||||
|
account_id_random: string;
|
||||||
|
|
||||||
|
conference: boolean;
|
||||||
|
type: string;
|
||||||
|
name: string;
|
||||||
|
summary: null|string;
|
||||||
|
description: null|string;
|
||||||
|
|
||||||
|
start_datetime: Date;
|
||||||
|
end_datetime: Date;
|
||||||
|
timezone: null|string;
|
||||||
|
location_address_json: null|string;
|
||||||
|
|
||||||
|
mod_abstracts_json: null|string;
|
||||||
|
mod_badges_json: null|string;
|
||||||
|
mod_exhibits_json: null|string;
|
||||||
|
mod_pres_mgmt_json: null|string;
|
||||||
|
cfg_json: string;
|
||||||
|
|
||||||
|
enable: null|boolean;
|
||||||
|
hide: null|boolean;
|
||||||
|
priority: null|boolean
|
||||||
|
sort: null|number;
|
||||||
|
group: null|string;
|
||||||
|
notes: null|string;
|
||||||
|
created_on: Date;
|
||||||
|
updated_on: null|Date;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Badge {
|
export interface Badge {
|
||||||
// id?: number;
|
// id?: number;
|
||||||
id_random: string;
|
id_random: string;
|
||||||
@@ -140,6 +172,38 @@ export interface Exhibit_tracking {
|
|||||||
updated_on: null|Date;
|
updated_on: null|Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Session {
|
||||||
|
id_random: string;
|
||||||
|
event_session_id_random: string;
|
||||||
|
external_id: string;
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
for_type: string;
|
||||||
|
for_id_random: string;
|
||||||
|
|
||||||
|
type_code: string;
|
||||||
|
|
||||||
|
event_id_random: string;
|
||||||
|
event_location_id_random: string;
|
||||||
|
|
||||||
|
name: string;
|
||||||
|
description: null|string;
|
||||||
|
|
||||||
|
start_datetime: Date;
|
||||||
|
end_datetime: Date;
|
||||||
|
|
||||||
|
hide_event_launcher: null|boolean;
|
||||||
|
|
||||||
|
enable: null|boolean;
|
||||||
|
hide: null|boolean;
|
||||||
|
priority: null|boolean
|
||||||
|
sort: null|number;
|
||||||
|
group: null|string;
|
||||||
|
notes: null|string;
|
||||||
|
created_on: Date;
|
||||||
|
updated_on: null|Date;
|
||||||
|
}
|
||||||
|
|
||||||
export class MySubClassedDexie extends Dexie {
|
export class MySubClassedDexie extends Dexie {
|
||||||
// 'badges' is added by dexie when declaring the stores()
|
// 'badges' is added by dexie when declaring the stores()
|
||||||
// We just tell the typing system this is the case
|
// We just tell the typing system this is the case
|
||||||
@@ -150,16 +214,44 @@ export class MySubClassedDexie extends Dexie {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super('ae_events_db');
|
super('ae_events_db');
|
||||||
this.version(1).stores({
|
this.version(1).stores({
|
||||||
// badges: '++id, full_name, email' // Primary key and indexed props
|
events: `
|
||||||
|
id_random, code, account_id_random,
|
||||||
|
conference, type,
|
||||||
|
name, summary, description,
|
||||||
|
start_datetime, end_datetime,
|
||||||
|
timezone, location_address_json,
|
||||||
|
mod_abstracts_json, mod_badges_json, mod_exhibits_json, mod_pres_mgmt_json,
|
||||||
|
cfg_json,
|
||||||
|
enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
||||||
|
|
||||||
|
// badges: '++id, full_name, email' // Primary key and indexed props
|
||||||
badges: `
|
badges: `
|
||||||
id_random, event_badge_id_random, event_id_random, full_name, full_name_override, email, email_override, affiliations, affiliations_override, badge_type, badge_type_code, badge_type_code_override, badge_type_override, external_event_id, external_id, external_person_id, enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
id_random, event_badge_id_random, event_id_random,
|
||||||
|
full_name, full_name_override, email, email_override,
|
||||||
|
affiliations, affiliations_override,
|
||||||
|
badge_type, badge_type_code, badge_type_code_override, badge_type_override,
|
||||||
|
external_event_id, external_id, external_person_id,
|
||||||
|
enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
||||||
|
|
||||||
exhibits: `
|
exhibits: `
|
||||||
id_random, event_exhibit_id_random, code, name, description, staff_passcode, data_json, license_max, license_li_json, cfg_json, enable, hide, priority, sort, group, notes, created_on, updated_on, [priority+name]`,
|
id_random, event_exhibit_id_random,
|
||||||
|
code, name, description, staff_passcode,
|
||||||
|
data_json, license_max, license_li_json, cfg_json,
|
||||||
|
enable, hide, priority, sort, group, notes, created_on, updated_on, [priority+name]`,
|
||||||
|
|
||||||
exhibit_tracking: `
|
exhibit_tracking: `
|
||||||
id_random, event_exhibit_tracking_id_random, event_exhibit_id_random, event_badge_id_random, event_person_id_random,
|
id_random, event_exhibit_tracking_id_random, event_exhibit_id_random, event_badge_id_random, event_person_id_random,
|
||||||
exhibitor_notes, responses_json, data_json,
|
exhibitor_notes, responses_json, data_json,
|
||||||
event_badge_full_name, event_badge_email,
|
event_badge_full_name, event_badge_email,
|
||||||
enable, hide, priority, sort, group, notes, created_on, updated_on`
|
enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
||||||
|
|
||||||
|
sessions: `
|
||||||
|
id_random, event_session_id_random, external_id, code,
|
||||||
|
for_type, for_id_random, type_code,
|
||||||
|
event_id_random, event_location_id_random,
|
||||||
|
name, description, start_datetime, end_datetime,
|
||||||
|
hide_event_launcher,
|
||||||
|
enable, hide, priority, sort, group, notes, created_on, updated_on`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,13 +19,28 @@ export async function load({ parent }) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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,
|
||||||
|
account_id: account_id,
|
||||||
|
params: {enabled: 'enabled', qry__limit: 25},
|
||||||
|
try_cache: false,
|
||||||
|
log_lvl: 1
|
||||||
|
});
|
||||||
|
ae_acct.slct.event_obj_li = load_event_obj_li;
|
||||||
|
|
||||||
|
|
||||||
let event_id = ae_acct.slct.event_id;
|
let event_id = ae_acct.slct.event_id;
|
||||||
if (!event_id) {
|
if (!event_id) {
|
||||||
console.log(`events_pres_mgmt +layout.ts: The event_id was not found in the data!!!`);
|
console.log(`events_pres_mgmt +layout.ts: The event_id was not found in the data!!!`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let load_event_obj = events_func.handle_load_ae_obj_id__event({api_cfg: ae_acct.api, event_id: event_id, try_cache: false});
|
let load_event_obj = events_func.handle_load_ae_obj_id__event({
|
||||||
|
api_cfg: ae_acct.api,
|
||||||
|
event_id: event_id,
|
||||||
|
try_cache: false
|
||||||
|
});
|
||||||
|
|
||||||
ae_acct.slct.event_obj = load_event_obj;
|
ae_acct.slct.event_obj = load_event_obj;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ console.log(`ae_events_pres_mgmt +page data:`, data);
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
import { api } from '$lib/api';
|
import { api } from '$lib/api';
|
||||||
|
import { liveQuery } from "dexie";
|
||||||
|
import { db_events } from "$lib/db_events";
|
||||||
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
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 { events_loc, events_slct, events_trigger } from '$lib/ae_events_stores';
|
||||||
import { ae_util } from '$lib/ae_utils';
|
import { ae_util } from '$lib/ae_utils';
|
||||||
@@ -13,6 +15,20 @@ 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 event_obj_li = liveQuery(
|
||||||
|
() => db_events.events.toArray()
|
||||||
|
// () => db_events.events
|
||||||
|
// .where('conference')
|
||||||
|
// // .aboveOrEqual(0)
|
||||||
|
// .equals('true')
|
||||||
|
// // .above(0)
|
||||||
|
// .sortBy('name') // Use sortBy() instead of orderBy(). toArray() is also not needed???
|
||||||
|
// // .sortBy('[priority+name]')
|
||||||
|
// // .orderBy('name')
|
||||||
|
// // .offset(10).limit(5)
|
||||||
|
// // .toArray()
|
||||||
|
);
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
console.log('Events - Presentation Management: +page.svelte');
|
console.log('Events - Presentation Management: +page.svelte');
|
||||||
|
|
||||||
@@ -57,6 +73,22 @@ onMount(() => {
|
|||||||
show_edit={false}
|
show_edit={false}
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
|
|
||||||
|
{#if $event_obj_li}
|
||||||
|
<ul>
|
||||||
|
{#each $event_obj_li as event_obj}
|
||||||
|
<li>
|
||||||
|
<a href="/events_pres_mgmt/event/{event_obj.id_random}" class="hover:underline">
|
||||||
|
{ae_util.iso_datetime_formatter(event_obj.start_datetime, 'date_long')}
|
||||||
|
-
|
||||||
|
{event_obj.name}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ if ($events_loc.leads.auth_exhibit_kv && $events_loc.leads.auth_exhibit_kv[$even
|
|||||||
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
console.log('Events Leads Exhibit [slug]: +page.svelte');
|
console.log('Events Event [slug]: +page.svelte');
|
||||||
|
|
||||||
// console.log(`ae_events_leads exhibit [slug] +page.svelte data:`, data);
|
// console.log(`ae_events_leads exhibit [slug] +page.svelte data:`, data);
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ onMount(() => {
|
|||||||
|
|
||||||
{#if $events_slct.event_id && $event_obj}
|
{#if $events_slct.event_id && $event_obj}
|
||||||
|
|
||||||
Nothing to see
|
<h2>{$event_obj.name}</h2>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user