Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
gudusol committed Oct 29, 2024
2 parents bf1e95f + fe995ac commit 3bef7f2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pages/Admin/components/OrderTable/OrderTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,19 @@ const OrderTable = ({ orders }: OrderTableProps) => {
});

// 엑셀 파일로 다운로드
const date = new Date();
const fileName = `택배송장_${date.getFullYear()}-${(date.getMonth() + 1)
.toString()
.padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}_${date
.getHours()
.toString()
.padStart(2, "0")}-${date.getMinutes().toString().padStart(2, "0")}.xlsx`;

const blob = new Blob([excelBuffer], { type: "application/octet-stream" });
const url = window.URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = url;
link.download = "export.xlsx";
link.download = fileName;
link.click();

handleModalClose();
Expand Down

0 comments on commit 3bef7f2

Please sign in to comment.