diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 10d10a61..faf86000 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -21,7 +21,9 @@ "SORT": "Sort", "EDIT_COHORT_NAME": "Edit Cohort", "NAME": "Name", - "UPDATE_COHORT": "Update Cohort" + "UPDATE_COHORT": "Update Cohort", + "EDIT": "Edit", + "DELETE": "Delete" }, "LOGIN_PAGE": { "USERNAME": "Username", diff --git a/public/locales/hi/common.json b/public/locales/hi/common.json index 52efd6bb..52b8fc4c 100644 --- a/public/locales/hi/common.json +++ b/public/locales/hi/common.json @@ -1,7 +1,9 @@ { "COMMON": { "LANGUAGE": "भाषा", - "LOADING": "लोडिंग" + "LOADING": "लोडिंग", + "EDIT": "संपादित करें", + "DELETE": "हटाएं" }, "LOGIN_PAGE": { "USERNAME": "उपयोगकर्ता नाम", @@ -18,8 +20,6 @@ "SORT": "क्रमबद्ध करें", "EDIT_COHORT_NAME": "समूह संपादित करें", "UPDATE_COHORT": "अद्यतन समूह" - - }, "COHORTS": { "SEARCHBAR_PLACEHOLDER": "कोहॉर्ट्स खोजें.." diff --git a/public/locales/mr/common.json b/public/locales/mr/common.json index e6b807a9..098aad14 100644 --- a/public/locales/mr/common.json +++ b/public/locales/mr/common.json @@ -6,7 +6,9 @@ "SORT": "क्रमवारी लावा", "EDIT_COHORT_NAME": "समूह संपादित करा", "NAME": "नाव", - "UPDATE_COHORT": "कोहॉर्ट अपडेट करा" + "UPDATE_COHORT": "कोहॉर्ट अपडेट करा", + "EDIT": "संपादित करा", + "DELETE": "हटवा" }, "LOGIN_PAGE": { "USERNAME": "वापरकर्तानाव", diff --git a/public/locales/or/common.json b/public/locales/or/common.json index e7ec4048..34468b70 100644 --- a/public/locales/or/common.json +++ b/public/locales/or/common.json @@ -5,7 +5,9 @@ "UPDATE_COHORT": "କୋହୋର୍ଟ୍ ଅଦ୍ୟତନ କରନ୍ତୁ", "SORT": "ସର୍ଟ", "OTHER": "ଅନ୍ୟ", - "NAME": "ନାମ" + "NAME": "ନାମ", + "EDIT": "ସଂପାଦନା", + "DELETE": "ବିଲୋପ" }, "LOGIN_PAGE": { "USERNAME": "ଉପଯୋଗକର୍ତା ନାମ", diff --git a/src/components/ActionIcon.tsx b/src/components/ActionIcon.tsx index ad29b429..4d96c7f9 100644 --- a/src/components/ActionIcon.tsx +++ b/src/components/ActionIcon.tsx @@ -1,7 +1,12 @@ // components/ActionCell.tsx import React from "react"; -import { Box, Typography } from "@mui/material"; + +// import EditIcon from '@mui/icons-material/ModeEditOutlineOutlined'; +// import DeleteIcon from '@mui/icons-material/DeleteOutlined'; +import MoreVertIcon from "@mui/icons-material/MoreVert"; +import { useTranslation } from "next-i18next"; +import { Box, Typography, Tooltip } from "@mui/material"; import EditIcon from "@mui/icons-material/Edit"; import DeleteIcon from "@mui/icons-material/Delete"; @@ -16,6 +21,7 @@ const ActionIcon: React.FC = ({ onEdit, onDelete, }) => { + const { t } = useTranslation(); return ( = ({ alignItems: "center", }} > - { - onEdit(rowData); - }} - sx={{ - display: "flex", - flexDirection: "column", - alignItems: "center", - cursor: "pointer", - opacity: 0.5, // Reduced opacity to make it appear disabled - pointerEvents: "auto", // Enable pointer events to allow click - }} - > - - - Edit - - - { - onDelete(rowData); - }} - sx={{ - display: "flex", - flexDirection: "column", - alignItems: "center", - cursor: "pointer", - }} - > - - - Delete - - + + { + onEdit(rowData); + }} + sx={{ + display: "flex", + flexDirection: "column", + alignItems: "center", + cursor: "pointer", + opacity: 0.5, // Reduced opacity to make it appear disabled + pointerEvents: "auto", // Enable pointer events to allow click + }} + > + + Edit + + + + { + onDelete(rowData); + }} + sx={{ + display: "flex", + flexDirection: "column", + alignItems: "center", + cursor: "pointer", + }} + > + + Delete + + ); }; diff --git a/src/components/HeaderComponent.tsx b/src/components/HeaderComponent.tsx index 1b33321e..3150d7f9 100644 --- a/src/components/HeaderComponent.tsx +++ b/src/components/HeaderComponent.tsx @@ -9,6 +9,7 @@ import { Grid, Button, InputLabel, + Tooltip, } from "@mui/material"; import Select, { SelectChangeEvent } from "@mui/material/Select"; import AddIcon from "@mui/icons-material/Add"; @@ -85,7 +86,6 @@ const HeaderComponent = ({ // handleDistrictChange([], []); // handleBlockChange([], []); // } - } try { const response = await getDistrictList(selectedCodes); @@ -215,46 +215,50 @@ const HeaderComponent = ({ /> - - + + All - ))} - - - - - + {Filter?.map((filter, index) => ( + + {filter} + + ))} + + + + + + + + - + + + {children} diff --git a/src/components/layouts/sidebar/Sidebar.tsx b/src/components/layouts/sidebar/Sidebar.tsx index 62efe879..a992b2a1 100644 --- a/src/components/layouts/sidebar/Sidebar.tsx +++ b/src/components/layouts/sidebar/Sidebar.tsx @@ -10,7 +10,8 @@ import { ListItemIcon, ListItemText, Collapse, - Typography + Typography, + Tooltip, } from "@mui/material"; import FeatherIcon from "feather-icons-react"; import LogoIcon from "../logo/LogoIcon"; @@ -40,77 +41,88 @@ const Sidebar = ({ const theme = useTheme(); const SidebarContent = ( - + sx={{ + // width: '100%', + // height: '100vh', + background: "linear-gradient(to bottom, white, #F8EFDA)", + }} + > - + - {Menuitems.map((item, index) => ( + {Menuitems?.map((item, index) => ( - { - if (item.subOptions) { - handleClick(index); - } else { - router.push(item.href); - onSidebarClose(); - } - }} - selected={location === item.href} - sx={{ - mb: 1, - ...(location === item.href && { - color: "black", - backgroundColor: (theme) => - `${theme.palette.primary.main}!important`, - }), - }} - > - - - - - - {t(item.title)} - - - {item.subOptions ? ( - open === index ? : - ) : null} - + + { + if (item.subOptions) { + handleClick(index); + } else { + router.push(item.href); + onSidebarClose(); + } + }} + selected={location === item.href} + sx={{ + mb: 1, + ...(location === item.href && { + color: "black", + backgroundColor: (theme) => + `${theme.palette.primary.main}!important`, + }), + }} + > + + + + + + {t(item.title)} + + + {item.subOptions ? ( + open === index ? ( + + ) : ( + + ) + ) : null} + + {item.subOptions && ( {item.subOptions.map((subItem) => ( - { - router.push(subItem.href); - onSidebarClose(); - }} - selected={location === subItem.href} - sx={{ - pl: 8, - mb: 1, - ...(location === subItem.href && { - color: "black", - backgroundColor: (theme) => - `${theme.palette.primary.main}!important`, - }), - }} - > - {t(subItem.title)} - + + { + router.push(subItem.href); + onSidebarClose(); + }} + selected={location === subItem.href} + sx={{ + pl: 8, + mb: 1, + ...(location === subItem.href && { + color: "black", + backgroundColor: (theme) => + `${theme.palette.primary.main}!important`, + }), + }} + > + {t(subItem.title)} + + ))}