[wip] implementing technical deputy list table
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
// javascript for production
|
||||
{
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"^/*": ["./public/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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"]
|
||||
// }
|
||||
// }
|
||||
|
||||
// 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,5 +1,5 @@
|
||||
import DialogLoading from "@/core/components/DialogLoading";
|
||||
import { GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS } from "@/core/utils/routes";
|
||||
import { GET_REQUEST_INQUIRY_PRIVACY } from "@/core/utils/routes";
|
||||
import useRequest from "@/lib/hooks/useRequest";
|
||||
import { DialogContent, Typography } from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS}/${rowId}`);
|
||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY}/${rowId}`);
|
||||
setData(response.data.data);
|
||||
} catch (error) {
|
||||
} finally {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import DialogLoading from "@/core/components/DialogLoading";
|
||||
import { GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS } from "@/core/utils/routes";
|
||||
import { GET_REQUEST_INQUIRY_PRIVACY } from "@/core/utils/routes";
|
||||
import useRequest from "@/lib/hooks/useRequest";
|
||||
import { DialogContent, Typography } from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS}/${rowId}`);
|
||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY}/${rowId}`);
|
||||
setData(response.data.data);
|
||||
} catch (error) {
|
||||
} finally {
|
||||
@@ -28,9 +28,8 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
return (
|
||||
<>
|
||||
{loading ? (
|
||||
<div>Loading...</div>
|
||||
) : // <DialogLoading />
|
||||
data ? (
|
||||
<DialogLoading loadingOpen={loading} />
|
||||
) : data ? (
|
||||
<ConfirmRoadSafetyFormContext
|
||||
row={row}
|
||||
rowId={rowId}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import DialogLoading from "@/core/components/DialogLoading";
|
||||
import { GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS } from "@/core/utils/routes";
|
||||
import { GET_REQUEST_INQUIRY_PRIVACY } from "@/core/utils/routes";
|
||||
import useRequest from "@/lib/hooks/useRequest";
|
||||
import { DialogContent, Typography } from "@mui/material";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -14,7 +14,7 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY_ZAMIN_GOV_ASSISTANT_DETAILS}/${rowId}`);
|
||||
const response = await request(`${GET_REQUEST_INQUIRY_PRIVACY}/${rowId}`);
|
||||
setData(response.data.data);
|
||||
} catch (error) {
|
||||
} finally {
|
||||
@@ -28,9 +28,15 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
return (
|
||||
<>
|
||||
{loading ? (
|
||||
<DialogLoading />
|
||||
<DialogLoading loadingOpen={loading} />
|
||||
) : data ? (
|
||||
<ConfirmRoadSafetyFormContext row={row} rowId={rowId} data={data} mutate={mutate} handleClose={handleClose} />
|
||||
<ConfirmRoadSafetyFormContext
|
||||
row={row}
|
||||
rowId={rowId}
|
||||
data={data}
|
||||
mutate={mutate}
|
||||
handleClose={handleClose}
|
||||
/>
|
||||
) : (
|
||||
<DialogContent>
|
||||
<Typography textAlign={"center"}>اطلاعات درخواست در سامانه یافت نشد</Typography>
|
||||
@@ -38,6 +44,5 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => {
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
}
|
||||
export default ConfirmRoadSafetyDialog
|
||||
};
|
||||
export default ConfirmRoadSafetyDialog;
|
||||
|
||||
@@ -5,18 +5,17 @@ import ConfirmVerifyLicenseForm from "./ConfirmVerifyLicenseForm";
|
||||
|
||||
const RowActions = ({ row, mutate }) => {
|
||||
return (
|
||||
<></>
|
||||
// <Box sx={{ display: "flex", gap: 1 }}>
|
||||
// {row.original.state_id == 3 && (
|
||||
// <ConfirmRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
// )}
|
||||
// {row.original.state_id == 6 && (
|
||||
// <ConfirmVerifyRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
// )}
|
||||
// {row.original.state_id == 14 && (
|
||||
// <ConfirmVerifyLicenseForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
// )}
|
||||
// </Box>
|
||||
<Box sx={{ display: "flex", gap: 1 }}>
|
||||
{row.original.state_id == 3 && (
|
||||
<ConfirmRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
)}
|
||||
{row.original.state_id == 6 && (
|
||||
<ConfirmVerifyRoadSafetyForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
)}
|
||||
{row.original.state_id == 14 && (
|
||||
<ConfirmVerifyLicenseForm row={row} mutate={mutate} rowId={row.getValue("id")} />
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
export default RowActions;
|
||||
|
||||
@@ -242,3 +242,4 @@ export const CITY_ADMIN_FEEDBACK = api + "/api/v3/harim/province_office/feedback
|
||||
export const GET_PRIVACY_ADMIN_LIST = api + "/api/v3/harim/harim_office";
|
||||
export const PRIVACY_ADMIN_ACTION_API = api + "/api/v3/harim/harim_office";
|
||||
export const GET_INQUIRY_PRIVACY_TABLE_LIST = api + "/api/v3/harim/technical_deputy";
|
||||
export const GET_REQUEST_INQUIRY_PRIVACY = api + "/api/v3/harim/technical_deputy";
|
||||
|
||||
Reference in New Issue
Block a user