File preview
This commit is contained in:
@@ -360,4 +360,20 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Add event listener for download button
|
||||
const downloadEventsBtn = document.getElementById('downloadEvents');
|
||||
if (downloadEventsBtn) {
|
||||
downloadEventsBtn.addEventListener('click', function() {
|
||||
const eventType = document.getElementById('eventTypeFilter').value;
|
||||
const dateRange = document.getElementById('dateRangeFilter').value;
|
||||
const userId = document.getElementById('userFilter').value;
|
||||
|
||||
// Construct download URL with current filters
|
||||
const downloadUrl = `/settings/events/download?event_type=${eventType}&date_range=${dateRange}&user_id=${userId}`;
|
||||
|
||||
// Trigger download
|
||||
window.location.href = downloadUrl;
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user