Now done for the night.
This commit is contained in:
@@ -4,6 +4,7 @@ import { fade } from 'svelte/transition';
|
||||
// import Editor from '@tinymce/tinymce-svelte';
|
||||
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { core_func } from '$lib/ae_core_functions';
|
||||
import { api } from '$lib/api';
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
||||
@@ -94,21 +95,16 @@ if ($idaa_slct.event_id) {
|
||||
console.log(`Event Object started: ${$idaa_slct.event_obj}`);
|
||||
}
|
||||
|
||||
// $ae_loc.lu_time_zone_list = [];
|
||||
if ($ae_loc.lu_time_zone_list && $ae_loc.lu_time_zone_list.length > 0) {
|
||||
// console.log('Already have time zone list!', $ae_loc.lu_time_zone_list);
|
||||
} else {
|
||||
console.log('No time zone list');
|
||||
|
||||
let lu_time_zone_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
|
||||
let lu_time_zone_li_get_promise = core_func.load_ae_obj_li__time_zone({
|
||||
api_cfg: $ae_api,
|
||||
obj_type: 'lu', // "lu" = a lookup table
|
||||
for_obj_type: 'time_zone',
|
||||
enabled: null,
|
||||
hidden: null,
|
||||
// order_by_li: {'name': 'ASC'},
|
||||
log_lvl: 1
|
||||
log_lvl: 2
|
||||
})
|
||||
|
||||
.then(function (lu_time_zone_li_get_result) {
|
||||
if (lu_time_zone_li_get_result) {
|
||||
$ae_loc.lu_time_zone_list = lu_time_zone_li_get_result;
|
||||
@@ -123,23 +119,43 @@ if ($ae_loc.lu_time_zone_list && $ae_loc.lu_time_zone_list.length > 0) {
|
||||
.catch(function (error) {
|
||||
console.log('No results returned or failed.', error);
|
||||
});
|
||||
|
||||
// let lu_time_zone_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
|
||||
// api_cfg: $ae_api,
|
||||
// obj_type: 'lu', // "lu" = a lookup table
|
||||
// for_obj_type: 'time_zone',
|
||||
// enabled: null,
|
||||
// hidden: null,
|
||||
// // order_by_li: {'name': 'ASC'},
|
||||
// log_lvl: 1
|
||||
// })
|
||||
|
||||
// .then(function (lu_time_zone_li_get_result) {
|
||||
// if (lu_time_zone_li_get_result) {
|
||||
// $ae_loc.lu_time_zone_list = lu_time_zone_li_get_result;
|
||||
// console.log(`Time zone list:`, $ae_loc.lu_time_zone_list);
|
||||
// console.log($ae_loc.lu_time_zone_list[0]);
|
||||
// console.log($ae_loc.lu_time_zone_list[10]);
|
||||
// } else {
|
||||
// console.log(`No time zones returned!`);
|
||||
// $ae_loc.lu_time_zone_list = [];
|
||||
// }
|
||||
// })
|
||||
// .catch(function (error) {
|
||||
// console.log('No results returned or failed.', error);
|
||||
// });
|
||||
}
|
||||
|
||||
if ($ae_loc.lu_country_list && $ae_loc.lu_country_list.length > 0) {
|
||||
// $ae_loc.lu_country_list = [];
|
||||
if ($ae_loc.lu_country_list && $ae_loc.lu_country_list.length > 150) {
|
||||
// console.log('Already have country list!', $ae_loc.lu_country_list);
|
||||
} else {
|
||||
console.log('No country list');
|
||||
|
||||
let lu_country_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
|
||||
let lu_country_li_get_promise = core_func.load_ae_obj_li__country({
|
||||
api_cfg: $ae_api,
|
||||
obj_type: 'lu', // "lu" = a lookup table
|
||||
for_obj_type: 'country',
|
||||
enabled: null,
|
||||
hidden: null,
|
||||
// order_by_li: {'sort': 'DESC', 'english_short_name': 'ASC'},
|
||||
log_lvl: 1
|
||||
log_lvl: 2
|
||||
})
|
||||
|
||||
.then(function (lu_country_li_get_result) {
|
||||
if (lu_country_li_get_result) {
|
||||
$ae_loc.lu_country_list = lu_country_li_get_result;
|
||||
@@ -154,23 +170,43 @@ if ($ae_loc.lu_country_list && $ae_loc.lu_country_list.length > 0) {
|
||||
.catch(function (error) {
|
||||
console.log('No results returned or failed.', error);
|
||||
});
|
||||
|
||||
// let lu_country_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
|
||||
// api_cfg: $ae_api,
|
||||
// obj_type: 'lu', // "lu" = a lookup table
|
||||
// for_obj_type: 'country',
|
||||
// enabled: null,
|
||||
// hidden: null,
|
||||
// // order_by_li: {'sort': 'DESC', 'english_short_name': 'ASC'},
|
||||
// log_lvl: 1
|
||||
// })
|
||||
|
||||
// .then(function (lu_country_li_get_result) {
|
||||
// if (lu_country_li_get_result) {
|
||||
// $ae_loc.lu_country_list = lu_country_li_get_result;
|
||||
// console.log(`Country list:`, $ae_loc.lu_country_list);
|
||||
// console.log($ae_loc.lu_country_list[0]);
|
||||
// console.log($ae_loc.lu_country_list[10]);
|
||||
// } else {
|
||||
// console.log(`No countries returned!`);
|
||||
// $ae_loc.lu_country_list = [];
|
||||
// }
|
||||
// })
|
||||
// .catch(function (error) {
|
||||
// console.log('No results returned or failed.', error);
|
||||
// });
|
||||
}
|
||||
|
||||
$ae_loc.lu_country_subdivision_list = [];
|
||||
if ($ae_loc.lu_country_subdivision_list && $ae_loc.lu_country_subdivision_list.length > 0) {
|
||||
// console.log('Already have country subdivision list!', $ae_loc.lu_country_subdivision_list);
|
||||
} else {
|
||||
console.log('No country subdivision list');
|
||||
|
||||
let lu_country_subdivision_li_get_promise = api.get_ae_obj_li_for_obj_id_crud({
|
||||
let lu_country_subdivision_li_get_promise = core_func.load_ae_obj_li__country_subdivision({
|
||||
api_cfg: $ae_api,
|
||||
obj_type: 'lu', // "lu" = a lookup table
|
||||
for_obj_type: 'country_subdivision',
|
||||
enabled: null,
|
||||
hidden: null,
|
||||
// order_by_li: {'sort': 'DESC', 'english_short_name': 'ASC'},
|
||||
log_lvl: 1
|
||||
log_lvl: 2
|
||||
})
|
||||
|
||||
.then(function (lu_country_subdivision_li_get_result) {
|
||||
if (lu_country_subdivision_li_get_result) {
|
||||
$ae_loc.lu_country_subdivision_list = lu_country_subdivision_li_get_result;
|
||||
|
||||
Reference in New Issue
Block a user