Renaming standard object functions
This commit is contained in:
@@ -4,13 +4,13 @@ import { api } from '$lib/api';
|
||||
import { db_events } from "$lib/db_events";
|
||||
|
||||
import { handle_load_ae_obj_li__event_file } from "$lib/ae_events__event_file";
|
||||
import { handle_load_ae_obj_li__event_session } from './ae_events__event_session';
|
||||
import { load_ae_obj_li__event_session } from './ae_events__event_session';
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
|
||||
|
||||
// Updated 2024-06-10
|
||||
export async function handle_load_ae_obj_id__event_location(
|
||||
export async function load_ae_obj_id__event_location(
|
||||
{
|
||||
api_cfg,
|
||||
event_location_id,
|
||||
@@ -27,7 +27,7 @@ export async function handle_load_ae_obj_id__event_location(
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_load_ae_obj_id__event_location() *** event_location_id=${event_location_id}`);
|
||||
console.log(`*** load_ae_obj_id__event_location() *** event_location_id=${event_location_id}`);
|
||||
|
||||
let params = {};
|
||||
|
||||
@@ -45,7 +45,7 @@ export async function handle_load_ae_obj_id__event_location(
|
||||
if (event_location_obj_get_result) {
|
||||
if (try_cache) {
|
||||
// This is expecting a list
|
||||
handle_db_save_ae_obj_li__event_location({
|
||||
db_save_ae_obj_li__event_location({
|
||||
obj_type: 'event_location',
|
||||
obj_li: [event_location_obj_get_result]
|
||||
});
|
||||
@@ -95,7 +95,7 @@ export async function handle_load_ae_obj_id__event_location(
|
||||
if (log_lvl) {
|
||||
console.log(`Need to load the session list for the location now`);
|
||||
}
|
||||
let load_event_session_obj_li = handle_load_ae_obj_li__event_session({
|
||||
let load_event_session_obj_li = load_ae_obj_li__event_session({
|
||||
api_cfg: api_cfg,
|
||||
for_obj_type: 'event_location',
|
||||
for_obj_id: event_location_id,
|
||||
@@ -111,7 +111,7 @@ export async function handle_load_ae_obj_id__event_location(
|
||||
// console.log(`ae_promises.load__event_session_obj = `, ae_promises.load__event_session_obj);
|
||||
// ae_promises.load__event_session_obj.event_session_li = event_session_obj_li;
|
||||
// // Re-save the session object with the new session list
|
||||
// handle_db_save_ae_obj_li__event_session({
|
||||
// db_save_ae_obj_li__event_session({
|
||||
// obj_type: 'event_session',
|
||||
// obj_li: [ae_promises.load__event_session_obj]
|
||||
// });
|
||||
@@ -130,7 +130,7 @@ export async function handle_load_ae_obj_id__event_location(
|
||||
|
||||
|
||||
// Updated 2024-05-24
|
||||
export async function handle_load_ae_obj_li__event_location(
|
||||
export async function load_ae_obj_li__event_location(
|
||||
{
|
||||
api_cfg,
|
||||
event_id,
|
||||
@@ -149,7 +149,7 @@ export async function handle_load_ae_obj_li__event_location(
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_load_ae_obj_li__event_location() *** event_id=${event_id}`);
|
||||
console.log(`*** load_ae_obj_li__event_location() *** event_id=${event_id}`);
|
||||
|
||||
let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled
|
||||
let hidden: string = (params.qry__hidden ?? 'all'); // all, hidden, not_hidden
|
||||
@@ -179,7 +179,7 @@ export async function handle_load_ae_obj_li__event_location(
|
||||
.then(function (event_location_obj_li_get_result) {
|
||||
if (event_location_obj_li_get_result) {
|
||||
if (try_cache) {
|
||||
handle_db_save_ae_obj_li__event_location({
|
||||
db_save_ae_obj_li__event_location({
|
||||
obj_type: 'event_location',
|
||||
obj_li: event_location_obj_li_get_result
|
||||
});
|
||||
@@ -236,7 +236,7 @@ export async function handle_load_ae_obj_li__event_location(
|
||||
let event_location_obj = ae_promises.load__event_location_obj_li[i];
|
||||
let event_location_id = event_location_obj.event_location_id_random;
|
||||
|
||||
let load_event_session_obj_li = handle_load_ae_obj_li__event_session({
|
||||
let load_event_session_obj_li = load_ae_obj_li__event_session({
|
||||
api_cfg: api_cfg,
|
||||
for_obj_type: 'event_location',
|
||||
for_obj_id: event_location_id,
|
||||
@@ -261,7 +261,7 @@ export async function handle_load_ae_obj_li__event_location(
|
||||
}
|
||||
|
||||
|
||||
export async function handle_search__event_location(
|
||||
export async function search__event_location(
|
||||
{
|
||||
api_cfg,
|
||||
event_id,
|
||||
@@ -286,7 +286,7 @@ export async function handle_search__event_location(
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_search__event_location() *** event_id=${event_id}`);
|
||||
console.log(`*** search__event_location() *** 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
|
||||
@@ -362,7 +362,7 @@ export async function handle_search__event_location(
|
||||
})
|
||||
.then(function (event_location_obj_li_get_result) {
|
||||
if (event_location_obj_li_get_result) {
|
||||
handle_db_save_ae_obj_li__event_location({obj_type: 'event_location', obj_li: event_location_obj_li_get_result});
|
||||
db_save_ae_obj_li__event_location({obj_type: 'event_location', obj_li: event_location_obj_li_get_result});
|
||||
return event_location_obj_li_get_result;
|
||||
} else {
|
||||
return [];
|
||||
@@ -382,7 +382,7 @@ export async function handle_search__event_location(
|
||||
|
||||
|
||||
// Updated 2024-06-25
|
||||
export async function handle_create_ae_obj__event_location(
|
||||
export async function create_ae_obj__event_location(
|
||||
{
|
||||
api_cfg,
|
||||
event_id,
|
||||
@@ -397,7 +397,7 @@ export async function handle_create_ae_obj__event_location(
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_create_ae_obj__event_location() *** event_id=${event_id}`);
|
||||
console.log(`*** create_ae_obj__event_location() *** event_id=${event_id}`);
|
||||
|
||||
ae_promises.create__event_location = await api.create_ae_obj_crud({
|
||||
api_cfg: api_cfg,
|
||||
@@ -413,7 +413,7 @@ export async function handle_create_ae_obj__event_location(
|
||||
})
|
||||
.then(function (event_location_obj_create_result) {
|
||||
if (event_location_obj_create_result) {
|
||||
handle_db_save_ae_obj_li__event_location(
|
||||
db_save_ae_obj_li__event_location(
|
||||
{
|
||||
obj_type: 'event_location',
|
||||
obj_li: [event_location_obj_create_result]
|
||||
@@ -438,7 +438,7 @@ export async function handle_create_ae_obj__event_location(
|
||||
|
||||
// This function will loop through the event_location_obj_li and save each one to the DB.
|
||||
// Updated 2024-06-25
|
||||
export function handle_db_save_ae_obj_li__event_location(
|
||||
export function db_save_ae_obj_li__event_location(
|
||||
{
|
||||
obj_type,
|
||||
obj_li
|
||||
@@ -447,7 +447,7 @@ export function handle_db_save_ae_obj_li__event_location(
|
||||
obj_li: any
|
||||
}
|
||||
) {
|
||||
console.log(`*** handle_db_save_ae_obj_li__event_location() ***`);
|
||||
console.log(`*** db_save_ae_obj_li__event_location() ***`);
|
||||
|
||||
if (obj_li && obj_li.length) {
|
||||
obj_li.forEach(async function (obj: any) {
|
||||
|
||||
Reference in New Issue
Block a user