first commit. working

This commit is contained in:
2025-06-26 13:09:12 -04:00
parent 86df5c354a
commit 45d8efdce6
14 changed files with 4185 additions and 255 deletions
+13
View File
@@ -0,0 +1,13 @@
export function exportToCsv(filename: string, rows: any[]) {
if (!rows.length) return;
const keys = Object.keys(rows[0]);
const csv = keys.join(',') + '\\n' +
rows.map(r => keys.map(k => JSON.stringify(r[k] || '')).join(',')).join('\\n');
const blob = new Blob([csv], { type: 'text/csv' });
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = filename;
document.body.appendChild(link);
link.click();
link.remove();
}