I am done for the night...
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"@floating-ui/dom": "1.6.3",
|
"@floating-ui/dom": "1.6.3",
|
||||||
"axios": "^1.6.7",
|
"axios": "^1.6.7",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
|
"dexie": "^4.0.1-beta.14",
|
||||||
"highlight.js": "11.9.0"
|
"highlight.js": "11.9.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -2166,6 +2167,11 @@
|
|||||||
"integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==",
|
"integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/dexie": {
|
||||||
|
"version": "4.0.1-beta.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/dexie/-/dexie-4.0.1-beta.14.tgz",
|
||||||
|
"integrity": "sha512-1Glgs4nyHUriknstBku1T0Qz9qxJbHQy49JFeDEacHQK+XljN/sn1zyIH/HwouQ7a+WAdWHInm51i0GqWOAyHg=="
|
||||||
|
},
|
||||||
"node_modules/didyoumean": {
|
"node_modules/didyoumean": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
"@floating-ui/dom": "1.6.3",
|
"@floating-ui/dom": "1.6.3",
|
||||||
"axios": "^1.6.7",
|
"axios": "^1.6.7",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
|
"dexie": "^4.0.1-beta.14",
|
||||||
"highlight.js": "11.9.0"
|
"highlight.js": "11.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ let events_session_data_struct: key_val = {
|
|||||||
|
|
||||||
// Badge Printing
|
// Badge Printing
|
||||||
'badges': {
|
'badges': {
|
||||||
|
'fulltext_search_qry_str': null,
|
||||||
'status_qry__search': null,
|
'status_qry__search': null,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
35
src/lib/db_events.ts
Normal file
35
src/lib/db_events.ts
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import Dexie, { type Table } from 'dexie';
|
||||||
|
|
||||||
|
export interface Badge {
|
||||||
|
// id?: number;
|
||||||
|
id_random: string;
|
||||||
|
full_name: string;
|
||||||
|
full_name_override: null|string;
|
||||||
|
email: string;
|
||||||
|
email_override: null|string;
|
||||||
|
affiliations: string;
|
||||||
|
affiliations_override: null|string;
|
||||||
|
badge_type: string;
|
||||||
|
badge_type_code: string;
|
||||||
|
badge_type_code_override: null|string;
|
||||||
|
badge_type_override: null|string;
|
||||||
|
external_event_id: string;
|
||||||
|
external_id: string;
|
||||||
|
external_person_id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MySubClassedDexie extends Dexie {
|
||||||
|
// 'badges' is added by dexie when declaring the stores()
|
||||||
|
// We just tell the typing system this is the case
|
||||||
|
badges!: Table<Badge>;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super('ae_events_db');
|
||||||
|
this.version(1).stores({
|
||||||
|
// badges: '++id, full_name, email' // Primary key and indexed props
|
||||||
|
badges: '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' // Primary key and indexed props
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const db_events = new MySubClassedDexie();
|
||||||
@@ -86,6 +86,8 @@ onMount(() => {
|
|||||||
// console.log(`ae_ ds_code_li = `, ds_code_li);
|
// console.log(`ae_ ds_code_li = `, ds_code_li);
|
||||||
|
|
||||||
$: if (trigger == 'load__ds__code' && ds_code && ds_type) {
|
$: if (trigger == 'load__ds__code' && ds_code && ds_type) {
|
||||||
|
console.log(`ae_ load__ds__code: ${ds_code} ${ds_type} ${for_type} ${for_id} ${try_cache}`);
|
||||||
|
|
||||||
trigger = null;
|
trigger = null;
|
||||||
|
|
||||||
load_data_store({
|
load_data_store({
|
||||||
@@ -294,6 +296,8 @@ async function handle_submit_form(event) {
|
|||||||
return ds_results;
|
return ds_results;
|
||||||
})
|
})
|
||||||
.finally(function (ds_val_result) {
|
.finally(function (ds_val_result) {
|
||||||
|
console.log(`ae_ ds_val_result = `, ds_val_result);
|
||||||
|
trigger = 'load__ds__code';
|
||||||
$ae_sess.ds.submit_status = 'created';
|
$ae_sess.ds.submit_status = 'created';
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -323,7 +327,10 @@ async function handle_submit_form(event) {
|
|||||||
// .finally(function (ds_val_result) {
|
// .finally(function (ds_val_result) {
|
||||||
// // console.log(`ae_ ds_code_val = `, ds_val_result);
|
// // console.log(`ae_ ds_code_val = `, ds_val_result);
|
||||||
})
|
})
|
||||||
.finally(function (ds_val_result) {
|
.finally(function () {
|
||||||
|
// console.log(`ae_ ds_val_result = `, ds_val_result);
|
||||||
|
console.log(`ae_ load__ds__code: ${ds_code} ${ds_type} ${for_type} ${for_id} ${try_cache}`);
|
||||||
|
trigger = 'load__ds__code';
|
||||||
$ae_sess.ds.submit_status = 'updated';
|
$ae_sess.ds.submit_status = 'updated';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -376,31 +383,31 @@ async function handle_update__data_store({
|
|||||||
|
|
||||||
$ae_sess.ds.update_status = 'starting';
|
$ae_sess.ds.update_status = 'starting';
|
||||||
ae_promises.update__data_store_obj = api.update_ae_obj_id_crud({
|
ae_promises.update__data_store_obj = api.update_ae_obj_id_crud({
|
||||||
api_cfg: $ae_api,
|
api_cfg: $ae_api,
|
||||||
obj_type: obj_type,
|
obj_type: obj_type,
|
||||||
obj_id: obj_id,
|
obj_id: obj_id,
|
||||||
fields: data,
|
fields: data,
|
||||||
key: $ae_api.api_crud_super_key,
|
key: $ae_api.api_crud_super_key,
|
||||||
log_lvl: 2
|
log_lvl: 2
|
||||||
})
|
|
||||||
.then(async function (update__obj_result) {
|
|
||||||
if (!update__obj_result) {
|
|
||||||
console.log('The result was null or false.');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return update__obj_result;
|
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.then(async function (update__obj_result) {
|
||||||
console.log('Something went wrong.');
|
if (!update__obj_result) {
|
||||||
console.log(error);
|
console.log('The result was null or false.');
|
||||||
return false;
|
return false;
|
||||||
})
|
}
|
||||||
.finally(function (update__obj_result) {
|
return update__obj_result;
|
||||||
$ae_sess.ds.update_status = 'finished';
|
})
|
||||||
return update__obj_result;
|
.catch(function (error) {
|
||||||
})
|
console.log('Something went wrong.');
|
||||||
|
console.log(error);
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.finally(function (update__obj_result) {
|
||||||
|
$ae_sess.ds.update_status = 'finished';
|
||||||
|
return update__obj_result;
|
||||||
|
})
|
||||||
|
|
||||||
return ae_promises.update__data_store_obj;
|
return ae_promises.update__data_store_obj;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -581,7 +588,7 @@ async function handle_update__data_store({
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="btn variant-soft-primary"
|
class="btn variant-soft-primary"
|
||||||
disabled={ds_submit_results instanceof Promise}
|
disabled={ds_submit_results instanceof Promise && !ds_submit_results}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
trigger = 'save__ds__code';
|
trigger = 'save__ds__code';
|
||||||
// $slct_trigger = 'save__ds__code';
|
// $slct_trigger = 'save__ds__code';
|
||||||
@@ -600,10 +607,12 @@ async function handle_update__data_store({
|
|||||||
</div>
|
</div>
|
||||||
{:then ds_submit_results}
|
{:then ds_submit_results}
|
||||||
{#if ds_submit_results}
|
{#if ds_submit_results}
|
||||||
<span class="fas fa-check text-green-500"></span>
|
<div>
|
||||||
<span class="saved-text">
|
<span class="fas fa-check text-green-500"></span>
|
||||||
Saved
|
<span class="saved-text">
|
||||||
</span>
|
Saved
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
@@ -644,6 +653,7 @@ async function handle_update__data_store({
|
|||||||
type="button"
|
type="button"
|
||||||
class="ae_btn_edit__ds btn hover:variant-glass-warning text-xs absolute top-0 right-0 opacity-75 hover:opacity-100 transition delay-700 hover:delay-200 m-1 p-1"
|
class="ae_btn_edit__ds btn hover:variant-glass-warning text-xs absolute top-0 right-0 opacity-75 hover:opacity-100 transition delay-700 hover:delay-200 m-1 p-1"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
trigger = 'load__ds__code';
|
||||||
show_edit = true;
|
show_edit = true;
|
||||||
show_view = false;
|
show_view = false;
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
|
|||||||
import type { key_val } from '$lib/ae_stores';
|
import type { key_val } from '$lib/ae_stores';
|
||||||
// console.log($ae_loc, $ae_sess, $ae_api);
|
// console.log($ae_loc, $ae_sess, $ae_api);
|
||||||
|
|
||||||
|
|
||||||
import Element_access_type from '$lib/element_access_type.svelte';
|
import Element_access_type from '$lib/element_access_type.svelte';
|
||||||
import Element_app_cfg from '$lib/element_app_cfg.svelte';
|
import Element_app_cfg from '$lib/element_app_cfg.svelte';
|
||||||
|
import Element_data_store from '$lib/element_data_store.svelte';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -271,7 +271,12 @@ $: if ($slct_trigger == 'set_access_code_li' && !$ae_loc.ds['hub__page__access_c
|
|||||||
|
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<!-- OSIT's Aether App -->
|
<!-- OSIT's Aether App -->
|
||||||
{@html $ae_loc.ds['hub__site__appshell_header']}
|
<!-- {@html $ae_loc.ds['hub__site__appshell_header']} -->
|
||||||
|
<Element_data_store
|
||||||
|
ds_code="hub__site__appshell_header"
|
||||||
|
ds_type="html"
|
||||||
|
display="block"
|
||||||
|
/>
|
||||||
<svelte:fragment slot="trail">
|
<svelte:fragment slot="trail">
|
||||||
{#if $ae_loc.ds['hub__page__appshell_header_trail']}
|
{#if $ae_loc.ds['hub__page__appshell_header_trail']}
|
||||||
{@html $ae_loc.ds['hub__page__appshell_header_trail']}
|
{@html $ae_loc.ds['hub__page__appshell_header_trail']}
|
||||||
|
|||||||
@@ -19,9 +19,15 @@ import { onMount } from 'svelte';
|
|||||||
import type { key_val } from '$lib/ae_stores';
|
import type { key_val } from '$lib/ae_stores';
|
||||||
import { ae_util } from '$lib/ae_utils';
|
import { ae_util } from '$lib/ae_utils';
|
||||||
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, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
import { ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||||
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/ae_events_stores';
|
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/ae_events_stores';
|
||||||
|
|
||||||
|
let event_badge_li = liveQuery(
|
||||||
|
() => db_events.badges.toArray()
|
||||||
|
);
|
||||||
|
|
||||||
// import Edit_modal_event_badge from '../10_edit_modal__event_badge_obj.svelte';
|
// import Edit_modal_event_badge from '../10_edit_modal__event_badge_obj.svelte';
|
||||||
|
|
||||||
let ae_promises: key_val = {};
|
let ae_promises: key_val = {};
|
||||||
@@ -227,40 +233,77 @@ async function handle_load_ae_obj_id__event_badge({event_badge_id, try_cache=fal
|
|||||||
// Updated 2024-03-06 late
|
// Updated 2024-03-06 late
|
||||||
$: if ($events_trigger == 'load__event_badge_obj_li' && $events_slct.event_id) {
|
$: if ($events_trigger == 'load__event_badge_obj_li' && $events_slct.event_id) {
|
||||||
console.log(`$events_slct.event_id=${$events_slct.event_id}`);
|
console.log(`$events_slct.event_id=${$events_slct.event_id}`);
|
||||||
$events_trigger = null;
|
|
||||||
|
|
||||||
load_obj_li_results = handle_load_ae_obj_li__badge({event_id: $events_slct.event_id, try_cache: false})
|
if ($events_sess.status_qry__search == 'loading') {
|
||||||
.then(function (load_results) {
|
console.log('*** $events_sess.status_qry__search == loading ***');
|
||||||
if (load_results) {
|
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log("Delayed for X second.");
|
||||||
|
$events_trigger = null;
|
||||||
|
|
||||||
|
load_obj_li_results = handle_load_ae_obj_li__badge({event_id: $events_slct.event_id, try_cache: false})
|
||||||
|
.then(function (load_results) {
|
||||||
|
if (load_results) {
|
||||||
|
console.log(`load_results=`, load_results);
|
||||||
|
} else {
|
||||||
|
console.log('No results returned.');
|
||||||
|
}
|
||||||
|
// return load_results;
|
||||||
|
console.log(`load_results=`, load_results);
|
||||||
|
// $events_slct.badge_obj_li = load_results;
|
||||||
|
return load_results;
|
||||||
|
});
|
||||||
|
}, 250);
|
||||||
|
} else {
|
||||||
|
console.log('*** $events_sess.status_qry__search != loading ***');
|
||||||
|
$events_trigger = null;
|
||||||
|
|
||||||
|
load_obj_li_results = handle_load_ae_obj_li__badge({event_id: $events_slct.event_id, try_cache: false})
|
||||||
|
.then(function (load_results) {
|
||||||
|
if (load_results) {
|
||||||
|
console.log(`load_results=`, load_results);
|
||||||
|
} else {
|
||||||
|
console.log('No results returned.');
|
||||||
|
}
|
||||||
|
// return load_results;
|
||||||
console.log(`load_results=`, load_results);
|
console.log(`load_results=`, load_results);
|
||||||
} else {
|
// $events_slct.badge_obj_li = load_results;
|
||||||
console.log('No results returned.');
|
return load_results;
|
||||||
}
|
});
|
||||||
// return load_results;
|
}
|
||||||
console.log(`load_results=`, load_results);
|
|
||||||
$events_slct.badge_obj_li = load_results;
|
|
||||||
return load_results;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updated 2024-03-06
|
// Updated 2024-03-06
|
||||||
async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
||||||
console.log(`*** handle_load_ae_obj_li__badge() *** event_id=${event_id}`);
|
console.log(`*** handle_load_ae_obj_li__badge() *** event_id=${event_id}`);
|
||||||
|
|
||||||
|
let fulltext_search_qry_str = $events_sess.badges.fulltext_search_qry_str;
|
||||||
|
|
||||||
let enabled = $events_loc.qry_enabled;
|
let enabled = $events_loc.qry_enabled;
|
||||||
let hidden = $events_loc.qry__hidden;
|
let hidden = $events_loc.qry__hidden;
|
||||||
let limit = $events_loc.qry__limit;
|
let limit = $events_loc.qry__limit;
|
||||||
let offset = $events_loc.qry__offset;
|
let offset = $events_loc.qry__offset;
|
||||||
|
|
||||||
if ($ae_loc.trusted_access) {
|
if ($ae_loc.administrator_access) {
|
||||||
|
enabled = 'all';
|
||||||
|
hidden = 'all';
|
||||||
|
limit = 500;
|
||||||
|
} else if ($ae_loc.trusted_access) {
|
||||||
// enabled = 'all';
|
// enabled = 'all';
|
||||||
hidden = 'all';
|
hidden = 'all';
|
||||||
limit = 30;
|
limit = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
let params = {};
|
let params = {};
|
||||||
|
|
||||||
let params_json: key_val = {};
|
let params_json: key_val = {};
|
||||||
|
if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) {
|
||||||
|
params_json['ft_qry'] = {
|
||||||
|
'default_qry_str': fulltext_search_qry_str,
|
||||||
|
// 'location_address_json_ext': fulltext_search_qry_str, // JSON extracted text DB field
|
||||||
|
// 'contact_li_json_ext': fulltext_search_qry_str, // JSON extracted text DB field
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// console.log('params_json:', params_json);
|
// console.log('params_json:', params_json);
|
||||||
// console.log(params_json);
|
// console.log(params_json);
|
||||||
@@ -285,8 +328,10 @@ async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
.then(function (badge_obj_li_get_result) {
|
.then(function (badge_obj_li_get_result) {
|
||||||
|
// console.log('Badge list:', badge_obj_li_get_result);
|
||||||
if (badge_obj_li_get_result) {
|
if (badge_obj_li_get_result) {
|
||||||
// $slct.badge_obj_li = badge_obj_li_get_result;
|
// $slct.badge_obj_li = badge_obj_li_get_result;
|
||||||
|
handle_db_save_ae_obj_li({obj_type: 'event_badge', obj_li: badge_obj_li_get_result});
|
||||||
return badge_obj_li_get_result;
|
return badge_obj_li_get_result;
|
||||||
} else {
|
} else {
|
||||||
// $slct.badge_obj_li = [];
|
// $slct.badge_obj_li = [];
|
||||||
@@ -295,15 +340,55 @@ async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
|||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log('No results returned or failed.', error);
|
console.log('No results returned or failed.', error);
|
||||||
});
|
})
|
||||||
// .finally(function () {
|
.finally(function () {
|
||||||
// $events_sess.badges.status_qry__search = 'done';
|
$events_sess.badges.status_qry__search = 'done';
|
||||||
// // console.log('Sponsorship list:', $slct.badge_obj_li);
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
// console.log('Badge list:', badge_obj_li_get_result);
|
||||||
|
// return badge_obj_li_get_result;
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('ae_promises.load__event_badge_obj_li:', ae_promises.load__event_badge_obj_li);
|
||||||
return ae_promises.load__event_badge_obj_li;
|
return ae_promises.load__event_badge_obj_li;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This function will loop through the badge_obj_li and save each one to the DB.
|
||||||
|
function handle_db_save_ae_obj_li({obj_type, obj_li}) {
|
||||||
|
console.log(`*** handle_db_save_ae_obj_li() ***`);
|
||||||
|
|
||||||
|
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.badges.put({
|
||||||
|
id_random: obj.event_badge_id_random,
|
||||||
|
full_name: obj.full_name,
|
||||||
|
full_name_override: obj.full_name_override,
|
||||||
|
email: obj.email,
|
||||||
|
email_override: obj.email_override,
|
||||||
|
affiliations: obj.affiliations,
|
||||||
|
affiliations_override: obj.affiliations_override,
|
||||||
|
badge_type: obj.badge_type,
|
||||||
|
badge_type_override: obj.badge_type_override,
|
||||||
|
badge_type_code: obj.badge_type_code,
|
||||||
|
badge_type_code_override: obj.badge_type_code_override,
|
||||||
|
external_event_id: obj.external_event_id,
|
||||||
|
external_id: obj.external_id,
|
||||||
|
external_person_id: obj.external_person_id,
|
||||||
|
});
|
||||||
|
// console.log(`Put obj with ID: ${obj.event_badge_id_random} or ${id_random}`);
|
||||||
|
} catch (error) {
|
||||||
|
let status = `Failed to put ${obj.event_badge_id_random}: ${error}`;
|
||||||
|
console.log(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
// const id_random = await db_events.badges.put(obj);
|
||||||
|
// console.log(`Put obj with ID: ${obj.event_badge_id_random}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@@ -320,12 +405,22 @@ async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- <section class="btn btn-group"> -->
|
<!-- <section class="btn btn-group"> -->
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
placeholder="Search (name, email, affiliatons, etc.)"
|
||||||
|
id="badge_fulltext_search_qry_str"
|
||||||
|
name="fulltext_search_qry_str"
|
||||||
|
bind:value={$events_sess.badges.fulltext_search_qry_str}
|
||||||
|
class="input w-96"
|
||||||
|
>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="btn variant-ghost-primary w-96"
|
class="btn variant-ghost-primary w-48"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
$events_trigger = 'load__event_badge_obj_li';
|
$events_trigger = 'load__event_badge_obj_li';
|
||||||
$events_trigger = $events_trigger;
|
// $events_trigger = $events_trigger;
|
||||||
|
|
||||||
|
// handle_oninput_fulltext_search_qry_str();
|
||||||
|
|
||||||
// handle_badge_search('event_id', null);
|
// handle_badge_search('event_id', null);
|
||||||
// modalStore.trigger(modal_edit__event_badge);
|
// modalStore.trigger(modal_edit__event_badge);
|
||||||
@@ -358,7 +453,9 @@ async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
|||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
|
|
||||||
{#if $events_slct.badge_obj_li && $events_slct.badge_obj_li.length}
|
<!-- {#if $events_slct.badge_obj_li && $events_slct.badge_obj_li.length} -->
|
||||||
|
{#if $event_badge_li}
|
||||||
|
<section class="ae_h_scrollfix">
|
||||||
<h2 class="h3">Results:</h2>
|
<h2 class="h3">Results:</h2>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -370,7 +467,8 @@ async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{#each $events_slct.badge_obj_li as badge_obj}
|
<!-- {#each $events_slct.badge_obj_li as badge_obj} -->
|
||||||
|
{#each $event_badge_li as badge_obj}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button
|
<button
|
||||||
@@ -403,7 +501,7 @@ async function handle_load_ae_obj_li__badge({event_id, try_cache=true}) {
|
|||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</section>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
No badges found.
|
No badges found.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export let data;
|
|||||||
|
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>Events Speakers - {data.ae_loc.title}</title>
|
<title>Speaker Hub - {data.ae_loc.title}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -279,45 +279,47 @@ async function handle_load_ae_obj_id__event_presenter({event_presenter_id, try_c
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<div class="ae_events_speakers md:container h-full mx-auto">
|
<section class="ae_events_speakers md:container h-full mx-auto flex flex-col items-center space-y-4">
|
||||||
<div class="space-y-10 flex flex-col">
|
|
||||||
|
|
||||||
<h1 class="h1 text-center">
|
<header>
|
||||||
<!-- Æ - Events: Speakers -->
|
<h1 class="h2">
|
||||||
Speakers Hub
|
<!-- Æ - Events: Speakers -->
|
||||||
</h1>
|
Speaker Hub
|
||||||
<section>
|
</h1>
|
||||||
<button
|
</header>
|
||||||
class="btn variant-ghost-primary"
|
|
||||||
on:click={() => {
|
|
||||||
// $ae_loc.mod.events.show_edit__event_presenter_obj = true;
|
|
||||||
$slct.event_presenter_id = null;
|
|
||||||
$slct.event_presenter_obj = null;
|
|
||||||
|
|
||||||
// modalStore.trigger(modal_edit__event_presenter_obj);
|
<section>
|
||||||
$ae_loc.mod.events.show_edit__event_presenter_obj = true;
|
<button
|
||||||
$slct_trigger = 'show_edit__event_presenter_obj';
|
class="btn variant-ghost-primary"
|
||||||
}}
|
on:click={() => {
|
||||||
>
|
// $ae_loc.mod.events.show_edit__event_presenter_obj = true;
|
||||||
<span class="fas fa-edit mx-1"></span>
|
$slct.event_presenter_id = null;
|
||||||
Start Speaker Submission Form
|
$slct.event_presenter_obj = null;
|
||||||
</button>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="events_speakers_list">
|
// modalStore.trigger(modal_edit__event_presenter_obj);
|
||||||
{#await ae_event_presenter_obj_li_get_promise}
|
$ae_loc.mod.events.show_edit__event_presenter_obj = true;
|
||||||
<span class="fas fa-spinner fa-spin"></span>
|
$slct_trigger = 'show_edit__event_presenter_obj';
|
||||||
<span class="loading-text">
|
}}
|
||||||
Loading...
|
>
|
||||||
</span>
|
<span class="fas fa-edit mx-1"></span>
|
||||||
{/await}
|
Start Speaker Submission Form
|
||||||
|
</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
{#if $slct.event_presenter_obj_li && $ae_loc.mod.events.show_list__event_presenter_obj_li}
|
<section class="events_speakers_list ae_h_scrollfix">
|
||||||
<List_event_presenter_obj />
|
{#await ae_event_presenter_obj_li_get_promise}
|
||||||
{/if}
|
<span class="fas fa-spinner fa-spin"></span>
|
||||||
</section>
|
<span class="loading-text">
|
||||||
</div>
|
Loading...
|
||||||
</div>
|
</span>
|
||||||
|
{/await}
|
||||||
|
|
||||||
|
{#if $slct.event_presenter_obj_li && $ae_loc.mod.events.show_list__event_presenter_obj_li}
|
||||||
|
<List_event_presenter_obj class_li=""/>
|
||||||
|
{/if}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ async function handle_update__event_presenter({
|
|||||||
{/if}
|
{/if}
|
||||||
<span class="fas fa-file-upload"></span>
|
<span class="fas fa-file-upload"></span>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
Files
|
Headshot
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab
|
<Tab
|
||||||
bind:group={$store_current_tab}
|
bind:group={$store_current_tab}
|
||||||
@@ -818,7 +818,7 @@ async function handle_update__event_presenter({
|
|||||||
>
|
>
|
||||||
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></svelte:fragment>
|
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></svelte:fragment>
|
||||||
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
||||||
<svelte:fragment slot="meta">Image file types only (PNG, WEBP, JPG, etc)</svelte:fragment>
|
<svelte:fragment slot="meta">High resolution image files only<br>(PNG, WEBP, JPG, etc)</svelte:fragment>
|
||||||
</FileDropzone>
|
</FileDropzone>
|
||||||
{@html placeholder_li.image_headshot}
|
{@html placeholder_li.image_headshot}
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { ae_util } from '$lib/ae_utils';
|
|||||||
// import { ae } from 'aether_npm_lib';
|
// import { ae } from 'aether_npm_lib';
|
||||||
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';
|
||||||
|
|
||||||
export let container_class_li = [];
|
export let class_li: string = '';
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
console.log('** Component Mounted: ** List - Event Presenters Obj');
|
console.log('** Component Mounted: ** List - Event Presenters Obj');
|
||||||
@@ -18,7 +18,7 @@ onMount(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<section class="svelte_component ae_section ae_list list__event_presenter_obj event_presenter_obj_li {container_class_li.join(' ')} ae_h_scrollfix">
|
<section class="svelte_component ae_section ae_list list__event_presenter_obj event_presenter_obj_li {class_li}">
|
||||||
{#if $slct.event_presenter_obj_li}
|
{#if $slct.event_presenter_obj_li}
|
||||||
<table class="table table-compact table-hover">
|
<table class="table table-compact table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -245,13 +245,11 @@ $: if (testing) {
|
|||||||
{@html $ae_loc.ds.hub__page__events_speakers__create_info_header}
|
{@html $ae_loc.ds.hub__page__events_speakers__create_info_header}
|
||||||
{:else}
|
{:else}
|
||||||
<header>
|
<header>
|
||||||
<h1 class="h1">Information Goes Here</h1>
|
<h1 class="h2">Speaker Hub Infor Goes Here</h1>
|
||||||
</header>
|
</header>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- <section class="btn btn-group"> -->
|
<section>
|
||||||
|
|
||||||
|
|
||||||
{#if $slct.event_presenter_id}
|
{#if $slct.event_presenter_id}
|
||||||
<button
|
<button
|
||||||
class="btn variant-ghost-primary w-96"
|
class="btn variant-ghost-primary w-96"
|
||||||
@@ -289,15 +287,15 @@ $: if (testing) {
|
|||||||
Start Speaker Submission Form
|
Start Speaker Submission Form
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- </section> -->
|
</section>
|
||||||
|
|
||||||
{#if $ae_loc.ds.hub__page__events_speakers__create_info}
|
{#if $ae_loc.ds.hub__page__events_speakers__create_info}
|
||||||
{@html $ae_loc.ds.hub__page__events_speakers__create_info}
|
{@html $ae_loc.ds.hub__page__events_speakers__create_info}
|
||||||
{:else}
|
{:else}
|
||||||
<section>
|
<section>
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
More information goes here.
|
More information can go here or this can be hidden.
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export let data;
|
|||||||
|
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>Sponsorships - {data.ae_loc.title}</title>
|
<title>Sponsor Hub - {data.ae_loc.title}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<!-- <h1>Sponsorships Layout?</h1> -->
|
<!-- <h1>Sponsorships Layout?</h1> -->
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const modalComponentEditSponsorshipObj: ModalComponent = { ref: Edit_modal_spons
|
|||||||
const modal_edit__sponsorship_obj: ModalSettings = {
|
const modal_edit__sponsorship_obj: ModalSettings = {
|
||||||
type: 'component',
|
type: 'component',
|
||||||
component: modalComponentEditSponsorshipObj,
|
component: modalComponentEditSponsorshipObj,
|
||||||
title: 'Sponsor Submission Form', // Editing Sponsorship
|
title: 'Sponsor Form', // Editing Sponsorship
|
||||||
position: '', // default is "items-center"
|
position: '', // default is "items-center"
|
||||||
|
|
||||||
response: (r: boolean | undefined) => handle_modal_close(r)
|
response: (r: boolean | undefined) => handle_modal_close(r)
|
||||||
@@ -333,72 +333,74 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<section class="ae_sponsorships md:container h-full mx-auto">
|
<section class="ae_events_speakers md:container h-full mx-auto flex flex-col items-center space-y-4">
|
||||||
<div class="space-y-10 flex flex-col">
|
|
||||||
|
|
||||||
<h1 class="h1 text-center">
|
<header>
|
||||||
<!-- Æ - Sponsorships -->
|
<h1 class="h1 text-center">
|
||||||
Sponsors Hub
|
<!-- Æ - Sponsorships -->
|
||||||
</h1>
|
Sponsor Hub
|
||||||
<section>
|
</h1>
|
||||||
<button
|
</header>
|
||||||
class="btn variant-ghost-primary"
|
|
||||||
on:click={() => {
|
|
||||||
// $ae_loc.mod.sponsorships.show_edit__sponsorship_obj = true;
|
|
||||||
$slct.sponsorship_id = null;
|
|
||||||
$slct.sponsorship_obj = null;
|
|
||||||
|
|
||||||
// modalStore.trigger(modal_edit__sponsorship_obj);
|
<section>
|
||||||
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = true;
|
<button
|
||||||
$slct_trigger = 'show_edit__sponsorship_obj';
|
class="btn variant-ghost-primary"
|
||||||
}}
|
on:click={() => {
|
||||||
>
|
// $ae_loc.mod.sponsorships.show_edit__sponsorship_obj = true;
|
||||||
<span class="fas fa-edit mx-1"></span>
|
$slct.sponsorship_id = null;
|
||||||
Start Sponsor Submission Form
|
$slct.sponsorship_obj = null;
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- <button
|
// modalStore.trigger(modal_edit__sponsorship_obj);
|
||||||
on:click={() => {
|
$ae_loc.mod.sponsorships.show_edit__sponsorship_obj = true;
|
||||||
console.log('Open drawer');
|
$slct_trigger = 'show_edit__sponsorship_obj';
|
||||||
drawerStore.open(drawer_settings_x);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<span class="fas fa-edit mx-1"></span>
|
||||||
Open Drawer X
|
Start Sponsor Submission Form
|
||||||
</button> -->
|
</button>
|
||||||
|
|
||||||
<!-- <button
|
<!-- <button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
console.log('Open drawer');
|
console.log('Open drawer');
|
||||||
drawerStore.open(drawer_settings_y);
|
drawerStore.open(drawer_settings_x);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Open Drawer Y
|
Open Drawer X
|
||||||
</button> -->
|
</button> -->
|
||||||
|
|
||||||
<!-- <button
|
<!-- <button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
console.log('Open drawer');
|
console.log('Open drawer');
|
||||||
drawerStore.open(drawer_settings_edit);
|
drawerStore.open(drawer_settings_y);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Open Drawer Edit
|
Open Drawer Y
|
||||||
</button> -->
|
</button> -->
|
||||||
</section>
|
|
||||||
|
<!-- <button
|
||||||
|
on:click={() => {
|
||||||
|
console.log('Open drawer');
|
||||||
|
drawerStore.open(drawer_settings_edit);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Open Drawer Edit
|
||||||
|
</button> -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="sponsorships_list ae_h_scrollfix">
|
||||||
|
{#await ae_sponsorship_obj_li_get_promise}
|
||||||
|
<div class="modal-loading">
|
||||||
|
<span class="fas fa-spinner fa-spin"></span>
|
||||||
|
<span class="loading-text">
|
||||||
|
Loading...
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{/await}
|
||||||
|
{#if $slct.sponsorship_obj_li && $ae_loc.mod.sponsorships.show_list__sponsorship_obj_li}
|
||||||
|
<List_sponsorship_obj />
|
||||||
|
{/if}
|
||||||
|
</section>
|
||||||
|
|
||||||
<section class="sponsorships_list">
|
|
||||||
{#await ae_sponsorship_obj_li_get_promise}
|
|
||||||
<div class="modal-loading">
|
|
||||||
<span class="fas fa-spinner fa-spin"></span>
|
|
||||||
<span class="loading-text">
|
|
||||||
Loading...
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{/await}
|
|
||||||
{#if $slct.sponsorship_obj_li && $ae_loc.mod.sponsorships.show_list__sponsorship_obj_li}
|
|
||||||
<List_sponsorship_obj />
|
|
||||||
{/if}
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,10 +45,49 @@ if ($slct.sponsorship_id) {
|
|||||||
console.log(`Sponsorship object selected:`, $slct.sponsorship_obj);
|
console.log(`Sponsorship object selected:`, $slct.sponsorship_obj);
|
||||||
|
|
||||||
$slct_trigger = 'load__sponsorship_obj';
|
$slct_trigger = 'load__sponsorship_obj';
|
||||||
|
} else {
|
||||||
|
$store_current_tab = 'start';
|
||||||
|
|
||||||
|
$slct.sponsorship_id = null;
|
||||||
|
$slct.sponsorship_obj = {
|
||||||
|
sponsorship_cfg_id_random: $ae_loc.mod.sponsorships.cfg_id,
|
||||||
|
|
||||||
|
name: null,
|
||||||
|
description: null,
|
||||||
|
|
||||||
|
poc_person_id: null,
|
||||||
|
|
||||||
|
logo_li_json: null,
|
||||||
|
media_li_json: null,
|
||||||
|
|
||||||
|
questions_li_json: {},
|
||||||
|
|
||||||
|
social_li_json: null,
|
||||||
|
|
||||||
|
guest_li_json: null,
|
||||||
|
|
||||||
|
level_num: '',
|
||||||
|
level_str: null,
|
||||||
|
amount: null,
|
||||||
|
paid: null,
|
||||||
|
enable: null,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let ae_promises: key_val = {}; // Promise<any>;
|
||||||
|
|
||||||
|
$ae_sess.mod.sponsorships.submit_status = null;
|
||||||
|
$ae_sess.mod.sponsorships.disable_submit__sponsorship_obj = false;
|
||||||
|
let placeholder_li: key_val = {
|
||||||
|
file_logo_primary: '-- No File Selected --',
|
||||||
|
file_logo_light: '-- No File Selected --',
|
||||||
|
file_logo_dark: '-- No File Selected --',
|
||||||
|
file_media_promo_video: '-- No File Selected --',
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
console.log('** Component Mounted: ** View Modal - Sponsorship Obj');
|
console.log('** Component Mounted: ** Edit Modal - Sponsorship Obj');
|
||||||
|
|
||||||
if ($slct.sponsorship_id && $ae_loc.href_url) {
|
if ($slct.sponsorship_id && $ae_loc.href_url) {
|
||||||
// $ae_loc.mod.sponsorships.link = `${$ae_loc.href_url}/load?sponsorship_id=${$slct.sponsorship_id}`;
|
// $ae_loc.mod.sponsorships.link = `${$ae_loc.href_url}/load?sponsorship_id=${$slct.sponsorship_id}`;
|
||||||
@@ -88,48 +127,6 @@ onMount(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
let ae_promises: key_val = {}; // Promise<any>;
|
|
||||||
|
|
||||||
$ae_sess.mod.sponsorships.submit_status = null;
|
|
||||||
$ae_sess.mod.sponsorships.disable_submit__sponsorship_obj = false;
|
|
||||||
let placeholder_li: key_val = {
|
|
||||||
file_logo_primary: '-- No File Selected --',
|
|
||||||
file_logo_light: '-- No File Selected --',
|
|
||||||
file_logo_dark: '-- No File Selected --',
|
|
||||||
file_media_promo_video: '-- No File Selected --',
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($slct.sponsorship_id) {
|
|
||||||
console.log(`Sponsorship ID selected: ${$slct.sponsorship_id}`);
|
|
||||||
console.log(`Sponsorship object selected:`, $slct.sponsorship_obj);
|
|
||||||
} else {
|
|
||||||
$store_current_tab = 'start';
|
|
||||||
|
|
||||||
$slct.sponsorship_id = null;
|
|
||||||
$slct.sponsorship_obj = {
|
|
||||||
sponsorship_cfg_id_random: $ae_loc.mod.sponsorships.cfg_id,
|
|
||||||
|
|
||||||
name: null,
|
|
||||||
description: null,
|
|
||||||
|
|
||||||
poc_person_id: null,
|
|
||||||
|
|
||||||
logo_li_json: null,
|
|
||||||
media_li_json: null,
|
|
||||||
|
|
||||||
questions_li_json: {},
|
|
||||||
|
|
||||||
social_li_json: null,
|
|
||||||
|
|
||||||
guest_li_json: null,
|
|
||||||
|
|
||||||
level_num: '',
|
|
||||||
level_str: null,
|
|
||||||
amount: null,
|
|
||||||
paid: null,
|
|
||||||
enable: null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$: if ($slct.sponsorship_obj) {
|
$: if ($slct.sponsorship_obj) {
|
||||||
@@ -492,24 +489,25 @@ async function handle_submit_form(event) {
|
|||||||
if ($store_current_tab == 'start' && $slct.sponsorship_id) {
|
if ($store_current_tab == 'start' && $slct.sponsorship_id) {
|
||||||
$store_current_tab = 'marketing';
|
$store_current_tab = 'marketing';
|
||||||
|
|
||||||
// If level is above 1 then they can go to the exhibits tab.
|
// If level is 2 or above then they can go to the exhibits tab.
|
||||||
} else if ($store_current_tab == 'marketing' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num > 1) {
|
} else if ($store_current_tab == 'marketing' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num >= 2) {
|
||||||
$store_current_tab = 'exhibit';
|
$store_current_tab = 'exhibit';
|
||||||
|
|
||||||
} else if ($store_current_tab == 'marketing' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num == 1) {
|
} else if ($store_current_tab == 'marketing' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num == 1) {
|
||||||
$store_current_tab = 'files';
|
$store_current_tab = 'files';
|
||||||
|
|
||||||
// If level is above 2 then they can go to the sessions tab.
|
// If level is 3 or above then they can go to the sessions tab.
|
||||||
} else if ($store_current_tab == 'exhibit' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num > 2) {
|
} else if ($store_current_tab == 'exhibit' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num >= 3) {
|
||||||
$store_current_tab = 'sessions';
|
$store_current_tab = 'sessions';
|
||||||
|
|
||||||
} else if ($store_current_tab == 'exhibit' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num <= 2) {
|
// All levels can go to the files tab.
|
||||||
|
} else if ($store_current_tab == 'exhibit' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num) {
|
||||||
$store_current_tab = 'files';
|
$store_current_tab = 'files';
|
||||||
|
|
||||||
} else if ($store_current_tab == 'sessions') {
|
} else if ($store_current_tab == 'sessions' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num) {
|
||||||
$store_current_tab = 'files';
|
$store_current_tab = 'files';
|
||||||
|
|
||||||
} else if ($store_current_tab == 'files') {
|
} else if ($store_current_tab == 'files' && $slct.sponsorship_id && $slct.sponsorship_obj.level_num) {
|
||||||
$store_current_tab = 'guests';
|
$store_current_tab = 'guests';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -733,9 +731,10 @@ async function handle_update__sponsorship({
|
|||||||
{#if $modalStore[0]}
|
{#if $modalStore[0]}
|
||||||
<div class="svelte_component ae_edit_modal ae_obj__sponsorship {container_class_li}">
|
<div class="svelte_component ae_edit_modal ae_obj__sponsorship {container_class_li}">
|
||||||
<header class={parent.regionHeader}>
|
<header class={parent.regionHeader}>
|
||||||
{$modalStore[0].title ?? '-- No Title --'}:
|
<h2>{$modalStore[0].title ?? '-- No Title --'}:
|
||||||
{$slct.sponsorship_obj.level_str}
|
{$slct.sponsorship_obj.level_str ?? '-- Please Select Level --'}
|
||||||
({$slct.sponsorship_obj.level_num})
|
<!-- ({$slct.sponsorship_obj.level_num}) -->
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
{#await ae_promises.update__sponsorship_obj}
|
{#await ae_promises.update__sponsorship_obj}
|
||||||
@@ -841,7 +840,7 @@ async function handle_update__sponsorship({
|
|||||||
Marketing
|
Marketing
|
||||||
</Tab>
|
</Tab>
|
||||||
<!-- Exhibit Level 2 and above -->
|
<!-- Exhibit Level 2 and above -->
|
||||||
{#if $slct.sponsorship_obj.level_num > 1}
|
{#if $slct.sponsorship_obj.level_num >= 2}
|
||||||
<Tab bind:group={$store_current_tab} name="tab_exhibit" value={'exhibit'} disabled={!$slct.sponsorship_id || $slct.sponsorship_obj.level_num < 2}
|
<Tab bind:group={$store_current_tab} name="tab_exhibit" value={'exhibit'} disabled={!$slct.sponsorship_id || $slct.sponsorship_obj.level_num < 2}
|
||||||
regionTab={!$slct.sponsorship_id || $slct.sponsorship_obj.level_num < 2 ? 'text-slate-400' : ''}
|
regionTab={!$slct.sponsorship_id || $slct.sponsorship_obj.level_num < 2 ? 'text-slate-400' : ''}
|
||||||
>
|
>
|
||||||
@@ -854,7 +853,7 @@ async function handle_update__sponsorship({
|
|||||||
Exhibitor Info
|
Exhibitor Info
|
||||||
</Tab>
|
</Tab>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $slct.sponsorship_obj.level_num > 2}
|
{#if $slct.sponsorship_obj.level_num >= 3}
|
||||||
<Tab bind:group={$store_current_tab} name="tab_session" value={'sessions'} disabled={!$slct.sponsorship_id || $slct.sponsorship_obj.level_num < 3}>
|
<Tab bind:group={$store_current_tab} name="tab_session" value={'sessions'} disabled={!$slct.sponsorship_id || $slct.sponsorship_obj.level_num < 3}>
|
||||||
<svelte:fragment slot="lead">
|
<svelte:fragment slot="lead">
|
||||||
{#if $slct.sponsorship_obj.questions_li_json && ($slct.sponsorship_obj.questions_li_json.virtual_session || $slct.sponsorship_obj.questions_li_json.virtual_session === 0)}
|
{#if $slct.sponsorship_obj.questions_li_json && ($slct.sponsorship_obj.questions_li_json.virtual_session || $slct.sponsorship_obj.questions_li_json.virtual_session === 0)}
|
||||||
@@ -865,6 +864,7 @@ async function handle_update__sponsorship({
|
|||||||
Session Info
|
Session Info
|
||||||
</Tab>
|
</Tab>
|
||||||
{/if}
|
{/if}
|
||||||
|
<!-- All levels with some restrictions within the section -->
|
||||||
<Tab bind:group={$store_current_tab} name="tab_files" value={'files'} disabled={!$slct.sponsorship_id}
|
<Tab bind:group={$store_current_tab} name="tab_files" value={'files'} disabled={!$slct.sponsorship_id}
|
||||||
regionTab={!$slct.sponsorship_id ? 'text-slate-400' : ''}
|
regionTab={!$slct.sponsorship_id ? 'text-slate-400' : ''}
|
||||||
>
|
>
|
||||||
@@ -968,7 +968,7 @@ async function handle_update__sponsorship({
|
|||||||
<span class="fas fa-check-circle"></span>
|
<span class="fas fa-check-circle"></span>
|
||||||
<span class="ae_value">Yes, marked as paid</span>
|
<span class="ae_value">Yes, marked as paid</span>
|
||||||
{:else}
|
{:else}
|
||||||
<p class="variant-glass-error">Deadline to complete payment: April 15th, 2024</p>
|
<p class="variant-glass-error max-w-96">Deadline to complete payment: April 15, 2024</p>
|
||||||
|
|
||||||
<!-- <p>Return to the <a href="https://preconvirtual.com/chow-2024-faq/#Sponsorship">CHOW Sponsor Hub for Payment Options and Instruction</a> details.</p> -->
|
<!-- <p>Return to the <a href="https://preconvirtual.com/chow-2024-faq/#Sponsorship">CHOW Sponsor Hub for Payment Options and Instruction</a> details.</p> -->
|
||||||
<p>Please refer to the sponsorship
|
<p>Please refer to the sponsorship
|
||||||
@@ -1447,6 +1447,7 @@ async function handle_update__sponsorship({
|
|||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
{#if $slct.sponsorship_obj.level_num >= 4}
|
||||||
<h3 class="h4 input_required">Social Media & Email Inclusion</h3>
|
<h3 class="h4 input_required">Social Media & Email Inclusion</h3>
|
||||||
<label for="q_social_email" class="label">
|
<label for="q_social_email" class="label">
|
||||||
<div>Would you like social and email inclusion at CHOW?</div>
|
<div>Would you like social and email inclusion at CHOW?</div>
|
||||||
@@ -1476,7 +1477,9 @@ async function handle_update__sponsorship({
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{#if $slct.sponsorship_obj.level_num >= 6}
|
||||||
<h3 class="h4 input_required">Dedicated Social Promos</h3>
|
<h3 class="h4 input_required">Dedicated Social Promos</h3>
|
||||||
<label for="q_dedicated_promos" class="label">
|
<label for="q_dedicated_promos" class="label">
|
||||||
<div>Would you like dedicated social media promotions at CHOW?</div>
|
<div>Would you like dedicated social media promotions at CHOW?</div>
|
||||||
@@ -1506,6 +1509,7 @@ async function handle_update__sponsorship({
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
@@ -1783,6 +1787,7 @@ async function handle_update__sponsorship({
|
|||||||
|
|
||||||
<section class="space-y-4">
|
<section class="space-y-4">
|
||||||
<h2 class="h3">Logos</h2>
|
<h2 class="h3">Logos</h2>
|
||||||
|
|
||||||
<Element_data_store
|
<Element_data_store
|
||||||
ds_code="sponsorships__form__logos_info_html"
|
ds_code="sponsorships__form__logos_info_html"
|
||||||
ds_type="html"
|
ds_type="html"
|
||||||
@@ -1790,19 +1795,8 @@ async function handle_update__sponsorship({
|
|||||||
for_id={$slct.sponsorship_cfg_id}
|
for_id={$slct.sponsorship_cfg_id}
|
||||||
ds_name="Default: Sponsorships Form - Logos Information HTML"
|
ds_name="Default: Sponsorships Form - Logos Information HTML"
|
||||||
display="block"
|
display="block"
|
||||||
class_li=""
|
class_li="hidden"
|
||||||
/>
|
/>
|
||||||
<!-- <div class="text-sm">
|
|
||||||
<p>Add your logo here. Your logo will be used throughout Capitol Hill Ocean Week.</p>
|
|
||||||
|
|
||||||
<div>Recommend specs:
|
|
||||||
<ul class="list-disc list-inside">
|
|
||||||
<li>High resolution image</li>
|
|
||||||
<li>Most image types: PNG, WEBP, SVG, JPG, Illustrator, etc</li>
|
|
||||||
<li>Max file size: 20 MB</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="flex flex-wrap gap-4">
|
<div class="flex flex-wrap gap-4">
|
||||||
|
|
||||||
@@ -1816,7 +1810,7 @@ async function handle_update__sponsorship({
|
|||||||
padding="p-1"
|
padding="p-1"
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
class="w-96 variant-glass-warning"
|
class="w-96 variant-glass-warning"
|
||||||
required={!placeholder_li.file_logo_primary}
|
required={!$slct.sponsorship_obj.logo_li_json}
|
||||||
on:change={(e) => {
|
on:change={(e) => {
|
||||||
console.log('*** FileDropzone change event ***', e);
|
console.log('*** FileDropzone change event ***', e);
|
||||||
|
|
||||||
@@ -1829,7 +1823,7 @@ async function handle_update__sponsorship({
|
|||||||
>
|
>
|
||||||
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></span></svelte:fragment>
|
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></span></svelte:fragment>
|
||||||
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
||||||
<svelte:fragment slot="meta">Image file types only (PNG, WEBP, JPG, etc)</svelte:fragment>
|
<svelte:fragment slot="meta">High resolution and vector image files only<br>(PNG, WEBP, SVG, JPG, Illustrator, etc)</svelte:fragment>
|
||||||
</FileDropzone>
|
</FileDropzone>
|
||||||
</label>
|
</label>
|
||||||
{@html placeholder_li.file_logo_primary}
|
{@html placeholder_li.file_logo_primary}
|
||||||
@@ -1857,7 +1851,7 @@ async function handle_update__sponsorship({
|
|||||||
>
|
>
|
||||||
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></span></svelte:fragment>
|
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></span></svelte:fragment>
|
||||||
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
||||||
<svelte:fragment slot="meta">Image file types only (PNG, WEBP, JPG, etc)</svelte:fragment>
|
<svelte:fragment slot="meta">High resolution and vector image files only<br>(PNG, WEBP, SVG, JPG, Illustrator, etc)</svelte:fragment>
|
||||||
</FileDropzone>
|
</FileDropzone>
|
||||||
</label>
|
</label>
|
||||||
{@html placeholder_li.file_logo_light}
|
{@html placeholder_li.file_logo_light}
|
||||||
@@ -1885,7 +1879,7 @@ async function handle_update__sponsorship({
|
|||||||
>
|
>
|
||||||
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></span></svelte:fragment>
|
<svelte:fragment slot="lead"><span class="fas fa-file-upload"></span></svelte:fragment>
|
||||||
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
<svelte:fragment slot="message"><strong>Upload your file</strong> (drag and drop)</svelte:fragment>
|
||||||
<svelte:fragment slot="meta">Image file types only (PNG, WEBP, JPG, etc)</svelte:fragment>
|
<svelte:fragment slot="meta">High resolution and vector image files only<br>(PNG, WEBP, SVG, JPG, Illustrator, etc)</svelte:fragment>
|
||||||
</FileDropzone>
|
</FileDropzone>
|
||||||
</label>
|
</label>
|
||||||
{@html placeholder_li.file_logo_dark}
|
{@html placeholder_li.file_logo_dark}
|
||||||
@@ -1974,19 +1968,19 @@ async function handle_update__sponsorship({
|
|||||||
|
|
||||||
<h2 class="h3">Ocean Awards Gala Guests</h2>
|
<h2 class="h3">Ocean Awards Gala Guests</h2>
|
||||||
<div class="text-sm space-y-4">
|
<div class="text-sm space-y-4">
|
||||||
<p>These are the guests that will be attending the Ocean Awards Gala. The maximum number is based on your currently selected sponsorship level.</p>
|
<!-- These are the guests that will be attending the Ocean Awards Gala. -->
|
||||||
{#if $slct.sponsorship_obj.level_num == 0}
|
{#if $slct.sponsorship_obj.level_num < 1}
|
||||||
<p class="variant-glass-error">Please select a sponsorship level before adding guests.</p>
|
<p class="variant-glass-error">Please select a sponsorship level before adding guests.</p>
|
||||||
{:else}
|
{:else}
|
||||||
<p class="">Included in your sponsorship are <strong>{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num]} seats (
|
<p class="">Included in your sponsorship are <strong>{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num]} seats (
|
||||||
{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num] == 4 ? 'half table' : ''}
|
{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num] == 4 ? 'half table' : ''}
|
||||||
{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num] == 8 ? 'one table' : ''}
|
{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num] == 8 ? 'one table' : ''}
|
||||||
{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num] == 16 ? 'two tables' : ''}
|
{$ae_loc.mod.sponsorships.level_guest_max_li[$slct.sponsorship_obj.level_num] == 16 ? 'two tables' : ''}
|
||||||
)</strong> at the 2024 Oceans Award Gala.</p>
|
)</strong> at the 2024 Oceans Award Gala. The maximum number is based on your currently selected sponsorship level.</p>
|
||||||
<p>
|
<p>
|
||||||
Submit RSVPs below. You will have the opportunity to add names at a later date.
|
Submit RSVPs below. You will have the opportunity to add and update names at a later date.
|
||||||
</p>
|
</p>
|
||||||
<p class="variant-glass-error">Deadline to submit RSVPs is May 15, 2024.</p>
|
<p class="variant-glass-error max-w-96">Deadline to submit RSVPs is May 15, 2024.</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -2076,7 +2070,18 @@ async function handle_update__sponsorship({
|
|||||||
</label>
|
</label>
|
||||||
<label for="guest_{index}_family_name" class="label max-w-64">
|
<label for="guest_{index}_family_name" class="label max-w-64">
|
||||||
<!-- Family name -->
|
<!-- Family name -->
|
||||||
<input type="text" class="input text-xs" id="guest_{index}_family_name" name="guest_{index}_family_name" placeholder="Last name" value={guest.family_name ?? ''} autocomplete="name">
|
<input
|
||||||
|
type="text"
|
||||||
|
class="input text-xs variant-glass-warning"
|
||||||
|
|
||||||
|
id="guest_{index}_family_name"
|
||||||
|
name="guest_{index}_family_name"
|
||||||
|
placeholder="Last name"
|
||||||
|
value={guest.family_name ?? ''}
|
||||||
|
autocomplete="off"
|
||||||
|
required
|
||||||
|
class:variant-soft-error={!guest.family_name}
|
||||||
|
>
|
||||||
</label>
|
</label>
|
||||||
<label for="guest_{index}_title" class="label max-w-64">
|
<label for="guest_{index}_title" class="label max-w-64">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { ae_util } from '$lib/ae_utils';
|
|||||||
// import { ae } from 'aether_npm_lib';
|
// import { ae } from 'aether_npm_lib';
|
||||||
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';
|
||||||
|
|
||||||
export let container_class_li = [];
|
export let class_li: string = '';
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
console.log('** Component Mounted: ** List - Sponsorships Obj');
|
console.log('** Component Mounted: ** List - Sponsorships Obj');
|
||||||
@@ -18,7 +18,7 @@ onMount(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<section class="svelte_component ae_section ae_list list__sponsorship_obj sponsorship_obj_li {container_class_li.join(' ')} ae_h_scrollfix">
|
<section class="svelte_component ae_section ae_list list__sponsorship_obj sponsorship_obj_li {class_li} ae_h_scrollfix">
|
||||||
{#if $slct.sponsorship_obj_li}
|
{#if $slct.sponsorship_obj_li}
|
||||||
<table class="table table-compact table-hover">
|
<table class="table table-compact table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
7
tests/.directory
Normal file
7
tests/.directory
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[Dolphin]
|
||||||
|
Timestamp=2024,3,7,13,34,34.831
|
||||||
|
Version=4
|
||||||
|
ViewMode=1
|
||||||
|
|
||||||
|
[Settings]
|
||||||
|
HiddenFilesShown=true
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import { expect, test } from '@playwright/test';
|
|
||||||
|
|
||||||
test('index page has expected h1', async ({ page }) => {
|
|
||||||
await page.goto('/');
|
|
||||||
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user