feat: add 'Przypisany do' field to exported projects and update filename format
This commit is contained in:
@@ -31,7 +31,8 @@ async function exportProjectsHandler(req) {
|
|||||||
'Adres': project.address || '',
|
'Adres': project.address || '',
|
||||||
'Działka': project.plot || '',
|
'Działka': project.plot || '',
|
||||||
'WP': project.wp || '',
|
'WP': project.wp || '',
|
||||||
'Data zakończenia': project.finish_date || ''
|
'Data zakończenia': project.finish_date || '',
|
||||||
|
'Przypisany do': project.assigned_to_initial || ''
|
||||||
});
|
});
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
@@ -60,7 +61,7 @@ async function exportProjectsHandler(req) {
|
|||||||
const buffer = XLSX.write(workbook, { type: 'buffer', bookType: 'xlsx' });
|
const buffer = XLSX.write(workbook, { type: 'buffer', bookType: 'xlsx' });
|
||||||
|
|
||||||
// Generate filename with current date
|
// 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
|
// Log the export action
|
||||||
await logApiActionSafe(
|
await logApiActionSafe(
|
||||||
|
|||||||
Reference in New Issue
Block a user