Improved downloading export files.

This commit is contained in:
Scott Idem
2024-04-23 17:42:44 -04:00
parent 2aff1aadbe
commit 69c1250961
6 changed files with 19 additions and 9 deletions

View File

@@ -397,15 +397,17 @@ async function handle_load_ae_obj_id__sponsorship({sponsorship_id, try_cache=fal
<button
type="button"
on:click={() => {
if (!confirm('Download exported data Excel file?')) {
if (!confirm('Download data exported to an Excel file?')) {
return false;
}
ae_promises.download__sponsorships_export = spons_func.handle_download_export__sponsorship({
ae_promises.download__sponsorships_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: `sponsors_export_${$ae_loc.account_code.replaceAll(' ', '_')}.xlsx`,
filename: `${$ae_loc.account_code}_Sponsor_Hub_export_${ae_util.iso_datetime_formatter()}.xlsx`,
auto_download: true,
log_lvl: 2
});