Saving my work!
This commit is contained in:
@@ -146,3 +146,4 @@ export async function load({ params, parent, url }) { // route
|
||||
|
||||
// return data_store_obj_get_promise;
|
||||
// }
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,8 @@ import { events_func } from '$lib/ae_events_functions';
|
||||
import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
import Leads_view_lead from './leads_view_lead.svelte';
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
|
||||
// These will likely be used for patch/update triggers. Maybe delete?
|
||||
let ae_triggers: key_val = {
|
||||
priority: {},
|
||||
@@ -155,6 +157,41 @@ let refresh_leads_list = setInterval(function () {
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
if (!confirm('Download exported data Excel file?')) {
|
||||
return false;
|
||||
}
|
||||
ae_promises.download__exhibit_tracking_export = events_func.handle_download_export__event_exhibit_tracking({
|
||||
api_cfg: $ae_api,
|
||||
exhibit_id: $events_slct.exhibit_id,
|
||||
file_type: 'Excel',
|
||||
return_file: true,
|
||||
filename: `lead_retrieval_export_${$events_slct.exhibit_obj.name.replaceAll(' ', '_')}.xlsx`,
|
||||
auto_download: true,
|
||||
log_lvl: 2
|
||||
});
|
||||
|
||||
// get_event_exhibit_tracking_export({ 'event_exhibit_id': $events_slct.exhibit_id, file_type: 'Excel', 'return_file': true, filename: `lead_retrieval_export_${$events_slct.exhibit_obj.name.replaceAll(' ', '_')}.xlsx`, auto_download: true, log_lvl: 2 });
|
||||
// .replace(' ', '_')
|
||||
|
||||
}}
|
||||
disabled={!$events_slct.exhibit_obj.priority}
|
||||
class="btn btn-sm variant-ghost-primary w-48 mb-1 export_data_btn"
|
||||
title={`Download leads data for ${$events_slct.exhibit_obj.name}`}
|
||||
>
|
||||
{#await ae_promises.download__exhibit_tracking_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 Data
|
||||
</button>
|
||||
|
||||
</div> <!-- END: flex flex-row -->
|
||||
|
||||
|
||||
|
||||
@@ -8,12 +8,10 @@ import { onMount } from 'svelte';
|
||||
|
||||
// https://github.com/skeletonlabs/skeleton/blob/master/packages/skeleton/src/lib/utilities/Modal/types.ts
|
||||
// To retrieve the store, getModalStore must be invoked at the top level of your component!
|
||||
import { getDrawerStore, getModalStore, ProgressRadial } from '@skeletonlabs/skeleton';
|
||||
import { getModalStore } from '@skeletonlabs/skeleton';
|
||||
import type {
|
||||
DrawerSettings,
|
||||
ModalSettings,
|
||||
ModalComponent,
|
||||
ModalStore
|
||||
} from '@skeletonlabs/skeleton';
|
||||
const modalStore = getModalStore();
|
||||
|
||||
@@ -26,6 +24,7 @@ import Edit_modal_event_presenter_obj from './10_edit_modal__event_presenter_obj
|
||||
import List_event_presenter_obj from './10_list__event_presenter_obj.svelte';
|
||||
import View_modal_event_presenter_obj from './10_view_modal__event_presenter_obj.svelte';
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
|
||||
// Editing
|
||||
const modalComponentEditEventPresenterObj: ModalComponent = { ref: Edit_modal_event_presenter_obj, props: {container_class_li: 'w-full p-4 space-y-4 card ae_modal_scrollfix'} };
|
||||
@@ -358,7 +357,7 @@ async function handle_load_ae_obj_id__event_presenter({event_presenter_id, try_c
|
||||
<section class="ae_events_speakers md:container h-full mx-auto flex flex-col items-center space-y-4">
|
||||
|
||||
<header>
|
||||
<h1 class="h2">
|
||||
<h1 class="h1 text-center">
|
||||
<!-- Æ - Events: Speakers -->
|
||||
Speaker Hub
|
||||
</h1>
|
||||
@@ -380,6 +379,39 @@ async function handle_load_ae_obj_id__event_presenter({event_presenter_id, try_c
|
||||
<span class="fas fa-edit mx-1"></span>
|
||||
Start Speaker Submission Form
|
||||
</button>
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
if (!confirm('Download exported data Excel file?')) {
|
||||
return false;
|
||||
}
|
||||
ae_promises.download__sponsorships_export = spons_func.handle_download_export__sponsorship({
|
||||
api_cfg: $ae_api,
|
||||
account_id: $slct.account_id,
|
||||
file_type: 'Excel',
|
||||
return_file: true,
|
||||
filename: `lead_retrieval_export_${$ae_loc.account_code.replaceAll(' ', '_')}.xlsx`,
|
||||
auto_download: true,
|
||||
log_lvl: 2
|
||||
});
|
||||
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-primary w-48 mb-1 export_data_btn"
|
||||
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 Data
|
||||
</button>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<section class="events_speakers_list ae_h_scrollfix">
|
||||
|
||||
@@ -8,12 +8,10 @@ import { onMount } from 'svelte';
|
||||
|
||||
// https://github.com/skeletonlabs/skeleton/blob/master/packages/skeleton/src/lib/utilities/Modal/types.ts
|
||||
// To retrieve the store, getModalStore must be invoked at the top level of your component!
|
||||
import { getDrawerStore, getModalStore, ProgressRadial } from '@skeletonlabs/skeleton';
|
||||
import { getModalStore } from '@skeletonlabs/skeleton';
|
||||
import type {
|
||||
DrawerSettings,
|
||||
ModalSettings,
|
||||
ModalComponent,
|
||||
ModalStore
|
||||
} from '@skeletonlabs/skeleton';
|
||||
const modalStore = getModalStore();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user