Adding back in the sponsorship export stuff I was working on... Annoyed.
This commit is contained in:
@@ -66,8 +66,47 @@ async function handle_load_ae_obj_id__sponsorship_cfg(
|
||||
}
|
||||
|
||||
|
||||
async function handle_download_export__sponsorship(
|
||||
{
|
||||
api_cfg,
|
||||
account_id,
|
||||
file_type='CSV', // 'CSV' or 'Excel'
|
||||
return_file=true,
|
||||
filename='no_filename.csv',
|
||||
auto_download=false,
|
||||
params={}, // key value object is expected
|
||||
log_lvl=0
|
||||
} : {
|
||||
api_cfg: any,
|
||||
account_id: string,
|
||||
file_type?: string,
|
||||
return_file?: boolean,
|
||||
filename?: string,
|
||||
auto_download?: boolean,
|
||||
params?: key_val,
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log('*** stores_event_api.js: get_sponsorship_export() ***');
|
||||
|
||||
const endpoint = `/v2/crud/sponsorship/list`;
|
||||
params['for_obj_type'] = 'account';
|
||||
params['for_obj_id'] = account_id;
|
||||
|
||||
if (file_type == 'CSV' || file_type == 'Excel') {
|
||||
params['file_type'] = file_type;
|
||||
}
|
||||
params['return_file'] = true;
|
||||
|
||||
ae_promises.download__sponsorship_export_file = await api.get_object({api_cfg: api_cfg, endpoint: endpoint, params: params, return_blob: return_file, filename: filename, auto_download: auto_download, log_lvl: log_lvl});
|
||||
|
||||
console.log('ae_promises.download__sponsorship_export_file:', ae_promises.download__sponsorship_export_file);
|
||||
return ae_promises.download__sponsorship_export_file;
|
||||
}
|
||||
|
||||
|
||||
let export_obj = {
|
||||
handle_load_ae_obj_id__sponsorship_cfg: handle_load_ae_obj_id__sponsorship_cfg,
|
||||
handle_download_export__sponsorship: handle_download_export__sponsorship,
|
||||
};
|
||||
export let spons_func = export_obj;
|
||||
|
||||
@@ -45,6 +45,8 @@ export let ae_app_local_data_struct: key_val = {
|
||||
'debug': false, // A simple flag to know if we should show debug information.
|
||||
|
||||
'account_id': ae_account_id, // OSIT Demo _XY7DXtc9MY
|
||||
'account_code': 'not_set',
|
||||
'account_name': 'Account Name Not Set',
|
||||
'site_domain': null, // https://example.com, https://dev.example.com, etc.
|
||||
'site_cfg_json': {
|
||||
slct__event_id: null,
|
||||
|
||||
Reference in New Issue
Block a user