refactor(FE-364): Add hyphen before timestamp in export filenames

This commit is contained in:
rstubryan
2025-12-18 13:40:26 +07:00
parent 85fddcb19a
commit 8fb1ccbdce
2 changed files with 2 additions and 2 deletions
@@ -421,7 +421,7 @@ export const generatePurchasesPerSupplierPDF = async (
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = `laporan-pembelian-per-supplier-dicetak-pada${formatDate(new Date(), 'YYYY-MM-DD-HHmm')}.pdf`;
link.download = `laporan-pembelian-per-supplier-dicetak-pada-${formatDate(new Date(), 'YYYY-MM-DD-HHmm')}.pdf`;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
@@ -452,7 +452,7 @@ const PurchasesPerSupplierTab = () => {
}
);
const filename = `laporan-pembelian-per-supplier-dicetak-pada${formatDate(new Date(), 'YYYY-MM-DD-HHmm')}.xlsx`;
const filename = `laporan-pembelian-per-supplier-dicetak-pada-${formatDate(new Date(), 'YYYY-MM-DD-HHmm')}.xlsx`;
XLSX.writeFile(workbook, filename);
toast.success('Excel berhasil dibuat dan diunduh.');