diff --git a/src/components/dashboard/fastReact/complaintList/ComplaintListTable.jsx b/src/components/dashboard/fastReact/complaintList/ComplaintListTable.jsx
index a889c11..f6d674d 100644
--- a/src/components/dashboard/fastReact/complaintList/ComplaintListTable.jsx
+++ b/src/components/dashboard/fastReact/complaintList/ComplaintListTable.jsx
@@ -115,8 +115,8 @@ const ComplaintListTable = ({ open, setOpen, mutate }) => {
props.dependencyFieldValue?.value === ""
? "empty"
: loadingEdaratList
- ? "loading"
- : props.filterParameters.value
+ ? "loading"
+ : props.filterParameters.value
}
columnSelectOption={getColumnSelectOptions}
/>
@@ -269,7 +269,7 @@ const ComplaintListTable = ({ open, setOpen, mutate }) => {
TableToolbar={Toolbar}
enableRowActions
positionActionsColumn={"last"}
- RowActions={RowActions}
+ RowActions={(props) => }
/>
)}
diff --git a/src/components/dashboard/fastReact/complaintList/Form/registerAction/index.jsx b/src/components/dashboard/fastReact/complaintList/Form/registerAction/index.jsx
index 6466dab..72d0096 100644
--- a/src/components/dashboard/fastReact/complaintList/Form/registerAction/index.jsx
+++ b/src/components/dashboard/fastReact/complaintList/Form/registerAction/index.jsx
@@ -4,7 +4,7 @@ import RegisterActionContent from "./RegisterActionContent";
import AppRegistrationIcon from "@mui/icons-material/AppRegistration";
import useRequest from "@/lib/hooks/useRequest";
import { REGISTER_COMPLAINTS_LIST } from "@/core/utils/routes";
-const RegisterAction = ({ rowId, mutate }) => {
+const RegisterAction = ({ rowId, mutate, mutateParentTable }) => {
const requestServer = useRequest({ notificationSuccess: true });
const [openRegisterActionDialog, setOpenRegisterActionDialog] = useState(false);
const defaultValues = {
@@ -32,9 +32,10 @@ const RegisterAction = ({ rowId, mutate }) => {
})
.then((res) => {
mutate();
+ mutateParentTable()
setOpenRegisterActionDialog(false);
})
- .catch(() => {});
+ .catch(() => { });
};
return (
<>
diff --git a/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx b/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx
index 1926241..967508f 100644
--- a/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx
+++ b/src/components/dashboard/fastReact/complaintList/RowActions/index.jsx
@@ -4,12 +4,12 @@ import ReferList from "./ReferList";
import Refer from "./Refer";
import { usePermissions } from "@/lib/hooks/usePermissions";
-const RowActions = ({ row, mutate }) => {
+const RowActions = ({ row, mutate, mutateParentTable }) => {
const { data: userPermissions } = usePermissions();
const hasActionPermission = userPermissions.includes("show-fast-react-edarate-shahri");
return (
- {hasActionPermission && }
+ {hasActionPermission && }
diff --git a/src/components/dashboard/fastReact/operator/OperatorList.jsx b/src/components/dashboard/fastReact/operator/OperatorList.jsx
index 9b90b29..db20d6c 100644
--- a/src/components/dashboard/fastReact/operator/OperatorList.jsx
+++ b/src/components/dashboard/fastReact/operator/OperatorList.jsx
@@ -246,9 +246,27 @@ const OperatorList = () => {
return -;
},
},
+ {
+ accessorKey: "status",
+ header: "وضعیت نظارت",
+ id: "status",
+ enableColumnFilter: true,
+ datatype: "numeric",
+ filterMode: "equals",
+ sortDescFirst: true,
+ grow: false,
+ size: 100,
+ columnSelectOption: () => {
+ return statusOptions.map((status) => ({
+ value: status.value,
+ label: status.label,
+ }));
+ },
+ Cell: ({ row }) => <>{row.original.status_fa}>,
+ },
{
accessorKey: "supervisor_description",
- header: "توضیح کارشناس",
+ header: "توضیح ناظر",
id: "supervisor_description",
enableColumnFilter: false,
datatype: "text",
@@ -272,7 +290,7 @@ const OperatorList = () => {
@@ -281,24 +299,6 @@ const OperatorList = () => {
return -;
},
},
- {
- accessorKey: "status",
- header: "وضعیت",
- id: "status",
- enableColumnFilter: true,
- datatype: "numeric",
- filterMode: "equals",
- sortDescFirst: true,
- grow: false,
- size: 100,
- columnSelectOption: () => {
- return statusOptions.map((status) => ({
- value: status.value,
- label: status.label,
- }));
- },
- Cell: ({ row }) => <>{row.original.status_fa}>,
- },
],
[]
);
diff --git a/src/components/dashboard/fastReact/supervisor/SupervisorList.jsx b/src/components/dashboard/fastReact/supervisor/SupervisorList.jsx
index 65525cc..61e7899 100644
--- a/src/components/dashboard/fastReact/supervisor/SupervisorList.jsx
+++ b/src/components/dashboard/fastReact/supervisor/SupervisorList.jsx
@@ -127,8 +127,8 @@ const SupervisorList = () => {
props.dependencyFieldValue?.value === ""
? "empty"
: loadingEdaratList
- ? "loading"
- : props.filterParameters.value
+ ? "loading"
+ : props.filterParameters.value
}
columnSelectOption={getColumnSelectOptions}
/>
@@ -347,9 +347,28 @@ const SupervisorList = () => {
return -;
},
},
+
+ {
+ accessorKey: "status",
+ header: "وضعیت نظارت",
+ id: "status",
+ enableColumnFilter: true,
+ datatype: "numeric",
+ filterMode: "equals",
+ sortDescFirst: true,
+ grow: false,
+ size: 100,
+ columnSelectOption: () => {
+ return statusOptions.map((status) => ({
+ value: status.value,
+ label: status.label,
+ }));
+ },
+ Cell: ({ row }) => <>{row.original.status_fa}>,
+ },
{
accessorKey: "supervisor_description",
- header: "توضیح کارشناس",
+ header: "توضیح ناظر",
id: "supervisor_description",
enableColumnFilter: false,
datatype: "text",
@@ -382,24 +401,6 @@ const SupervisorList = () => {
return -;
},
},
- {
- accessorKey: "status",
- header: "وضعیت",
- id: "status",
- enableColumnFilter: true,
- datatype: "numeric",
- filterMode: "equals",
- sortDescFirst: true,
- grow: false,
- size: 100,
- columnSelectOption: () => {
- return statusOptions.map((status) => ({
- value: status.value,
- label: status.label,
- }));
- },
- Cell: ({ row }) => <>{row.original.status_fa}>,
- },
];
}, []);