cleaned up and commented excel print
This commit is contained in:
@@ -1,27 +1,27 @@
|
|||||||
// javascript for production
|
// javascript for production
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["./src/*"],
|
|
||||||
"^/*": ["./public/*"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// typescript for local development
|
|
||||||
// {
|
// {
|
||||||
// "compilerOptions": {
|
// "compilerOptions": {
|
||||||
// "jsx": "react-jsx",
|
|
||||||
// "noUnusedLocals": true,
|
|
||||||
// "noImplicitAny": false,
|
|
||||||
// "checkJs": true,
|
|
||||||
// "allowJs": true,
|
|
||||||
// "strict": true,
|
|
||||||
// "baseUrl": ".",
|
|
||||||
// "paths": {
|
// "paths": {
|
||||||
// "@/*": ["./src/*"],
|
// "@/*": ["./src/*"],
|
||||||
// "^/*": ["./public/*"]
|
// "^/*": ["./public/*"]
|
||||||
// }
|
// }
|
||||||
// },
|
// }
|
||||||
// "exclude": ["node_modules"]
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// typescript for local development
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"checkJs": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"strict": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"],
|
||||||
|
"^/*": ["./public/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Controller } from "react-hook-form";
|
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import React from "react";
|
|
||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
|
import { Controller } from "react-hook-form";
|
||||||
|
|
||||||
const FromDateController = ({ control }) => {
|
const FromDateController = ({ control }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { Button, Grid, LinearProgress, Typography } from "@mui/material";
|
|
||||||
import SearchIcon from "@mui/icons-material/Search";
|
import SearchIcon from "@mui/icons-material/Search";
|
||||||
import React from "react";
|
import { Button, Grid } from "@mui/material";
|
||||||
import FromDateController from "./FromDateController";
|
|
||||||
import ToDateController from "./ToDateController";
|
|
||||||
import SelectProvince from "./SelectProvince";
|
|
||||||
import { Controller } from "react-hook-form";
|
import { Controller } from "react-hook-form";
|
||||||
|
import FromDateController from "./FromDateController";
|
||||||
|
import SelectProvince from "./SelectProvince";
|
||||||
|
import ToDateController from "./ToDateController";
|
||||||
|
|
||||||
const SearchReportField = ({ control, hasProvincesPermission }) => {
|
const SearchReportField = ({ control, hasProvincesPermission }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { Controller } from "react-hook-form";
|
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
|
||||||
import React from "react";
|
|
||||||
import { FormControl, FormHelperText, InputLabel, LinearProgress, MenuItem, Select, Typography } from "@mui/material";
|
|
||||||
import useProvinces from "@/lib/hooks/useProvince";
|
import useProvinces from "@/lib/hooks/useProvince";
|
||||||
|
import { FormControl, FormHelperText, InputLabel, MenuItem, Select } from "@mui/material";
|
||||||
|
import { Controller } from "react-hook-form";
|
||||||
|
|
||||||
const SelectProvince = ({ control }) => {
|
const SelectProvince = ({ control }) => {
|
||||||
const { provinces, loadingProvinces, errorProvinces } = useProvinces();
|
const { provinces, loadingProvinces, errorProvinces } = useProvinces();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Controller, useWatch } from "react-hook-form";
|
|
||||||
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
import MuiDatePicker from "@/core/components/MuiDatePicker";
|
||||||
import React from "react";
|
|
||||||
import moment from "jalali-moment";
|
import moment from "jalali-moment";
|
||||||
|
import { Controller, useWatch } from "react-hook-form";
|
||||||
|
|
||||||
const ToDateController = ({ control }) => {
|
const ToDateController = ({ control }) => {
|
||||||
const minDate = useWatch({ control, name: "from_date" });
|
const minDate = useWatch({ control, name: "from_date" });
|
||||||
@@ -13,6 +12,7 @@ const ToDateController = ({ control }) => {
|
|||||||
<MuiDatePicker
|
<MuiDatePicker
|
||||||
name="date_to"
|
name="date_to"
|
||||||
minDate={minDate}
|
minDate={minDate}
|
||||||
|
maxDate={new Date()}
|
||||||
error={!!error}
|
error={!!error}
|
||||||
value={value}
|
value={value}
|
||||||
label={"تاریخ شروع (تا تاریخ)"}
|
label={"تاریخ شروع (تا تاریخ)"}
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ import PrintExcel from "./ExcelPrint";
|
|||||||
import { Box } from "@mui/material";
|
import { Box } from "@mui/material";
|
||||||
|
|
||||||
const Toolbar = ({ table, filterData, mutate }) => {
|
const Toolbar = ({ table, filterData, mutate }) => {
|
||||||
return (
|
return <Box sx={{ display: "flex", gap: 1 }}>{/* <PrintExcel table={table} filterData={filterData} /> */}</Box>;
|
||||||
<Box sx={{ display: "flex", gap: 1 }}>
|
|
||||||
<PrintExcel table={table} filterData={filterData} />
|
|
||||||
</Box>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
export default Toolbar;
|
export default Toolbar;
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ const ReportPage = () => {
|
|||||||
resolver: yupResolver(validationSchema),
|
resolver: yupResolver(validationSchema),
|
||||||
mode: "all",
|
mode: "all",
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack spacing={1}>
|
<Stack spacing={1}>
|
||||||
<PageTitle title={"کارتابل گزارش ماموریت"} />
|
<PageTitle title={"کارتابل گزارش ماموریت"} />
|
||||||
|
|||||||
@@ -159,15 +159,15 @@ export const pageMenu = [
|
|||||||
// badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
// badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
||||||
permissions: ["all"],
|
permissions: ["all"],
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// id: "roadMissionsReports",
|
id: "roadMissionsReports",
|
||||||
// label: "گزارشات",
|
label: "گزارشات",
|
||||||
// type: "page",
|
type: "page",
|
||||||
// route: "/dashboard/road-missions/reports",
|
route: "/dashboard/road-missions/reports",
|
||||||
// icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||||
// // badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
// badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
||||||
// permissions: ["all"],
|
permissions: ["all"],
|
||||||
// },
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -158,15 +158,15 @@ export const pageMenuDev = [
|
|||||||
// badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
// badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
||||||
permissions: ["all"],
|
permissions: ["all"],
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// id: "roadMissionsReports",
|
id: "roadMissionsReports",
|
||||||
// label: "گزارشات",
|
label: "گزارشات",
|
||||||
// type: "page",
|
type: "page",
|
||||||
// route: "/dashboard/road-missions/reports",
|
route: "/dashboard/road-missions/reports",
|
||||||
// icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
icon: <AssessmentIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||||
// // badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
// badges: [{ key: "mission.control" }], // TODO: add badge and permission
|
||||||
// permissions: ["all"],
|
permissions: ["all"],
|
||||||
// },
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user