Export now works for Sponsors, Speakers, and Leads

This commit is contained in:
Scott Idem
2024-04-23 17:10:24 -04:00
parent ca04e9739f
commit 2aff1aadbe
3 changed files with 51 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ const modalStore = getModalStore();
import { api } from '$lib/api';
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
import { core_func } from '$lib/ae_core_functions';
import { ae_util } from '$lib/ae_utils';
import type { key_val } from '$lib/ae_stores';
@@ -387,12 +388,14 @@ async function handle_load_ae_obj_id__event_presenter({event_presenter_id, try_c
if (!confirm('Download exported data Excel file?')) {
return false;
}
ae_promises.download__sponsorships_export = spons_func.handle_download_export__sponsorship({
ae_promises.download__events_speakers_export = core_func.handle_download_export__obj_type({
api_cfg: $ae_api,
account_id: $slct.account_id,
get_obj_type: 'event_presenter',
for_obj_type: 'account',
for_obj_id: $slct.account_id,
file_type: 'Excel',
return_file: true,
filename: `lead_retrieval_export_${$ae_loc.account_code.replaceAll(' ', '_')}.xlsx`,
filename: `speakers_export_${$ae_loc.account_code.replaceAll(' ', '_')}.xlsx`,
auto_download: true,
log_lvl: 2
});

View File

@@ -17,6 +17,7 @@ const modalStore = getModalStore();
import { api } from '$lib/api';
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
import { core_func } from '$lib/ae_core_functions';
import { ae_util } from '$lib/ae_utils';
import type { key_val } from '$lib/ae_stores';
import { spons_func } from '$lib/ae_sponsorships_functions';
@@ -404,7 +405,7 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
account_id: $slct.account_id,
file_type: 'Excel',
return_file: true,
filename: `lead_retrieval_export_${$ae_loc.account_code.replaceAll(' ', '_')}.xlsx`,
filename: `sponsors_export_${$ae_loc.account_code.replaceAll(' ', '_')}.xlsx`,
auto_download: true,
log_lvl: 2
});