diff --git a/src/components/dashboard/inspector-expert/Form/ConfirmForm.jsx b/src/components/dashboard/inspector-expert/Form/ConfirmForm.jsx
deleted file mode 100644
index 409ba94..0000000
--- a/src/components/dashboard/inspector-expert/Form/ConfirmForm.jsx
+++ /dev/null
@@ -1,141 +0,0 @@
-import {useTranslations} from "next-intl";
-import {useState} from "react";
-import {
- Button,
- Dialog,
- DialogActions,
- DialogContent,
- DialogTitle,
- IconButton,
- Stack,
- TextField,
- Tooltip,
- Typography
-} from "@mui/material";
-import ThumbUpAltIcon from "@mui/icons-material/ThumbUpAlt";
-import UploadSystem from "@/core/components/UploadSystem";
-import {useFormik} from "formik";
-import UploadFileNotification from "@/core/components/notifications/UploadFileNotification";
-import {CONFIRM_INSPECTOR_EXPERT} from "@/core/data/apiRoutes";
-import useRequest from "@/lib/app/hooks/useRequest";
-import useNotification from "@/lib/app/hooks/useNotification";
-
-
-const Confirm = ({rowId, fetchUrl, mutate}) => {
- const t = useTranslations();
- const [selectedImage, setSelectedImage] = useState("");
- const [fileType, setfileType] = useState(null);
- const [fileName, setfileName] = useState(null);
- const [showAddIcon, setShowAddIcon] = useState(true);
- const [openConfirmDialog, setOpenConfirmDialog] = useState(false);
- const requestServer = useRequest({auth: true})
- const {update_notification} = useNotification()
-
- const formik = useFormik({
- initialValues: {
- description: "",
- confirm_img: null
- },
- onSubmit: (values, {setSubmitting}) => {
- const formData = new FormData();
- if (values.description != "") formData.append("description", values.description);
- if (values.confirm_img != null) formData.append("attachment", values.confirm_img);
-
- requestServer(`${CONFIRM_INSPECTOR_EXPERT}/${rowId}`, 'post', {
- data: formData,
- }).then((response) => {
- mutate(fetchUrl)
- update_notification()
- }).catch(() => {
- }).finally(() => {
- setSubmitting(false);
- });
- },
- });
-
- const handleDescriptionChange = (event) => {
- formik.setFieldValue("description", event.target.value)
- };
- const handleUploadChange = (event) => {
- const uploadedFile = event.target?.files?.[0];
- if (uploadedFile) {
- const maxFileSize = 2 * 1024 * 1024;
- if (uploadedFile.size > maxFileSize) {
- UploadFileNotification(t);
- event.target.value = "";
- return;
- }
-
- const fileType = event.target?.files?.[0].type;
- const fileName = event.target?.files?.[0].name;
- setSelectedImage(URL.createObjectURL(uploadedFile));
- setfileType(fileType);
- setfileName(fileName);
- formik.setFieldValue("confirm_img", uploadedFile);
- setShowAddIcon(false);
- }
- };
- return (
- <>
-
- {
- setOpenConfirmDialog(true)
- }}
- >
-
-
-
-
- >
- );
-};
-export default Confirm;
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/ConfirmForm/ConfirmContent.jsx b/src/components/dashboard/inspector-expert/Form/ConfirmForm/ConfirmContent.jsx
new file mode 100644
index 0000000..195bdda
--- /dev/null
+++ b/src/components/dashboard/inspector-expert/Form/ConfirmForm/ConfirmContent.jsx
@@ -0,0 +1,116 @@
+import UploadSystem from "@/core/components/UploadSystem";
+import useNotification from "@/lib/app/hooks/useNotification";
+import useRequest from "@/lib/app/hooks/useRequest";
+import { Button, DialogActions, DialogContent, Stack, TextField, Typography } from "@mui/material"
+import { useFormik } from "formik";
+import { useTranslations } from "next-intl";
+import {CONFIRM_INSPECTOR_EXPERT} from "@/core/data/apiRoutes";
+import UploadFileNotification from "@/core/components/notifications/UploadFileNotification";
+import { useState } from "react";
+
+const ConfirmContent = ({rowId, fetchUrl, mutate, setOpenConfirmDialog}) => {
+ const t = useTranslations();
+ const [selectedImage, setSelectedImage] = useState("");
+ const [fileType, setfileType] = useState(null);
+ const [fileName, setfileName] = useState(null);
+ const [showAddIcon, setShowAddIcon] = useState(true);
+ const requestServer = useRequest({auth: true})
+ const {update_notification} = useNotification()
+
+ const formik = useFormik({
+ initialValues: {
+ description: "",
+ confirm_img: null
+ },
+ onSubmit: (values, {setSubmitting}) => {
+ const formData = new FormData();
+ if (values.description != "") formData.append("description", values.description);
+ if (values.confirm_img != null) formData.append("attachment", values.confirm_img);
+
+ requestServer(`${CONFIRM_INSPECTOR_EXPERT}/${rowId}`, 'post', {
+ data: formData,
+ }).then((response) => {
+ mutate(fetchUrl)
+ update_notification()
+ }).catch(() => {
+ }).finally(() => {
+ setSubmitting(false);
+ });
+ },
+ });
+
+ const handleDescriptionChange = (event) => {
+ formik.setFieldValue("description", event.target.value)
+ };
+
+ const handleUploadChange = (event) => {
+ const uploadedFile = event.target?.files?.[0];
+ if (uploadedFile) {
+ const maxFileSize = 2 * 1024 * 1024;
+ if (uploadedFile.size > maxFileSize) {
+ UploadFileNotification(t);
+ event.target.value = "";
+ return;
+ }
+
+ const fileType = event.target?.files?.[0].type;
+ const fileName = event.target?.files?.[0].name;
+ setSelectedImage(URL.createObjectURL(uploadedFile));
+ setfileType(fileType);
+ setfileName(fileName);
+ formik.setFieldValue("confirm_img", uploadedFile);
+ setShowAddIcon(false);
+ }
+ };
+
+ return(
+ <>
+
+
+
+
+ {t("ConfirmDialog.description")}{t("ConfirmDialog.optional")}>}
+ value={formik.values.description}
+ onChange={handleDescriptionChange}
+ fullWidth
+ variant="outlined"
+ sx={{mt: 1}}
+ />
+
+
+ {t("UploadSystem.upload_file")}{t("UploadSystem.optional")}
+
+
+
+
+
+
+
+
+ >
+ )
+
+}
+export default ConfirmContent
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/ConfirmForm/index.jsx b/src/components/dashboard/inspector-expert/Form/ConfirmForm/index.jsx
new file mode 100644
index 0000000..3683d82
--- /dev/null
+++ b/src/components/dashboard/inspector-expert/Form/ConfirmForm/index.jsx
@@ -0,0 +1,31 @@
+import { Dialog, DialogTitle, IconButton, Tooltip } from "@mui/material";
+import { useTranslations } from "next-intl";
+import ThumbUpAltIcon from "@mui/icons-material/ThumbUpAlt";
+import { useState } from "react";
+import ConfirmContent from "./ConfirmContent";
+
+const Confirm = ({rowId, fetchUrl, mutate}) => {
+ const t = useTranslations();
+ const [openConfirmDialog, setOpenConfirmDialog] = useState(false);
+ return(
+ <>
+
+ {
+ setOpenConfirmDialog(true)
+ }}
+ >
+
+
+
+
+ >
+ )
+
+}
+export default Confirm;
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/RejectForm.jsx b/src/components/dashboard/inspector-expert/Form/RejectForm.jsx
deleted file mode 100644
index 87f7c47..0000000
--- a/src/components/dashboard/inspector-expert/Form/RejectForm.jsx
+++ /dev/null
@@ -1,148 +0,0 @@
-import {REJECT_INSPECTOR_EXPERT} from "@/core/data/apiRoutes";
-import {
- Button,
- Dialog,
- DialogActions,
- DialogContent,
- DialogTitle,
- IconButton,
- Stack,
- TextField,
- Tooltip,
- Typography,
-} from "@mui/material";
-import {useTranslations} from "next-intl";
-import {useFormik} from "formik";
-import * as Yup from "yup";
-import {useState} from "react";
-import UploadSystem from "@/core/components/UploadSystem";
-import UploadFileNotification from "@/core/components/notifications/UploadFileNotification";
-import useDirection from "@/lib/app/hooks/useDirection";
-import ThumbDownIcon from "@mui/icons-material/ThumbDown";
-import useRequest from "@/lib/app/hooks/useRequest";
-import useNotification from "@/lib/app/hooks/useNotification";
-
-
-const Reject = ({rowId, fetchUrl, mutate}) => {
- const [selectedImage, setSelectedImage] = useState("");
- const [fileType, setfileType] = useState(null);
- const [fileName, setfileName] = useState(null);
- const [showAddIcon, setShowAddIcon] = useState(true);
- const t = useTranslations();
- const {directionApp} = useDirection();
- const [openRejectDialog, setOpenRejectDialog] = useState(false);
- const requestServer = useRequest({auth: true})
- const {update_notification} = useNotification()
-
- const validationSchema = Yup.object().shape({
- description: Yup.string().required(t("RejectDialog.description_error")),
- });
-
- const formik = useFormik({
- initialValues: {
- description: "",
- reject_img: null
- },
- validationSchema,
- onSubmit: (values, {setSubmitting}) => {
- const formData = new FormData();
- formData.append("description", values.description);
- if (values.reject_img != null) formData.append("attachment", values.reject_img);
-
- requestServer(`${REJECT_INSPECTOR_EXPERT}/${rowId}`, 'post', {
- data: formData,
- }).then((response) => {
- mutate(fetchUrl)
- update_notification()
- }).catch(() => {
- }).finally(() => {
- setSubmitting(false);
- });
- },
- });
-
- const handleDescriptionChange = (event) => {
- formik.setFieldValue("description", event.target.value);
- formik.handleChange(event);
- };
- const handleUploadChange = (event) => {
- const uploadedFile = event.target?.files?.[0];
- if (uploadedFile) {
- const maxFileSize = 2 * 1024 * 1024;
- if (uploadedFile.size > maxFileSize) {
- UploadFileNotification(t);
- event.target.value = "";
- return;
- }
- const fileType = event.target?.files?.[0].type;
- const fileName = event.target?.files?.[0].name;
- setSelectedImage(URL.createObjectURL(uploadedFile));
- setfileType(fileType);
- setfileName(fileName);
- formik.setFieldValue("reject_img", uploadedFile);
- setShowAddIcon(false);
- }
- };
- return (
- <>
-
- setOpenRejectDialog(true)}>
-
-
-
-
- >
- );
-};
-export default Reject;
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/RejectForm/RejectContent.jsx b/src/components/dashboard/inspector-expert/Form/RejectForm/RejectContent.jsx
new file mode 100644
index 0000000..1055bab
--- /dev/null
+++ b/src/components/dashboard/inspector-expert/Form/RejectForm/RejectContent.jsx
@@ -0,0 +1,122 @@
+import UploadSystem from "@/core/components/UploadSystem"
+import useNotification from "@/lib/app/hooks/useNotification";
+import useRequest from "@/lib/app/hooks/useRequest";
+import { Button, DialogActions, DialogContent, Stack, TextField, Typography } from "@mui/material"
+import { useFormik } from "formik";
+import { useTranslations } from "next-intl";
+import { useState } from "react";
+import * as Yup from "yup";
+import {REJECT_INSPECTOR_EXPERT} from "@/core/data/apiRoutes";
+
+const RejectContent = ({rowId, fetchUrl, mutate, setOpenRejectDialog}) => {
+ const [selectedImage, setSelectedImage] = useState("");
+ const [fileType, setfileType] = useState(null);
+ const [fileName, setfileName] = useState(null);
+ const [showAddIcon, setShowAddIcon] = useState(true);
+ const t = useTranslations();
+ const requestServer = useRequest({auth: true})
+ const {update_notification} = useNotification()
+
+ const validationSchema = Yup.object().shape({
+ description: Yup.string().required(t("RejectDialog.description_error")),
+ });
+
+ const formik = useFormik({
+ initialValues: {
+ description: "",
+ reject_img: null
+ },
+ validationSchema,
+ onSubmit: (values, {setSubmitting}) => {
+ const formData = new FormData();
+ formData.append("description", values.description);
+ if (values.reject_img != null) formData.append("attachment", values.reject_img);
+
+ requestServer(`${REJECT_INSPECTOR_EXPERT}/${rowId}`, 'post', {
+ data: formData,
+ }).then((response) => {
+ mutate(fetchUrl)
+ update_notification()
+ }).catch(() => {
+ }).finally(() => {
+ setSubmitting(false);
+ });
+ },
+ });
+
+ const handleDescriptionChange = (event) => {
+ formik.setFieldValue("description", event.target.value);
+ formik.handleChange(event);
+ };
+ const handleUploadChange = (event) => {
+ const uploadedFile = event.target?.files?.[0];
+ if (uploadedFile) {
+ const maxFileSize = 2 * 1024 * 1024;
+ if (uploadedFile.size > maxFileSize) {
+ UploadFileNotification(t);
+ event.target.value = "";
+ return;
+ }
+ const fileType = event.target?.files?.[0].type;
+ const fileName = event.target?.files?.[0].name;
+ setSelectedImage(URL.createObjectURL(uploadedFile));
+ setfileType(fileType);
+ setfileName(fileName);
+ formik.setFieldValue("reject_img", uploadedFile);
+ setShowAddIcon(false);
+ }
+ };
+ return(
+ <>
+
+
+
+
+
+
+ {t("UploadSystem.upload_file")}{t("UploadSystem.optional")}
+
+
+
+
+
+
+
+
+ >
+ )
+}
+export default RejectContent
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/RejectForm/index.jsx b/src/components/dashboard/inspector-expert/Form/RejectForm/index.jsx
new file mode 100644
index 0000000..678a842
--- /dev/null
+++ b/src/components/dashboard/inspector-expert/Form/RejectForm/index.jsx
@@ -0,0 +1,25 @@
+import { Dialog, DialogTitle, IconButton, Tooltip } from "@mui/material"
+import { useTranslations } from "next-intl";
+import { useState } from "react";
+import RejectContent from "./RejectContent";
+import ThumbDownIcon from "@mui/icons-material/ThumbDown";
+
+const Reject = ({rowId, fetchUrl, mutate}) => {
+ const t = useTranslations();
+ const [openRejectDialog, setOpenRejectDialog] = useState(false);
+ return (
+ <>
+
+ setOpenRejectDialog(true)}>
+
+
+
+
+ >
+ )
+}
+export default Reject
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/ReviseForm.jsx b/src/components/dashboard/inspector-expert/Form/ReviseForm.jsx
deleted file mode 100644
index b53d8e0..0000000
--- a/src/components/dashboard/inspector-expert/Form/ReviseForm.jsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import {REVISE_INSPECTOR_EXPERT} from "@/core/data/apiRoutes";
-import {
- Button,
- Dialog,
- DialogActions,
- DialogContent,
- DialogTitle,
- IconButton,
- Stack,
- TextField,
- Tooltip,
-} from "@mui/material";
-import {useTranslations} from "next-intl";
-import {useFormik} from "formik";
-import * as Yup from "yup";
-import {useState} from "react";
-import useRequest from "@/lib/app/hooks/useRequest";
-import ReplyIcon from '@mui/icons-material/Reply';
-import useNotification from "@/lib/app/hooks/useNotification";
-
-
-const Revise = ({rowId, fetchUrl, mutate}) => {
- const t = useTranslations();
- const [openRejectDialog, setOpenRejectDialog] = useState(false);
- const requestServer = useRequest({auth: true})
- const {update_notification} = useNotification()
-
- const validationSchema = Yup.object().shape({
- description: Yup.string().required(t("ReviseDialog.description_error")),
- });
-
- const formik = useFormik({
- initialValues: {
- description: "",
- },
- validationSchema,
- onSubmit: (values, {setSubmitting}) => {
- const formData = new FormData();
- formData.append("description", values.description);
-
- requestServer(`${REVISE_INSPECTOR_EXPERT}/${rowId}`, 'post', {
- data: formData,
- }).then((response) => {
- mutate(fetchUrl)
- update_notification()
- }).catch(() => {
- }).finally(() => {
- setSubmitting(false);
- });
- },
- });
-
- const handleDescriptionChange = (event) => {
- formik.setFieldValue("description", event.target.value);
- formik.handleChange(event);
- };
-
- return (
- <>
-
- setOpenRejectDialog(true)}>
-
-
-
-
- >
- );
-};
-export default Revise;
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/ReviseForm/ReviseContent.jsx b/src/components/dashboard/inspector-expert/Form/ReviseForm/ReviseContent.jsx
new file mode 100644
index 0000000..0322572
--- /dev/null
+++ b/src/components/dashboard/inspector-expert/Form/ReviseForm/ReviseContent.jsx
@@ -0,0 +1,80 @@
+import useNotification from "@/lib/app/hooks/useNotification";
+import useRequest from "@/lib/app/hooks/useRequest";
+import { Button, DialogActions, DialogContent, Stack, TextField, Typography } from "@mui/material"
+import { useFormik } from "formik";
+import { useTranslations } from "next-intl";
+import * as Yup from "yup";
+import {REVISE_INSPECTOR_EXPERT} from "@/core/data/apiRoutes";
+
+const ReviseContent = ({rowId, fetchUrl, mutate, setOpenReviseDialog}) => {
+ const t = useTranslations();
+ const requestServer = useRequest({auth: true})
+ const {update_notification} = useNotification()
+
+ const validationSchema = Yup.object().shape({
+ description: Yup.string().required(t("ReviseDialog.description_error")),
+ });
+
+ const formik = useFormik({
+ initialValues: {
+ description: "",
+ },
+ validationSchema,
+ onSubmit: (values, {setSubmitting}) => {
+ const formData = new FormData();
+ formData.append("description", values.description);
+
+ requestServer(`${REVISE_INSPECTOR_EXPERT}/${rowId}`, 'post', {
+ data: formData,
+ }).then((response) => {
+ mutate(fetchUrl)
+ update_notification()
+ }).catch(() => {
+ }).finally(() => {
+ setSubmitting(false);
+ });
+ },
+ });
+
+ const handleDescriptionChange = (event) => {
+ formik.setFieldValue("description", event.target.value);
+ formik.handleChange(event);
+ };
+ return(
+ <>
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )
+}
+export default ReviseContent
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/Form/ReviseForm/index.jsx b/src/components/dashboard/inspector-expert/Form/ReviseForm/index.jsx
new file mode 100644
index 0000000..32ed64a
--- /dev/null
+++ b/src/components/dashboard/inspector-expert/Form/ReviseForm/index.jsx
@@ -0,0 +1,31 @@
+import { Dialog, DialogTitle, IconButton, Tooltip } from "@mui/material";
+import { useTranslations } from "next-intl";
+import ReplyIcon from '@mui/icons-material/Reply';
+import { useState } from "react";
+import ReviseContent from "./ReviseContent";
+
+const Revise = ({rowId, fetchUrl, mutate}) => {
+ const t = useTranslations();
+ const [openReviseDialog, setOpenReviseDialog] = useState(false);
+ return(
+ <>
+
+ {
+ setOpenReviseDialog(true)
+ }}
+ >
+
+
+
+
+ >
+ )
+
+}
+export default Revise;
\ No newline at end of file
diff --git a/src/components/dashboard/inspector-expert/TableRowActions.jsx b/src/components/dashboard/inspector-expert/TableRowActions.jsx
index f76c2d2..577ad28 100644
--- a/src/components/dashboard/inspector-expert/TableRowActions.jsx
+++ b/src/components/dashboard/inspector-expert/TableRowActions.jsx
@@ -1,23 +1,23 @@
import {Box} from "@mui/material";
-import ConfirmForm from "./Form/ConfirmForm"
-import RejectForm from "./Form/RejectForm"
-import ReviseForm from "./Form/ReviseForm"
+import Confirm from "./Form/ConfirmForm";
+import Reject from "./Form/RejectForm";
+import Revise from "./Form/ReviseForm";
const TableRow = ({row, mutate, fetchUrl}) => {
return (
-
-
-