diff --git a/package-lock.json b/package-lock.json index 2562b25..b2246da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.3.0", - "react-scripts": "5.0.1", + "react-scripts": "^5.0.1", "styled-components": "^5.3.5", "typescript": "^4.8.2", "web-vitals": "^2.1.4", diff --git a/package.json b/package.json index 8e22967..c5063ca 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.3.0", - "react-scripts": "5.0.1", + "react-scripts": "^5.0.1", "styled-components": "^5.3.5", "typescript": "^4.8.2", "web-vitals": "^2.1.4", diff --git a/src/Components/LoggedIn/Content/Tariffs/ModalMini/index.tsx b/src/Components/LoggedIn/Content/Tariffs/ModalMini/index.tsx index 43d8e8e..2649ed7 100644 --- a/src/Components/LoggedIn/Content/Tariffs/ModalMini/index.tsx +++ b/src/Components/LoggedIn/Content/Tariffs/ModalMini/index.tsx @@ -31,8 +31,8 @@ const ModalMini = ({open, variant, close}: MWProps ) => { top: "50%", left: "50%", transform: "translate(-50%, -50%)", - width: "30%", - height: "25%", + width: "350px", + height: "220px", bgcolor: theme.palette.menu.main, boxShadow: 24, color: theme.palette.secondary.main, diff --git a/src/Components/LoggedIn/Menu/index.tsx b/src/Components/LoggedIn/Menu/index.tsx index 86e0f00..d4b6a40 100644 --- a/src/Components/LoggedIn/Menu/index.tsx +++ b/src/Components/LoggedIn/Menu/index.tsx @@ -1,5 +1,6 @@ import * as React from "react"; import { Box } from "@mui/material"; +import { useNavigate } from "react-router-dom"; import MenuOutlinedIcon from '@mui/icons-material/MenuOutlined'; import PersonOutlineOutlinedIcon from '@mui/icons-material/PersonOutlineOutlined'; import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined'; @@ -13,6 +14,11 @@ import theme from "../../../theme"; const Menu: React.FC = () => { + const navigate = useNavigate(); + const pages = [ null, "users", "entities", "tariffs", "discounts", "promocode", null, null, "support" ]; + + const changePage = (page:number) => { navigate(`/${pages[ page ]}`); } + return ( { width: "96px", height: "100vh", borderRight: "1px solid #45494c", - overflow: "hidden" + overflow: "auto" }}> { + }} + onClick={ () => changePage( 1 ) } /> { + }} + onClick={ () => changePage( 2 ) } /> { + }} + onClick={ () => changePage( 3 ) } /> { + }} + onClick={ () => changePage( 4 ) } /> { + }} + onClick={ () => changePage( 5 ) } /> { + }} + onClick={ () => changePage( 6 ) } /> { }}> + }} + onClick={ () => changePage( 7 ) } /> { + }} + onClick={ () => changePage( 8 ) } /> diff --git a/src/Components/LoggedIn/ModalEntities/index.tsx b/src/Components/LoggedIn/ModalEntities/index.tsx index 8eceeb1..ef1cba7 100644 --- a/src/Components/LoggedIn/ModalEntities/index.tsx +++ b/src/Components/LoggedIn/ModalEntities/index.tsx @@ -85,8 +85,8 @@ const ModalEntities = ({open}: MWProps ) => { top: "50%", left: "50%", transform: "translate(-50%, -50%)", - width: "72%", - height: "60%", + width: "980px", + height: "480px", bgcolor: theme.palette.menu.main, boxShadow: 24, color: theme.palette.secondary.main, @@ -153,8 +153,9 @@ const ModalEntities = ({open}: MWProps ) => { disableSelectionOnClick experimentalFeatures={{ newEditingApi: true }} sx={{ - width: "700px", - height: "400px", + width: "720px", + height: "350px", + overflowY: "auto", color: theme.palette.secondary.main, "& .MuiDataGrid-iconSeparator": { display: "none" diff --git a/src/Components/LoggedIn/ModalUser/index.tsx b/src/Components/LoggedIn/ModalUser/index.tsx index 37b98de..eba80ff 100644 --- a/src/Components/LoggedIn/ModalUser/index.tsx +++ b/src/Components/LoggedIn/ModalUser/index.tsx @@ -85,8 +85,8 @@ const ModalUser = ({open}: MWProps ) => { top: "50%", left: "50%", transform: "translate(-50%, -50%)", - width: "72%", - height: "60%", + width: "980px", + height: "480px", bgcolor: theme.palette.menu.main, boxShadow: 24, color: theme.palette.secondary.main, @@ -153,9 +153,10 @@ const ModalUser = ({open}: MWProps ) => { disableSelectionOnClick experimentalFeatures={{ newEditingApi: true }} sx={{ - width: "700px", - height: "400px", color: theme.palette.secondary.main, + width: "720px", + height: "350px", + overflowY: "auto", "& .MuiDataGrid-iconSeparator": { display: "none" },