fix: Create report for pdf and excel
feat: Change design the Application
This commit is contained in:
@@ -7,7 +7,7 @@ import { notifications } from "@mantine/notifications";
|
||||
import dayjs from 'dayjs';
|
||||
import { IconFileSpreadsheet, IconFileText, IconFileTypePdf } from "@tabler/icons-react";
|
||||
import { generatePDF } from "@/app/_components/statement_download/PdfGenerator";
|
||||
import { generateCSV } from "@/app/_components/statement_download/CsvGenerator";
|
||||
import { generateExcel } from "@/app/_components/statement_download/CsvGenerator";
|
||||
import { useMediaQuery } from "@mantine/hooks";
|
||||
|
||||
export default function AccountStatementPage() {
|
||||
@@ -223,17 +223,34 @@ export default function AccountStatementPage() {
|
||||
size={22}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() =>
|
||||
generatePDF(selectedAccNo || "", availableBalance || "0", transactions,
|
||||
generatePDF(
|
||||
selectedAccNo || "",
|
||||
availableBalance || "0",
|
||||
transactions,
|
||||
localStorage.getItem("remitter_name") || "",
|
||||
startDate ? dayjs(startDate).format("DD/MM/YYYY") : "",
|
||||
endDate ? dayjs(endDate).format("DD/MM/YYYY") : "")
|
||||
endDate ? dayjs(endDate).format("DD/MM/YYYY") : "",
|
||||
localStorage.getItem("remitter_branch_no") || "",
|
||||
localStorage.getItem("remitter_cif_no") || "",
|
||||
localStorage.getItem("remitter_address") || ""
|
||||
)
|
||||
}
|
||||
/>
|
||||
<IconFileSpreadsheet
|
||||
size={22}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() =>
|
||||
generateCSV(selectedAccNo || "NA", availableBalance || "0.00", transactions)
|
||||
generateExcel(
|
||||
selectedAccNo || "",
|
||||
availableBalance || "0",
|
||||
transactions,
|
||||
localStorage.getItem("remitter_name") || "",
|
||||
startDate ? dayjs(startDate).format("DD/MM/YYYY") : "",
|
||||
endDate ? dayjs(endDate).format("DD/MM/YYYY") : "",
|
||||
localStorage.getItem("remitter_branch_no") || "",
|
||||
localStorage.getItem("remitter_cif_no") || "",
|
||||
localStorage.getItem("remitter_address") || ""
|
||||
)
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user