(
+
+
+
+ )}
+ />
+ );
+};
+export default FastReactCode;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/GetItemInfo/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/GetItemInfo/index.jsx
new file mode 100644
index 0000000..3b3b513
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/GetItemInfo/index.jsx
@@ -0,0 +1,153 @@
+import PersianTextField from "@/core/components/PersianTextField";
+import SelectBox from "@/core/components/SelectBox";
+import StyledForm from "@/core/components/StyledForm";
+import { missionCategoryTypes } from "@/core/utils/missionCategoryTypes";
+import { missionRegions } from "@/core/utils/missionRegions";
+import { yupResolver } from "@hookform/resolvers/yup";
+import { ExitToApp } from "@mui/icons-material";
+import { Box, Button, DialogActions, DialogContent, Grid, Stack } from "@mui/material";
+import { Controller, useForm } from "react-hook-form";
+import { object, string } from "yup";
+import FastReactCode from "./FastReactCode";
+
+const validationSchema = object({
+ explanation: string().required("موضوع را مشخص کنید!"),
+ end_point: string().required("مقصد را مشخص کنید!"),
+ region: string().required("محور ماموریت را مشخص کنید!"),
+ category_id: string().required("نوع ماموریت را مشخص کنید!"),
+ road_observed_id: string().when("category_id", {
+ is: "3",
+ then: (schema) => schema.required("کد یکتا شکایت را مشخص کنید!"),
+ otherwise: (schema) => schema.notRequired(),
+ }),
+});
+
+const GetItemInfo = ({ allData, setAllData, handlePrev, setTabState }) => {
+ const defaultValues = {
+ explanation: allData.explanation,
+ end_point: allData.end_point,
+ region: allData.region,
+ category_id: allData.category_id,
+ road_observed_id: allData.road_observed_id,
+ };
+
+ const { control, handleSubmit } = useForm({
+ defaultValues,
+ resolver: yupResolver(validationSchema),
+ mode: "all",
+ });
+
+ const handleNext = (data) => {
+ setAllData(data);
+ setTabState((s) => s + 1);
+ };
+
+ return (
+
+
+
+
+
+
+ (
+
+ )}
+ />
+
+
+ (
+
+ )}
+ />
+
+
+ (
+
+ )}
+ />
+
+
+
+
+
+ {
+ return (
+
+ );
+ }}
+ />
+
+
+
+
+
+
+ }
+ >
+ {"بستن"}
+
+
+
+
+ );
+};
+export default GetItemInfo;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/DriversSearch/Form/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/DriversSearch/Form/index.jsx
new file mode 100644
index 0000000..93bb1d6
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/DriversSearch/Form/index.jsx
@@ -0,0 +1,61 @@
+import RahdarNameOrCode from "@/core/components/RahdarNameOrCode";
+import StyledForm from "@/core/components/StyledForm";
+import { yupResolver } from "@hookform/resolvers/yup";
+import { Done } from "@mui/icons-material";
+import { Button, Stack } from "@mui/material";
+import { Controller, useForm } from "react-hook-form";
+import { object } from "yup";
+
+const schema = object().shape({
+ rahdar: object().required("همراه الزامی است."),
+});
+const DriverForm = ({ setDriver, setOpenDriversDialog }) => {
+ const defaultValues = {
+ rahdar: null,
+ };
+
+ const {
+ control,
+ handleSubmit,
+ formState: { isSubmitting, isValid },
+ } = useForm({ defaultValues, resolver: yupResolver(schema), mode: "all" });
+
+ const submit = (data) => {
+ setDriver(data.rahdar);
+ setOpenDriversDialog(false);
+ };
+
+ return (
+
+
+
+ {
+ return (
+ field.onChange(value)}
+ error={error}
+ multiple={false}
+ />
+ );
+ }}
+ name={"rahdar"}
+ />
+
+ }
+ >
+ انتخاب
+
+
+
+ );
+};
+export default DriverForm;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/DriversSearch/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/DriversSearch/index.jsx
new file mode 100644
index 0000000..b7136c9
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/DriversSearch/index.jsx
@@ -0,0 +1,11 @@
+import { DialogContent } from "@mui/material";
+import DriverForm from "./Form";
+
+const DriversSearch = ({ setDriver, setOpenDriversDialog }) => {
+ return (
+
+
+
+ );
+};
+export default DriversSearch;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/index.jsx
new file mode 100644
index 0000000..3c1d406
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/DriversDialog/index.jsx
@@ -0,0 +1,41 @@
+import { Close, Edit } from "@mui/icons-material";
+import { Button, Dialog, DialogTitle, IconButton } from "@mui/material";
+import { useState } from "react";
+import DriversSearch from "./DriversSearch";
+
+const DriversDialog = ({ setDriver, mode }) => {
+ const [openDriversDialog, setOpenDriversDialog] = useState(false);
+ return (
+ <>
+ {mode == "edit" ? (
+ setOpenDriversDialog(true)} size="small">
+
+
+ ) : (
+
+ )}
+
+ >
+ );
+};
+export default DriversDialog;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/RowActions/Allocate/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/RowActions/Allocate/index.jsx
new file mode 100644
index 0000000..f03579a
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/RowActions/Allocate/index.jsx
@@ -0,0 +1,20 @@
+import { Done } from "@mui/icons-material";
+import { IconButton, Tooltip } from "@mui/material";
+
+const Allocate = ({ row, setMachine, setOpenMachinesDialog }) => {
+ const handleClick = () => {
+ setMachine(row.original);
+ setOpenMachinesDialog(false);
+ };
+
+ return (
+ <>
+
+
+
+
+
+ >
+ );
+};
+export default Allocate;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/RowActions/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/RowActions/index.jsx
new file mode 100644
index 0000000..bcfcc03
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/RowActions/index.jsx
@@ -0,0 +1,6 @@
+import Allocate from "./Allocate";
+
+const RowActions = ({ row, setMachine, setOpenMachinesDialog }) => {
+ return ;
+};
+export default RowActions;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/index.jsx
new file mode 100644
index 0000000..e070b01
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/MachineList/index.jsx
@@ -0,0 +1,68 @@
+import DataTableWithAuth from "@/core/components/DataTableWithAuth";
+import { Box } from "@mui/material";
+import { useMemo } from "react";
+import RowActions from "./RowActions";
+import { GET_MACHINES_TABLE_LIST } from "@/core/utils/routes";
+
+const MachinesList = ({ machineType, setMachine, setOpenMachinesDialog }) => {
+ const columns = useMemo(
+ () => [
+ {
+ accessorKey: "machine_code",
+ header: "کد خودرو",
+ id: "machine_code",
+ enableColumnFilter: true,
+ datatype: "text",
+ filterMode: "equals",
+ columnFilterModeOptions: ["equals", "contains"],
+ grow: false,
+ size: 100,
+ },
+ {
+ accessorKey: "car_name",
+ header: "نام خودرو",
+ id: "car_name",
+ enableColumnFilter: true,
+ datatype: "text",
+ filterMode: "equals",
+ columnFilterModeOptions: ["equals", "contains"],
+ grow: false,
+ size: 100,
+ },
+ {
+ accessorKey: "car_type",
+ header: "نوع خودرو",
+ id: "car_type",
+ enableColumnFilter: false,
+ datatype: "text",
+ filterMode: "equals",
+ columnFilterModeOptions: ["equals", "contains"],
+ grow: false,
+ size: 100,
+ },
+ ],
+ []
+ );
+
+ return (
+ <>
+
+ (
+
+ )}
+ />
+
+ >
+ );
+};
+export default MachinesList;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/index.jsx
new file mode 100644
index 0000000..a422439
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/MachinesDialog/index.jsx
@@ -0,0 +1,43 @@
+import { Close, Edit } from "@mui/icons-material";
+import { Button, Dialog, IconButton } from "@mui/material";
+import { useState } from "react";
+import MachinesList from "./MachineList";
+
+const MachinesDialog = ({ setMachine, mode }) => {
+ const [openMachinesDialog, setOpenMachinesDialog] = useState(false);
+ return (
+ <>
+ {mode == "edit" ? (
+ setOpenMachinesDialog(true)} size="small">
+
+
+ ) : (
+
+ )}
+
+ >
+ );
+};
+export default MachinesDialog;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/index.jsx
new file mode 100644
index 0000000..d8f8ea0
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/MachineAndDriver/index.jsx
@@ -0,0 +1,82 @@
+import { Box, Button, Chip, DialogActions, DialogContent, Divider, Stack, Typography } from "@mui/material";
+import DriversDialog from "./DriversDialog";
+import MachinesDialog from "./MachinesDialog";
+import { useState } from "react";
+
+const MachineAndDriver = ({ setTabState, allData, setAllData, handlePrev }) => {
+ const [machine, setMachine] = useState(allData.machine);
+ const [driver, setDriver] = useState(allData.driver);
+
+ const handleNext = (data) => {
+ setAllData(data);
+ setTabState((s) => s + 1);
+ };
+
+
+ return (
+ <>
+
+
+
+
+ {machine ? (
+ <>
+ خودرو
+
+
+
+
+ >
+ ) : (
+
+ )}
+
+ {machine && (
+
+ {driver ? (
+ <>
+ راننده
+
+
+
+
+ >
+ ) : (
+
+ )}
+
+ )}
+
+
+
+
+
+
+
+ >
+ )
+}
+export default MachineAndDriver
\ No newline at end of file
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/Form/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/Form/index.jsx
new file mode 100644
index 0000000..a4449fe
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/Form/index.jsx
@@ -0,0 +1,66 @@
+import RahdarNameOrCode from "@/core/components/RahdarNameOrCode";
+import StyledForm from "@/core/components/StyledForm";
+import { yupResolver } from "@hookform/resolvers/yup";
+import { Add } from "@mui/icons-material";
+import { Button, Stack } from "@mui/material";
+import { Controller, useForm } from "react-hook-form";
+import { object } from "yup";
+
+const schema = object().shape({
+ rahdar: object().required("همراه الزامی است."),
+});
+const RahdaranForm = ({ setRahdaran }) => {
+ const defaultValues = {
+ rahdar: null,
+ };
+
+ const {
+ control,
+ handleSubmit,
+ reset,
+ formState: { isSubmitting, isValid },
+ } = useForm({ defaultValues, resolver: yupResolver(schema), mode: "all" });
+
+ const submit = (data) => {
+ setRahdaran((prev) => {
+ const alreadyExists = prev.some((r) => r.id === data.rahdar.id);
+ if (alreadyExists) return prev;
+ return [...prev, data.rahdar];
+ });
+ reset();
+ };
+
+ return (
+
+
+
+ {
+ return (
+ field.onChange(value)}
+ error={error}
+ multiple={false}
+ />
+ );
+ }}
+ name={"rahdar"}
+ />
+
+ }
+ >
+ افزودن همراه
+
+
+
+ );
+};
+export default RahdaranForm;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/List/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/List/index.jsx
new file mode 100644
index 0000000..ebc4edc
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/List/index.jsx
@@ -0,0 +1,56 @@
+import { AccountCircle, Delete } from "@mui/icons-material";
+import { Card, Collapse, IconButton, Stack, Typography } from "@mui/material";
+import { TransitionGroup } from "react-transition-group";
+
+const RahdaranList = ({ rahdaran, setRahdaran }) => {
+ const handleRemove = (index) => {
+ setRahdaran((prev) => prev.filter((_, i) => i !== index));
+ };
+
+ return (
+
+
+ {rahdaran.map((rahdar, index) => (
+
+
+
+
+
+
+ نام و نام خانوادگی:
+ {rahdar.name}
+
+
+ کدملی:
+ {rahdar.code}
+
+
+
+ handleRemove(index)}>
+
+
+
+
+ ))}
+ {rahdaran.length == 0 && (
+
+ همراهی ثبت نشده است
+
+ )}
+
+
+ );
+};
+export default RahdaranList;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/index.jsx
new file mode 100644
index 0000000..af01fe6
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Rahdaran/index.jsx
@@ -0,0 +1,36 @@
+import { Box, Button, Chip, DialogActions, DialogContent, Divider } from "@mui/material";
+import { useCallback, useState } from "react";
+import RahdaranForm from "./Form";
+import RahdaranList from "./List";
+
+const Rahdaran = ({ allData, setAllData, setTabState, handlePrev }) => {
+ const [rahdaran, setRahdaran] = useState(allData.rahdaran);
+
+ const handleNext = useCallback(() => {
+ setAllData({ rahdaran: rahdaran });
+ setTabState((s) => s + 1);
+ }, [rahdaran]);
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+export default Rahdaran;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Verify/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Verify/index.jsx
new file mode 100644
index 0000000..be33cd8
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/Verify/index.jsx
@@ -0,0 +1,133 @@
+import MapLoading from "@/core/components/MapLayer/Loading";
+import { missionCategoryTypes } from "@/core/utils/missionCategoryTypes";
+import { missionRegions } from "@/core/utils/missionRegions";
+import { Box, Button, Chip, DialogActions, DialogContent, Divider, Stack, Typography } from "@mui/material";
+import moment from "jalali-moment";
+import dynamic from "next/dynamic";
+import { useCallback } from "react";
+import ShowBound from "../../../showBound";
+const MapLayer = dynamic(() => import("@/core/components/MapLayer"), {
+ loading: () => ,
+ ssr: false,
+});
+
+const Verify = ({ allData, handlePrev, submitForm, submitting }) => {
+ const handleNext = useCallback(() => {
+ submitForm(allData);
+ }, [allData]);
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ موضوع ماموریت
+
+
+
+
+ محدوده
+
+ r.id == allData.region).name_fa} />
+
+
+ نوع ماموریت
+
+ t.id == allData.category_id).name_fa}
+ />
+
+ {allData.category_id == 3 && (
+
+ کد شکایت
+
+
+
+ )}
+
+ مقصد
+
+
+
+
+ تاریخ شروع ماموریت
+
+
+
+
+ تاریخ پایان ماموریت
+
+
+
+
+
+
+
+
+
+ خودرو
+
+
+
+
+ راننده
+
+
+
+
+
+
+
+
+ {allData.rahdaran.length != 0 ? (
+ allData.rahdaran.map((rahdar) => (
+
+ {rahdar.name}
+
+
+
+ ))
+ ) : (
+
+ همراهی ثبت نشده است
+
+ )}
+
+
+
+
+
+
+
+
+ >
+ );
+};
+export default Verify;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/index.jsx
new file mode 100644
index 0000000..00f9ef1
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/Form/index.jsx
@@ -0,0 +1,125 @@
+import { AccessTime, Engineering, InsertDriveFile, LocalShipping, Route, Verified } from "@mui/icons-material";
+import { Box, Tab, Tabs } from "@mui/material";
+import { useReducer, useState } from "react";
+import Area from "./Area";
+import GetDateTime from "./GetDateTime";
+import GetItemInfo from "./GetItemInfo";
+import Rahdaran from "./Rahdaran";
+import Verify from "./Verify";
+import MachineAndDriver from "./MachineAndDriver";
+
+function TabPanel(props) {
+ const { children, value, index } = props;
+ return (
+
+ {value === index && {children}}
+
+ );
+}
+
+const reducer = (state, action) => {
+ switch (action.type) {
+ case "changeData":
+ return { ...state, ...action.data };
+ default:
+ return state;
+ }
+};
+
+const CreateForm = ({ defaultValues, submitForm, setOpen, submitting }) => {
+ const [allData, dispatch] = useReducer(reducer, defaultValues);
+ const [tabState, setTabState] = useState(0);
+ const handleClose = () => {
+ setOpen(false);
+ };
+ const handleChangeTab = (event, newValue) => {
+ setTabState(newValue);
+ };
+
+ const handlePrev = () => {
+ if (tabState === 0) {
+ handleClose();
+ } else {
+ setTabState((t) => t - 1);
+ }
+ };
+
+ return (
+ <>
+
+ } label="مشخصات" />
+ } label="زمانبندی" />
+ } label="منطقه عملیاتی" />
+ } label="خودرو و راننده" />
+ } label="همراهان" />
+ } label="بررسی نهایی" />
+
+
+ {
+ dispatch({ type: "changeData", data });
+ }}
+ handlePrev={handlePrev}
+ setTabState={setTabState}
+ />
+
+
+ {
+ dispatch({ type: "changeData", data });
+ }}
+ handlePrev={handlePrev}
+ setTabState={setTabState}
+ />
+
+
+ {
+ dispatch({ type: "changeData", data });
+ }}
+ handlePrev={handlePrev}
+ setTabState={setTabState}
+ />
+
+
+ {
+ dispatch({ type: "changeData", data });
+ }}
+ handlePrev={handlePrev}
+ setTabState={setTabState}
+ />
+
+
+ {
+ dispatch({ type: "changeData", data });
+ }}
+ handlePrev={handlePrev}
+ setTabState={setTabState}
+ />
+
+
+
+
+ >
+ );
+};
+export default CreateForm;
diff --git a/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/index.jsx b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/index.jsx
new file mode 100644
index 0000000..0f150ed
--- /dev/null
+++ b/src/components/dashboard/roadMissions/operator/Actions/CreateWithoutProcess/index.jsx
@@ -0,0 +1,121 @@
+import { REQUEST_MISSION_WITHOUT_PROCESS } from "@/core/utils/routes";
+import useRequest from "@/lib/hooks/useRequest";
+import { AddCircle, AddCircleOutline, Close } from "@mui/icons-material";
+import { Button, Dialog, IconButton, useMediaQuery, useTheme } from "@mui/material";
+import moment from "jalali-moment";
+import { useState } from "react";
+import CreateForm from "./Form";
+
+const CreateWithoutProcess = ({ mutate }) => {
+ const [submitting, setSubmitting] = useState(false);
+ const requestServer = useRequest({ notificationSuccess: true });
+ const theme = useTheme();
+ const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
+ const [open, setOpen] = useState(false);
+
+ const handleOpen = () => {
+ setOpen(true);
+ };
+
+ const submitForm = async (result) => {
+ setSubmitting(true);
+ const bound = result.bound.getLatLngs();
+ let area =
+ result.bound_type == "polygon"
+ ? bound.map((ring) => ring.map((latlng) => [latlng.lat, latlng.lng]))[0]
+ : bound.map((latlng) => [latlng.lat, latlng.lng]);
+
+ await requestServer(REQUEST_MISSION_WITHOUT_PROCESS, "post", {
+ data: {
+ explanation: result.explanation,
+ category_id: result.category_id,
+ ...(result.category_id == 3
+ ? {
+ road_observed_id: result.road_observed_id,
+ }
+ : {}),
+ area: {
+ type: result.bound_type,
+ coordinates: area,
+ },
+ ...(result.rahdaran.length != 0 ? { rahdaran: result.rahdaran.map((r) => r.id) } : {}),
+ zone: result.region,
+ end_point: result.end_point,
+ start_date: `${result.start_date} ${moment(result.start_time).format("HH:mm")}`,
+ end_date: `${result.end_date} ${moment(result.end_time).format("HH:mm")}`,
+ machines: [result.machine.id],
+ driver: result.driver.id,
+ },
+ hasSidebarUpdate: true,
+ })
+ .then((response) => {
+ mutate();
+ setOpen(false);
+ })
+ .catch((error) => { })
+ .finally(() => {
+ setSubmitting(false);
+ });
+ };
+
+ return (
+ <>
+ {isMobile ? (
+
+
+
+ ) : (
+ }
+ onClick={handleOpen}
+ >
+ ثبت ماموریت بدون فرایند
+
+ )}
+
+ >
+ );
+};
+export default CreateWithoutProcess;
diff --git a/src/components/dashboard/roadMissions/operator/Toolbar.jsx b/src/components/dashboard/roadMissions/operator/Toolbar.jsx
index 5f49db7..9ddee3a 100644
--- a/src/components/dashboard/roadMissions/operator/Toolbar.jsx
+++ b/src/components/dashboard/roadMissions/operator/Toolbar.jsx
@@ -1,10 +1,12 @@
import { Stack } from "@mui/material";
import Create from "./Actions/Create";
+import CreateWithoutProcess from "./Actions/CreateWithoutProcess";
const Toolbar = ({ table, filterData, mutate }) => {
return (
+
);
};
diff --git a/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx b/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx
index e3e9c3b..4a6f44a 100644
--- a/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx
+++ b/src/components/dashboard/roadMissions/transportation/RowActions/Allocation/Form/index.jsx
@@ -36,7 +36,7 @@ const AllocationForm = ({ row, mutate, setOpenAllocationDialog }) => {
mutate();
setOpenAllocationDialog(false);
})
- .catch((error) => {})
+ .catch((error) => { })
.finally(() => {
setIsSubmitting(false);
});
@@ -93,7 +93,7 @@ const AllocationForm = ({ row, mutate, setOpenAllocationDialog }) => {