General clean up. Improved event search and listing for IDAA.

This commit is contained in:
Scott Idem
2024-10-01 16:08:31 -04:00
parent cca43b957a
commit 47e9f9f5a1
16 changed files with 256 additions and 139 deletions

View File

@@ -30,6 +30,7 @@ export async function load({ params, parent }) { // route
for_obj_type: 'account',
for_obj_id: account_id,
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'},
qry_conference: false,
params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200},
try_cache: true,
log_lvl: log_lvl

View File

@@ -27,14 +27,14 @@ import Comp__event_obj_id_view from './ae_idaa_comp__event_obj_id_view.svelte';
let event_id_random_li: Array<string>;
$: lq__event_obj_li = liveQuery(async () => {
let results = await db_events.events
.where('account_id')
.equals($slct.account_id)
.sortBy('name');
// $: lq__event_obj_li = liveQuery(async () => {
// let results = await db_events.events
// .where('account_id')
// .equals($slct.account_id)
// .sortBy('name');
return results;
});
// return results;
// });
$: lq__event_obj = liveQuery(async () => {
let results = await db_events.events
@@ -75,21 +75,21 @@ $: lq_new__event_obj_li = liveQuery(async () => {
console.log('Trying... HERE!!! END');
});
$: lq_bulk__event_obj_li = liveQuery(async () => {
console.log('Trying... HERE!!! BULK BEGIN');
// $: lq_bulk__event_obj_li = liveQuery(async () => {
// console.log('Trying... HERE!!! BULK BEGIN');
if (event_id_random_li.length) {
console.log(`Trying bulkGet:`, event_id_random_li);
let results = await db_events.events
.bulkGet(event_id_random_li);
// if (event_id_random_li.length) {
// console.log(`Trying bulkGet:`, event_id_random_li);
// let results = await db_events.events
// .bulkGet(event_id_random_li);
return results;
} else {
console.log('Trying... Nothing to load');
return null;
}
console.log('Trying... HERE!!! BULK END');
});
// return results;
// } else {
// console.log('Trying... Nothing to load');
// return null;
// }
// console.log('Trying... HERE!!! BULK END');
// });
</script>
@@ -110,7 +110,7 @@ $: lq_bulk__event_obj_li = liveQuery(async () => {
bind:event_id_random_li={event_id_random_li}
/>
<h1>Recovery Meetings {$lq_new__event_obj_li?.length}</h1>
<!-- <h1>Recovery Meetings {$lq_new__event_obj_li?.length}</h1> -->
<!-- Search results: {$lq_bulk__event_obj_li?.length}? -->
@@ -118,6 +118,8 @@ $: lq_bulk__event_obj_li = liveQuery(async () => {
<Comp__event_obj_li
lq__event_obj_li={lq_new__event_obj_li}
/>
{:else}
<p>No recovery meetings available to show.</p>
{/if}

View File

@@ -19,35 +19,52 @@ onMount(() => {
<section class="svelte_component ae_section ae_list event_obj_li list__event_obj recovery_meeting_list {container_class_li.join(' ')}">
<!-- <h1>Recovery Meetings {$lq__event_obj_li?.length}</h1> -->
{#if $lq__event_obj_li && $lq__event_obj_li.length}
<div class="overflow-auto space-y-2">
<h2 class="h3">
<span class="text-base">
Results:
</span>
{#if $lq__event_obj_li?.length}
<span class="text-3xl font-bold bg-success-100 px-4 border rounded-lg border-success-200"
title="Count {$lq__event_obj_li.length ?? 'None'}"
>
<span class="fas fa-list-ol mx-4"></span>
{$lq__event_obj_li.length ?? 'None'}
</span>
{/if}
</h2>
{#each $lq__event_obj_li as idaa_event_obj, index}
<div
id={`idaa_recovery_meeting_id__${idaa_event_obj.event_id_random}`}
id={`idaa_recovery_meeting_id__${idaa_event_obj?.event_id_random}`}
class="container recovery_meeting ae_object event_obj border border-1 rounded p-2 mb-2"
class:meeting_physical={idaa_event_obj.physical}
class:meeting_virtual={idaa_event_obj.virtual}
class:meeting_physical={idaa_event_obj?.physical}
class:meeting_virtual={idaa_event_obj?.virtual}
>
<header class="ae_header event__header">
<h3>
<span class="event__name">{idaa_event_obj.name}</span>
<span class="event__name">{idaa_event_obj?.name}</span>
<span class="badge badge-info bg-info">
{#if idaa_event_obj.physical && idaa_event_obj.virtual}
{#if idaa_event_obj?.physical && idaa_event_obj?.virtual}
<span class="fas fa-home m-1"></span> F2F and <span class="fas fa-laptop m-1"></span> Virtual
{:else if idaa_event_obj.physical}
{:else if idaa_event_obj?.physical}
<span class="fas fa-home m-1"></span> F2F
{:else if idaa_event_obj.virtual}
{:else if idaa_event_obj?.virtual}
<span class="fas fa-laptop m-1"></span> Virtual
{/if}
</span>
{#if idaa_event_obj.type}
<span class="badge badge-info bg-info"><span class="fas fa-user-md m-1"></span> {idaa_event_obj.type}</span>
{#if idaa_event_obj?.type}
<span class="badge badge-info bg-info"><span class="fas fa-user-md m-1"></span> {idaa_event_obj?.type}</span>
{/if}
{#if $ae_loc.trusted_access && idaa_event_obj.hide}
{#if $ae_loc.trusted_access && idaa_event_obj?.hide}
<span class="badge badge-warning"><span class="fas fa-exclamation-triangle m-1"></span> Hidden</span>
{/if}
{#if $ae_loc.administrator_access && !idaa_event_obj.enable}
{#if $ae_loc.administrator_access && !idaa_event_obj?.enable}
<span class="badge badge-warning"><span class="fas fa-exclamation-triangle m-1"></span> Not enabled</span>
{/if}
</h3>
@@ -56,17 +73,17 @@ onMount(() => {
<div class="ae_options event_obj__options">
<button
on:click={() => {
$idaa_slct.event_id = idaa_event_obj.event_id_random;
$idaa_slct.event_id = idaa_event_obj?.event_id_random;
$idaa_slct.event_obj = idaa_event_obj;
$slct_trigger = 'load__event_obj';
// // handle_load_event_id_obj({event_id: $idaa_slct.event_id, try_cache: false});
// const url = new URL(location);
// url.searchParams.set('event_id', idaa_event_obj.event_id_random);
// url.searchParams.set('event_id', idaa_event_obj?.event_id_random);
// history.pushState({}, '', url);
// let message = {'event_id': idaa_event_obj.event_id_random};
// let message = {'event_id': idaa_event_obj?.event_id_random};
// window.parent.postMessage(message, "*");
$idaa_loc.recovery_meetings.show_main__options = true;
@@ -75,7 +92,7 @@ onMount(() => {
$idaa_loc.recovery_meetings.show_edit__event_obj = false;
}}
class="btn btn-md variant-ghost-primary hover:variant-filled-primary transition"
title={`Open to see details: ${idaa_event_obj.name}`}
title={`Open to see details: ${idaa_event_obj?.name}`}
>
<span class="fas fa-envelope-open m-1"></span>
<!-- <span class="fas fa-info-circle"></span> -->
@@ -83,15 +100,15 @@ onMount(() => {
</button>
<!-- This checks if the currently logged in Novi user has a matching UUID or email address. -->
{#if $ae_loc.trusted_access || idaa_event_obj.external_person_id === $ae_loc.novi_uuid || idaa_event_obj.contact_li_json[0].email === $ae_loc.novi_email}
{#if $ae_loc.trusted_access || idaa_event_obj?.external_person_id === $ae_loc.novi_uuid || idaa_event_obj?.contact_li_json[0].email === $ae_loc.novi_email}
<button
on:click={() => {
$idaa_slct.event_id = idaa_event_obj.event_id_random;
$idaa_slct.event_id = idaa_event_obj?.event_id_random;
$idaa_slct.event_obj = idaa_event_obj;
$slct_trigger = 'load__event_obj';
// const url = new URL(location);
// url.searchParams.set('event_id', idaa_event_obj.event_id_random);
// url.searchParams.set('event_id', idaa_event_obj?.event_id_random);
// history.pushState({}, '', url);
// $idaa_loc.recovery_meetings.show_main__options = true;
@@ -100,7 +117,7 @@ onMount(() => {
$idaa_loc.recovery_meetings.show_edit__event_obj = true;
}}
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition"
title={`Edit meeting: ${idaa_event_obj.name}`}
title={`Edit meeting: ${idaa_event_obj?.name}`}
>
<span class="fas fa-edit m-1"></span>
Edit Meeting
@@ -109,7 +126,7 @@ onMount(() => {
on:click={() => {
// Copy URL to clipboard
// Is there a URL anymore?
// const copy_text = document.getElementById(`meeting_edit_url_${idaa_event_obj.event_id_random}`);
// const copy_text = document.getElementById(`meeting_edit_url_${idaa_event_obj?.event_id_random}`);
}}
class="ae_btn btn_sm btn_outline_info meeting_edit_help"
>
@@ -125,16 +142,16 @@ onMount(() => {
>
<div class="ae_label event__description">Description:</div>
<pre class="ae_value event__description">
{@html idaa_event_obj.description}
{@html idaa_event_obj?.description}
</pre>
</div> -->
<div
class="event__type"
class:ae_d_none={!idaa_event_obj.type}
class:ae_d_none={!idaa_event_obj?.type}
>
<span class="ae_label">Type of Recovery Meeting:</span>
<span class="ae_value">{idaa_event_obj.type}</span>
<span class="ae_value">{idaa_event_obj?.type}</span>
</div>
<div
@@ -144,27 +161,27 @@ onMount(() => {
<span class="fas fa-clock m-1"></span>
When:
</span>
<!-- class:ae_d_none={!idaa_event_obj.timezone} -->
{#if idaa_event_obj.weekday_sunday || idaa_event_obj.weekday_monday || idaa_event_obj.weekday_tuesday || idaa_event_obj.weekday_wednesday || idaa_event_obj.weekday_thursday || idaa_event_obj.weekday_friday || idaa_event_obj.weekday_saturday}
<!-- class:ae_d_none={!idaa_event_obj?.timezone} -->
{#if idaa_event_obj?.weekday_sunday || idaa_event_obj?.weekday_monday || idaa_event_obj?.weekday_tuesday || idaa_event_obj?.weekday_wednesday || idaa_event_obj?.weekday_thursday || idaa_event_obj?.weekday_friday || idaa_event_obj?.weekday_saturday}
<span class="event__weekdays event__recurring_days_of_week">
<!-- <span class="ae_label">Days of week:</span> -->
{#if idaa_event_obj.weekday_sunday}<span class="ae_value">Sunday</span>{/if}
{#if idaa_event_obj.weekday_monday}<span class="ae_value">Monday</span>{/if}
{#if idaa_event_obj.weekday_tuesday}<span class="ae_value">Tuesday</span>{/if}
{#if idaa_event_obj.weekday_wednesday}<span class="ae_value">Wednesday</span>{/if}
{#if idaa_event_obj.weekday_thursday}<span class="ae_value">Thursday</span>{/if}
{#if idaa_event_obj.weekday_friday}<span class="ae_value">Friday</span>{/if}
{#if idaa_event_obj.weekday_saturday}<span class="ae_value">Saturday</span>{/if}
{#if idaa_event_obj?.weekday_sunday}<span class="ae_value">Sunday</span>{/if}
{#if idaa_event_obj?.weekday_monday}<span class="ae_value">Monday</span>{/if}
{#if idaa_event_obj?.weekday_tuesday}<span class="ae_value">Tuesday</span>{/if}
{#if idaa_event_obj?.weekday_wednesday}<span class="ae_value">Wednesday</span>{/if}
{#if idaa_event_obj?.weekday_thursday}<span class="ae_value">Thursday</span>{/if}
{#if idaa_event_obj?.weekday_friday}<span class="ae_value">Friday</span>{/if}
{#if idaa_event_obj?.weekday_saturday}<span class="ae_value">Saturday</span>{/if}
</span>
{/if}
{#if idaa_event_obj.recurring_start_time}
{#if idaa_event_obj?.recurring_start_time}
<!-- <span class="ae_label">Time:</span> -->
<span class="ae_value">{ae_util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj.recurring_start_time}`, 'time_short')}</span>
<span class="ae_value">{ae_util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj?.recurring_start_time}`, 'time_short')}</span>
{/if}
{#if idaa_event_obj.timezone}
{#if idaa_event_obj?.timezone}
<!-- <span class="ae_label">Timezone:</span> -->
(<span class="ae_value">{idaa_event_obj.timezone}</span>)
(<span class="ae_value">{idaa_event_obj?.timezone}</span>)
{:else}
<div class="event__tiemzone ae_warning">Required: No timezone was given!</div>
{/if}
@@ -172,30 +189,30 @@ onMount(() => {
<div class="event__contacts">
{#if idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && idaa_event_obj.contact_li_json[0].full_name}
{#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[0].full_name}
<div class="event__contact"
class:ae_d_none={!idaa_event_obj.contact_li_json[0].full_name}
class:ae_d_none={!idaa_event_obj?.contact_li_json[0].full_name}
>
<span class="ae_label">
<span class="fas fa-user m-1"></span> Contact:
</span>
{idaa_event_obj.contact_li_json[0].full_name}
{#if idaa_event_obj.contact_li_json[0].email}
| <a href="mailto:{idaa_event_obj.contact_li_json[0].email}?Subject={idaa_event_obj.full_name}">{idaa_event_obj.contact_li_json[0].email}</a>
{idaa_event_obj?.contact_li_json[0].full_name}
{#if idaa_event_obj?.contact_li_json[0].email}
| <a href="mailto:{idaa_event_obj?.contact_li_json[0].email}?Subject={idaa_event_obj?.full_name}">{idaa_event_obj?.contact_li_json[0].email}</a>
{/if}
{#if idaa_event_obj.contact_li_json[0].phone_mobile}
{#if idaa_event_obj?.contact_li_json[0].phone_mobile}
<span class="ae_label">| Mobile:</span>
<a href="tel:{idaa_event_obj.contact_li_json[0].phone_mobile}">{idaa_event_obj.contact_li_json[0].phone_mobile}</a>
<a href="tel:{idaa_event_obj?.contact_li_json[0].phone_mobile}">{idaa_event_obj?.contact_li_json[0].phone_mobile}</a>
{/if}
{#if idaa_event_obj.contact_li_json[0].phone_home}
{#if idaa_event_obj?.contact_li_json[0].phone_home}
<span class="ae_label">| Home:</span>
<a href="tel:{idaa_event_obj.contact_li_json[0].phone_home}">{idaa_event_obj.contact_li_json[0].phone_home}</a>
<a href="tel:{idaa_event_obj?.contact_li_json[0].phone_home}">{idaa_event_obj?.contact_li_json[0].phone_home}</a>
{/if}
{#if idaa_event_obj.contact_li_json[0].phone_office}
{#if idaa_event_obj?.contact_li_json[0].phone_office}
<span class="ae_label">| Office:</span>
<a href="tel:{idaa_event_obj.contact_li_json[0].phone_office}">{idaa_event_obj.contact_li_json[0].phone_office}</a>
<a href="tel:{idaa_event_obj?.contact_li_json[0].phone_office}">{idaa_event_obj?.contact_li_json[0].phone_office}</a>
{/if}
{#if idaa_event_obj.contact_li_json[0].other_text}| {idaa_event_obj.contact_li_json[0].other_text}{/if}
{#if idaa_event_obj?.contact_li_json[0].other_text}| {idaa_event_obj?.contact_li_json[0].other_text}{/if}
</div>
{:else}
{#if $ae_loc.trusted_access}
@@ -206,37 +223,37 @@ onMount(() => {
{/if}
{/if}
{#if idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && idaa_event_obj.contact_li_json[1].full_name}
{#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[1].full_name}
<div class="event__contact"
class:ae_d_none={!idaa_event_obj.contact_li_json[1].full_name}
class:ae_d_none={!idaa_event_obj?.contact_li_json[1].full_name}
>
<span class="ae_label">
<span class="fas fa-user m-1"></span> Contact:
</span>
{idaa_event_obj.contact_li_json[1].full_name}
{#if idaa_event_obj.contact_li_json[1].email}
| <a href="mailto:{idaa_event_obj.contact_li_json[1].email}?Subject={idaa_event_obj.full_name}">{idaa_event_obj.contact_li_json[1].email}</a>
{idaa_event_obj?.contact_li_json[1].full_name}
{#if idaa_event_obj?.contact_li_json[1].email}
| <a href="mailto:{idaa_event_obj?.contact_li_json[1].email}?Subject={idaa_event_obj?.full_name}">{idaa_event_obj?.contact_li_json[1].email}</a>
{/if}
{#if idaa_event_obj.contact_li_json[1].phone_mobile}
{#if idaa_event_obj?.contact_li_json[1].phone_mobile}
<span class="ae_label">| Mobile:</span>
<a href="tel:{idaa_event_obj.contact_li_json[1].phone_mobile}">{idaa_event_obj.contact_li_json[1].phone_mobile}</a>
<a href="tel:{idaa_event_obj?.contact_li_json[1].phone_mobile}">{idaa_event_obj?.contact_li_json[1].phone_mobile}</a>
{/if}
{#if idaa_event_obj.contact_li_json[1].phone_home}
{#if idaa_event_obj?.contact_li_json[1].phone_home}
<span class="ae_label">| Home:</span>
<a href="tel:{idaa_event_obj.contact_li_json[1].phone_home}">{idaa_event_obj.contact_li_json[1].phone_home}</a>
<a href="tel:{idaa_event_obj?.contact_li_json[1].phone_home}">{idaa_event_obj?.contact_li_json[1].phone_home}</a>
{/if}
{#if idaa_event_obj.contact_li_json[1].phone_office}
{#if idaa_event_obj?.contact_li_json[1].phone_office}
<span class="ae_label">| Office:</span>
<a href="tel:{idaa_event_obj.contact_li_json[1].phone_office}">{idaa_event_obj.contact_li_json[1].phone_office}</a>
<a href="tel:{idaa_event_obj?.contact_li_json[1].phone_office}">{idaa_event_obj?.contact_li_json[1].phone_office}</a>
{/if}
{#if idaa_event_obj.contact_li_json[0].other_text}| {idaa_event_obj.contact_li_json[0].other_text}{/if}
{#if idaa_event_obj?.contact_li_json[0].other_text}| {idaa_event_obj?.contact_li_json[0].other_text}{/if}
</div>
{/if}
{#if $ae_loc.trusted_access}
{#if (idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && !idaa_event_obj.contact_li_json[0].full_name)}
{#if (idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && !idaa_event_obj?.contact_li_json[0].full_name)}
<div class="event__contact ae_warning">Required: No primary contact information was found!</div>
{/if}
{#if !idaa_event_obj.external_person_id}
{#if !idaa_event_obj?.external_person_id}
<div class="event__contact ae_warning">Warning: Not linked to a Novi record!</div>
{/if}
{/if}
@@ -266,26 +283,29 @@ onMount(() => {
<span
class="event__created_on"
>
Created on: {ae_util.iso_datetime_formatter(idaa_event_obj.created_on, 'datetime_short')}
Created on: {ae_util.iso_datetime_formatter(idaa_event_obj?.created_on, 'datetime_short')}
</span>
<span
class="event__updated_on"
class:ae_d_none={!idaa_event_obj.updated_on}
class:ae_d_none={!idaa_event_obj?.updated_on}
>
Updated on: {ae_util.iso_datetime_formatter(idaa_event_obj.updated_on, 'datetime_short')}
Updated on: {ae_util.iso_datetime_formatter(idaa_event_obj?.updated_on, 'datetime_short')}
</span>
</div>
</section>
{/if}
</div>
{/each}
</div>
{:else}
<div class="space-y-2">
{#if $idaa_loc.recovery_meetings.qry_status === 'loading'}
<div class="ae_highlight ae_padding_md ae_row ae_flex_justify_center"><Spinner class="me-3" /> Loading...</div>
{:else}
<div class="ae_highlight ae_padding_md ae_row ae_flex_justify_center"> No recovery meetings avalible to show. The search may need to be changed.</div>
<div class="ae_highlight ae_padding_md ae_row ae_flex_justify_center"> No recovery meetings available to show. The search may need to be changed.</div>
{/if}
</div>
{/if}
</section>

View File

@@ -7,6 +7,7 @@ import { Spinner } from 'flowbite-svelte';
import type { key_val } from '$lib/ae_stores';
import { ae_util } from '$lib/ae_utils/ae_utils';
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
import { core_func } from '$lib/ae_core_functions';
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
import { events_func } from '$lib/ae_events_functions';
@@ -15,6 +16,7 @@ export let event_id_random_li: Array<string>;
// export let container_class_li = [];
let ae_promises: key_val = {};
let ae_tmp: key_val = {};
let ae_trigger: any = null;
let ae_triggers: key_val = {};
@@ -57,7 +59,7 @@ async function handle_search__event(
params = {
'qry__enabled': $idaa_loc.recovery_meetings.qry_enabled ?? 'enabled',
'qry__hidden': $idaa_loc.recovery_meetings.qry_hidden ?? 'not_hidden',
'qry__limit': $idaa_loc.recovery_meetings.qry_limit__events ?? 35,
'qry__limit': $idaa_loc.recovery_meetings.qry_limit ?? 35,
},
try_cache=false,
log_lvl=1,
@@ -111,6 +113,7 @@ async function handle_search__event(
api_cfg: $ae_api,
for_obj_type: 'account',
for_obj_id: $ae_loc.account_id,
order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'},
qry_conference: false,
qry_str: lk_search_str,
// type_code: type_code,
@@ -322,6 +325,45 @@ async function handle_search__event(
<div class="ae_group ae_row flex flex-row gap-1 w-full items-center justify-center">
<!-- Max events select options -->
<span
class="flex flex-row gap-1 items-center justify-around"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__events">
Max events:
</label>
<select
id="qry_limit__events"
bind:value={$idaa_loc.recovery_meetings.qry_limit}
on:change={() => {
// search__event_presenter({
// api_cfg: $ae_api,
// event_id: $events_slct.event_id,
// agree: true,
// biography: null,
// ft_search_str: '',
// lk_search_str: '',
// params: {
// 'qry__enabled': 'enabled',
// 'qry__hidden': 'not_hidden',
// 'qry__limit': $idaa_loc.recovery_meetings.qry_limit__events,},
// try_cache: false,
// log_lvl: log_lvl,
// });
}}
class="select w-20 text-sm"
>
<option value={25}>25</option>
<option value={50}>50</option>
<option value={75}>75</option>
<option value={100}>100</option>
<option value={200}>200</option>
<option value={500}>500</option>
</select>
</span>
{#if $ae_loc.trusted_access && !$idaa_loc.recovery_meetings.hidden}
<button
on:click={() => {
@@ -389,6 +431,42 @@ async function handle_search__event(
<span class="fas fa-plus m-1"></span> Create new Meeting
</button>
{#if $ae_loc.trusted_access}
<button
type="button"
on:click={() => {
if (!confirm('Download exported data Excel file?')) {
return false;
}
ae_promises.download__events_speakers_export = core_func.handle_download_export__obj_type({
api_cfg: $ae_api,
get_obj_type: 'event',
for_obj_type: 'account',
for_obj_id: $slct.account_id,
exp_alt: 'idaa',
file_type: 'Excel',
return_file: true,
filename: `${$ae_loc.account_code}_IDAA_Recovery_Meetings_export_${ae_util.iso_datetime_formatter()}.xlsx`,
auto_download: true,
log_lvl: 2
});
}}
class="btn btn-sm variant-ghost-warning w-42 mb-1 export_data_btn text-xs"
title={`Download sponsorship data for ${$ae_loc.account_name}`}
>
{#await ae_promises.download__sponsorship_export}
<span class="fas fa-spinner fa-spin"></span>
<!-- <span class="loading-text">
Downloading...
</span> -->
{:then}
<!-- Done? -->
{/await}
<span class="fas fa-download mx-1"></span> Export All Data
</button>
{/if}
</div>
</section> <!-- END: div filters_and_search -->