update export
This commit is contained in:
@@ -488,14 +488,14 @@ const exportExecutions = () => {
|
|||||||
|
|
||||||
// Crea il CSV manualmente
|
// Crea il CSV manualmente
|
||||||
const headers = Object.keys(dataForExport[0]);
|
const headers = Object.keys(dataForExport[0]);
|
||||||
const csvContent = [headers.join(','), ...dataForExport.map((row) => headers.map((header) => `"${row[header]}"`).join(','))].join('\n');
|
const csvContent = [headers.join(';'), ...dataForExport.map((row) => headers.map((header) => `"${row[header]}"`).join(';'))].join('\n');
|
||||||
|
|
||||||
// Download del file
|
// Download del file
|
||||||
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
link.setAttribute('href', url);
|
link.setAttribute('href', url);
|
||||||
link.setAttribute('download', `executions_${moment().format('YYYY-MM-DD')}.csv`);
|
link.setAttribute('download', `Executions_${moment().format('YYYY-MM-DD_mm-ss')}.csv`);
|
||||||
link.style.visibility = 'hidden';
|
link.style.visibility = 'hidden';
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
link.click();
|
link.click();
|
||||||
|
|||||||
Reference in New Issue
Block a user