Various bug fixes for CHOW
This commit is contained in:
@@ -25,7 +25,8 @@ $ae_loc.mod.sponsorships.level_guest_max_li = {
|
||||
7: 16, // CHOW 2024 - Premier Partner
|
||||
};
|
||||
// $slct.sponsorship_cfg_id = ae_acct.slct.sponsorship_cfg_id;
|
||||
// $slct.sponsorship_cfg_obj = ae_acct.slct.sponsorship_cfg_obj;
|
||||
// Setting the sponsorship_cfg_obj here seems to be important. It does not behave correctly if you navigate from the main (root) page for the site. The sponsorship level drop down is missing (probably more). - 2024-04-01
|
||||
$slct.sponsorship_cfg_obj = ae_acct.slct.sponsorship_cfg_obj;
|
||||
|
||||
// We want to loop through all of the data store (ds) key value pairs and set them to localStorage
|
||||
// if (ae_acct.ds) {
|
||||
|
||||
@@ -30,10 +30,16 @@ export async function load({ parent }) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let load_sponsorship_cfg_obj = spons_func.handle_load_ae_obj_id__sponsorship_cfg({api_cfg: ae_acct.api, sponsorship_cfg_id: sponsorship_cfg_id, try_cache: false});
|
||||
// The await at this point seems to be important. If it is in the sponsor function then the data is not available to the layout. - 2024-04-01
|
||||
let load_sponsorship_cfg_obj = await spons_func.handle_load_ae_obj_id__sponsorship_cfg({
|
||||
api_cfg: ae_acct.api,
|
||||
sponsorship_cfg_id: sponsorship_cfg_id,
|
||||
try_cache: false,
|
||||
log_lvl: 0
|
||||
});
|
||||
|
||||
ae_acct.slct.sponsorship_cfg_id = sponsorship_cfg_id;
|
||||
ae_acct.slct.sponsorship_cfg_obj = await load_sponsorship_cfg_obj;
|
||||
ae_acct.slct.sponsorship_cfg_obj = load_sponsorship_cfg_obj;
|
||||
|
||||
data.ae_sponsorships_layout_ts = true;
|
||||
|
||||
|
||||
@@ -173,10 +173,20 @@ async function handle_load_ae_obj_li__sponsorship({account_id, try_cache=true})
|
||||
console.log('*** handle_load_ae_obj_li__sponsorship() ***');
|
||||
// console.log($ae_loc.mod.sponsorships);
|
||||
|
||||
let enabled = $ae_loc.mod.sponsorships.enabled;
|
||||
let hidden = $ae_loc.mod.sponsorships.hidden;
|
||||
let limit = $ae_loc.mod.sponsorships.limit;
|
||||
let offset = $ae_loc.mod.sponsorships.offset;
|
||||
let enabled: string = ($ae_loc.qry__enabled ?? 'enabled'); // all, disabled, enabled
|
||||
let hidden: string = ($ae_loc.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden
|
||||
let limit: number = ($ae_loc.qry__limit ?? 99); // 99
|
||||
let offset: number = ($ae_loc.qry__offset ?? 0); // 0
|
||||
|
||||
if ($ae_loc.administrator_access) {
|
||||
enabled = 'all';
|
||||
hidden = 'all';
|
||||
}
|
||||
|
||||
// let enabled = $ae_loc.mod.sponsorships.enabled;
|
||||
// let hidden = $ae_loc.mod.sponsorships.hidden;
|
||||
// let limit = $ae_loc.mod.sponsorships.limit;
|
||||
// let offset = $ae_loc.mod.sponsorships.offset;
|
||||
|
||||
let params = {};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** @type {import('./$types').LayoutLoad} */
|
||||
console.log(`ae_sponsorships [slug] +layout.ts start`);
|
||||
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
export let data;
|
||||
export let data: any;
|
||||
|
||||
console.log(`ae_ Svelte Sponsorships [slug] +page data:`, data);
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
Reference in New Issue
Block a user