feat: add 'Przypisany do' field to exported projects and update filename format

This commit is contained in:
2025-10-14 13:07:33 +02:00
parent d9e559982a
commit a1b9c05673

View File

@@ -31,7 +31,8 @@ async function exportProjectsHandler(req) {
'Adres': project.address || '',
'Działka': project.plot || '',
'WP': project.wp || '',
'Data zakończenia': project.finish_date || ''
'Data zakończenia': project.finish_date || '',
'Przypisany do': project.assigned_to_initial || ''
});
return acc;
}, {});
@@ -60,7 +61,7 @@ async function exportProjectsHandler(req) {
const buffer = XLSX.write(workbook, { type: 'buffer', bookType: 'xlsx' });
// Generate filename with current date
const filename = `projects_export_${new Date().toISOString().split('T')[0]}.xlsx`;
const filename = `eksport_projekty_${new Date().toISOString().split('T')[0]}.xlsx`;
// Log the export action
await logApiActionSafe(