diff --git a/src/components/dashboard/reports/ExcelExport/index.jsx b/src/components/dashboard/reports/ExcelExport/index.jsx
index 2ab8e35..f095cc7 100644
--- a/src/components/dashboard/reports/ExcelExport/index.jsx
+++ b/src/components/dashboard/reports/ExcelExport/index.jsx
@@ -1,6 +1,7 @@
import {Accordion, AccordionDetails, AccordionSummary, Box, Button, Stack, Typography} from "@mui/material";
import FileUploadIcon from '@mui/icons-material/FileUpload';
import AssignmentIcon from '@mui/icons-material/Assignment';
+import BackupIcon from '@mui/icons-material/Backup';
import {useTranslations} from "next-intl";
import ProvinceFilter from "@/components/dashboard/reports/Filter/ProvinceFilter";
import YearFilter from "@/components/dashboard/reports/Filter/YearFilter";
@@ -10,6 +11,7 @@ import {GET_EXPORT} from "@/core/data/apiRoutes";
import moment from "jalali-moment";
import FileSaver from 'file-saver';
import useRequest from "@/lib/app/hooks/useRequest";
+import {periodOfYear} from "@/core/utils/yearPeriodFinder";
const ExcelExport = () => {
const t = useTranslations();
@@ -31,8 +33,8 @@ const ExcelExport = () => {
...(filter_by_province && {
province_id: filter_by_province.multiple ? [] : ""
}),
- from_date: "",
- to_date: ""
+ from_date: periodOfYear(moment().format('jYYYY')).from,
+ to_date: periodOfYear(moment().format('jYYYY')).to
}, onSubmit: (values, {setSubmitting}) => {
const province = values.province_id;
const fields = [
@@ -50,6 +52,7 @@ const ExcelExport = () => {
const queryString = fields.length !== 0
? `?${fields.map((option) => `${option.key}=${option.value}`).join('&')}`
: '';
+ setSubmitting(true)
requestServer(`${GET_EXPORT}${queryString}`, 'GET', {auth: true, requestOptions: {responseType: 'blob'}})
.then((response) => {
const filename = `گزارش درخواست های وام ناوگان تاریخ_${moment().format('jYYYY_jMM_jDD')}.xlsx`;
@@ -97,6 +100,7 @@ const ExcelExport = () => {
diff --git a/src/components/dashboard/reports/LoanProgress/index.jsx b/src/components/dashboard/reports/LoanProgress/index.jsx
index 0c7bf11..a516d04 100644
--- a/src/components/dashboard/reports/LoanProgress/index.jsx
+++ b/src/components/dashboard/reports/LoanProgress/index.jsx
@@ -1,9 +1,10 @@
-import {Box, CircularProgress, Grid, Paper, Typography} from "@mui/material";
+import {Grid, Paper, Typography} from "@mui/material";
import BarChart from "./BarChart";
import Filter from "../Filter";
import {useTranslations} from "next-intl";
import useChart from "@/lib/app/hooks/useChart";
import {GET_PROVINCE_PROGRESS} from "@/core/data/apiRoutes";
+import LoadingHardPage from "@/core/components/LoadingHardPage";
const LoanProgress = () => {
const t = useTranslations();
@@ -21,21 +22,12 @@ const LoanProgress = () => {
{isLoadingReportList ? (
-
-
-
- {t("reports.loading_fetching_reports")}
-
-
- ) : errorReportList ? (
+ //
+
+ ) : errorReportList ? (
{t("reports.error_fetching_reports")}
) : (