From ea36ee0c77c2f039abeecd96842f7543adbab7a2 Mon Sep 17 00:00:00 2001 From: baslani Date: Wed, 26 Nov 2025 15:13:54 +0330 Subject: [PATCH 1/3] [wip] implementing technical deputy list table --- jsconfig.json | 38 +++++++++---------- .../ConfirmRoadSafetyDialog.jsx | 4 +- .../ConfirmRoadSafetyDialog.jsx | 9 ++--- .../ConfirmRoadSafetyDialog.jsx | 19 ++++++---- .../technical-deputy/RowActions/index.jsx | 23 ++++++----- src/core/utils/routes.js | 1 + 6 files changed, 49 insertions(+), 45 deletions(-) diff --git a/jsconfig.json b/jsconfig.json index b51472a..c136578 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -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"] +} diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyDialog.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyDialog.jsx index 7b8e90e..862fb85 100644 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyDialog.jsx +++ b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyDialog.jsx @@ -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 { diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/ConfirmRoadSafetyDialog.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/ConfirmRoadSafetyDialog.jsx index 8305cf4..862fb85 100644 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/ConfirmRoadSafetyDialog.jsx +++ b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmVerifyLicenseForm/ConfirmRoadSafetyDialog.jsx @@ -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 ? ( -
Loading...
- ) : // - data ? ( + + ) : data ? ( { 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 ? ( - + ) : data ? ( - + ) : ( اطلاعات درخواست در سامانه یافت نشد @@ -38,6 +44,5 @@ const ConfirmRoadSafetyDialog = ({ row, handleClose, rowId, mutate }) => { )} ); - -} -export default ConfirmRoadSafetyDialog \ No newline at end of file +}; +export default ConfirmRoadSafetyDialog; diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx index 58261f4..cb1ecf7 100644 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx +++ b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx @@ -5,18 +5,17 @@ import ConfirmVerifyLicenseForm from "./ConfirmVerifyLicenseForm"; const RowActions = ({ row, mutate }) => { return ( - <> - // - // {row.original.state_id == 3 && ( - // - // )} - // {row.original.state_id == 6 && ( - // - // )} - // {row.original.state_id == 14 && ( - // - // )} - // + + {row.original.state_id == 3 && ( + + )} + {row.original.state_id == 6 && ( + + )} + {row.original.state_id == 14 && ( + + )} + ); }; export default RowActions; diff --git a/src/core/utils/routes.js b/src/core/utils/routes.js index e9e7119..070a222 100644 --- a/src/core/utils/routes.js +++ b/src/core/utils/routes.js @@ -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"; From 88b1f02a91e79f4eec0624567d37d9b0a0c2e019 Mon Sep 17 00:00:00 2001 From: baslani Date: Wed, 26 Nov 2025 15:23:29 +0330 Subject: [PATCH 2/3] added history item to tables --- .../ConfirmRoadSafetyForm/ConfirmRoadSafetyFormContext.jsx | 1 + .../inquiryPrivacy/technical-deputy/RowActions/index.jsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyFormContext.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyFormContext.jsx index ac10bf7..a3543b8 100644 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyFormContext.jsx +++ b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/ConfirmRoadSafetyForm/ConfirmRoadSafetyFormContext.jsx @@ -8,6 +8,7 @@ import TabPanel from "@/core/components/TabPanel"; const ConfirmRoadSafetyFormContext = ({ row, data, rowId, mutate, handleClose }) => { const [tabState, setTabState] = useState(0); + console.log("DATA: ", data); const handleChangeTab = (event, newValue) => { setTabState(newValue); diff --git a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx index cb1ecf7..757d292 100644 --- a/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx +++ b/src/components/dashboard/inquiryPrivacy/technical-deputy/RowActions/index.jsx @@ -2,10 +2,12 @@ import { Box } from "@mui/material"; import ConfirmRoadSafetyForm from "./ConfirmRoadSafetyForm"; import ConfirmVerifyRoadSafetyForm from "./ConfirmVerifyRoadSafetyForm"; import ConfirmVerifyLicenseForm from "./ConfirmVerifyLicenseForm"; +import History from "./History"; const RowActions = ({ row, mutate }) => { return ( + {row.original.state_id == 3 && ( )} From e4b993dededac1494890a92f7d150f80631e7b5f Mon Sep 17 00:00:00 2001 From: baslani Date: Wed, 26 Nov 2025 15:35:49 +0330 Subject: [PATCH 3/3] changed to js --- jsconfig.json | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/jsconfig.json b/jsconfig.json index c136578..b51472a 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -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"] +// }