Merge branch 'develop'
This commit is contained in:
11
src/core/components/TabPanel.jsx
Normal file
11
src/core/components/TabPanel.jsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Box } from "@mui/material";
|
||||
|
||||
const TabPanel = (props) => {
|
||||
const { children, value, index } = props;
|
||||
return (
|
||||
<div role="tabpanel" hidden={value !== index}>
|
||||
{value === index && <Box>{children}</Box>}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default TabPanel;
|
||||
@@ -318,7 +318,7 @@ export const pageMenuDev = [
|
||||
id: "assistant",
|
||||
label: "کارتابل معاون",
|
||||
type: "page",
|
||||
route: "/dashboard/inquiry-privacy/assistant",
|
||||
route: "/dashboard/inquiry-privacy/technical-deputy",
|
||||
icon: <ManageAccountsIcon sx={{ width: "inherit", height: "inherit" }} />,
|
||||
permissions: ["all"],
|
||||
},
|
||||
|
||||
@@ -240,4 +240,6 @@ export const GET_CITY_ADMIN_LIST = api + "/api/v3/harim/province_office";
|
||||
export const GET_INQUIRY_PRIVACY_STATE_LIST = api + "/api/v3/harim/detail/states";
|
||||
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_GENERAL_MANAGER_LIST = api + "/api/v3/harim/general_manager";
|
||||
|
||||
@@ -148,3 +148,18 @@ export const getClosedPolygonCoordinates = (polygon) => {
|
||||
|
||||
return coordinates;
|
||||
};
|
||||
|
||||
export function safeParsePolygon(polygonJson) {
|
||||
if (!polygonJson) return null;
|
||||
|
||||
try {
|
||||
const parsed = JSON.parse(polygonJson);
|
||||
if (parsed && parsed.coordinates) {
|
||||
return parsed.coordinates;
|
||||
}
|
||||
return null;
|
||||
} catch (err) {
|
||||
console.error("Invalid polygon JSON:", err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user