From 36b48b925758340e4a6113b9edd709d3db8f6170 Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:35:42 +0700 Subject: [PATCH] feat: set default file name on export --- src/modules/reports/report-export/report-export.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/reports/report-export/report-export.service.ts b/src/modules/reports/report-export/report-export.service.ts index 41034ea..ab7c764 100644 --- a/src/modules/reports/report-export/report-export.service.ts +++ b/src/modules/reports/report-export/report-export.service.ts @@ -98,14 +98,15 @@ export class ReportExportService extends BaseReportService { (_, i) => i * limit, ); - const fileName = `${fName ?? config.label} (${Number(new Date())})`; + const defaultFileName = fName ?? config.label; + const fileName = `${defaultFileName} (${Number(new Date())})`; const exportHistory = { id: undefined, group_name: config.group_name, unique_name: config.unique_name, label: config.label, - file_name: fName, + file_name: defaultFileName, file_url: null, total_data: totalRow, processing_data: 0,