|
|
|
|
|
|
|
|
import React, { useState, useMemo, useContext } from "react"; |
|
|
|
|
|
|
|
|
import React, { useState, useMemo } from "react"; |
|
|
import { |
|
|
import { |
|
|
AppBar, |
|
|
AppBar, |
|
|
// Badge, |
|
|
// Badge, |
|
|
|
|
|
|
|
|
Toolbar, |
|
|
Toolbar, |
|
|
Typography, |
|
|
Typography, |
|
|
List, |
|
|
List, |
|
|
ListItem, |
|
|
|
|
|
|
|
|
// ListItem, |
|
|
ListItemButton, |
|
|
ListItemButton, |
|
|
ListItemIcon, |
|
|
ListItemIcon, |
|
|
ListItemText, |
|
|
ListItemText, |
|
|
useMediaQuery, |
|
|
useMediaQuery, |
|
|
|
|
|
Button, |
|
|
} from "@mui/material"; |
|
|
} from "@mui/material"; |
|
|
import HrLogo from "../../assets/images/hrcenter.png"; |
|
|
|
|
|
|
|
|
import HrLogo from "../../assets/images/HR.png"; |
|
|
|
|
|
// import x from "../../assets/images/x.png"; |
|
|
|
|
|
import avatarLogo from "../../assets/images/Avatar.png"; |
|
|
import searchIcon from "../../assets/images/Vector.png"; |
|
|
import searchIcon from "../../assets/images/Vector.png"; |
|
|
import { useTheme } from "@mui/system"; |
|
|
import { useTheme } from "@mui/system"; |
|
|
import MenuOutlinedIcon from "@mui/icons-material/MenuOutlined"; |
|
|
import MenuOutlinedIcon from "@mui/icons-material/MenuOutlined"; |
|
|
// import ShoppingBasketIcon from "@mui/icons-material/ShoppingBasket"; |
|
|
// import ShoppingBasketIcon from "@mui/icons-material/ShoppingBasket"; |
|
|
import Brightness4Icon from "@mui/icons-material/Brightness4"; |
|
|
|
|
|
import Brightness7Icon from "@mui/icons-material/Brightness7"; |
|
|
|
|
|
|
|
|
// import Brightness4Icon from "@mui/icons-material/Brightness4"; |
|
|
|
|
|
// import Brightness7Icon from "@mui/icons-material/Brightness7"; |
|
|
// import MenuList from "./MenuListComponent"; |
|
|
// import MenuList from "./MenuListComponent"; |
|
|
import Drawer from "./DrawerComponent"; |
|
|
import Drawer from "./DrawerComponent"; |
|
|
import { ColorModeContext } from "../../context/ColorModeContext"; |
|
|
|
|
|
|
|
|
// import { ColorModeContext } from "../../context/ColorModeContext"; |
|
|
import { useTranslation } from "react-i18next"; |
|
|
import { useTranslation } from "react-i18next"; |
|
|
|
|
|
import CloseIcon from "@mui/icons-material/Close"; |
|
|
|
|
|
import LogoutIcon from "@mui/icons-material/Logout"; |
|
|
|
|
|
|
|
|
const NavbarComponent = () => { |
|
|
const NavbarComponent = () => { |
|
|
const navItems = [ |
|
|
const navItems = [ |
|
|
|
|
|
|
|
|
const [openDrawer, setOpenDrawer] = useState(false); |
|
|
const [openDrawer, setOpenDrawer] = useState(false); |
|
|
const theme = useTheme(); |
|
|
const theme = useTheme(); |
|
|
const matches = useMediaQuery(theme.breakpoints.down("sm")); |
|
|
const matches = useMediaQuery(theme.breakpoints.down("sm")); |
|
|
const toggleColorMode = useContext(ColorModeContext); |
|
|
|
|
|
|
|
|
// const toggleColorMode = useContext(ColorModeContext); |
|
|
|
|
|
|
|
|
const { t } = useTranslation(); |
|
|
const { t } = useTranslation(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const drawerContent = useMemo( |
|
|
const drawerContent = useMemo( |
|
|
() => ( |
|
|
() => ( |
|
|
<List> |
|
|
|
|
|
{navItems.map((n) => ( |
|
|
|
|
|
<ListItemButton key={n} divider onClick={handleToggleDrawer}> |
|
|
|
|
|
<ListItemIcon> |
|
|
|
|
|
<ListItemText |
|
|
|
|
|
variant="body1" |
|
|
|
|
|
sx={{ |
|
|
|
|
|
marginRight: "50px", |
|
|
|
|
|
cursor: "pointer", |
|
|
|
|
|
textAlign: "right", |
|
|
|
|
|
lineHeight: "20.11px", |
|
|
|
|
|
fontWeight: "400", |
|
|
|
|
|
color: "text.primary", |
|
|
|
|
|
marginY: "0", |
|
|
|
|
|
padding: "0", |
|
|
|
|
|
}} |
|
|
|
|
|
className="text-black" |
|
|
|
|
|
> |
|
|
|
|
|
{t("nav." + n)} |
|
|
|
|
|
</ListItemText> |
|
|
|
|
|
</ListItemIcon> |
|
|
|
|
|
</ListItemButton> |
|
|
|
|
|
))} |
|
|
|
|
|
<ListItem divider> |
|
|
|
|
|
<IconButton onClick={toggleColorMode}> |
|
|
|
|
|
<ListItemText>Toggle {theme.palette.mode} mode</ListItemText> |
|
|
|
|
|
{theme.palette.mode === "dark" ? ( |
|
|
|
|
|
<Brightness7Icon /> |
|
|
|
|
|
) : ( |
|
|
|
|
|
<Brightness4Icon /> |
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
<div style={{ width: "100vw", padding: "36px" }}> |
|
|
|
|
|
<div |
|
|
|
|
|
className="flex-center" |
|
|
|
|
|
style={{ justifyContent: "space-between", marginBottom: "20px" }} |
|
|
|
|
|
> |
|
|
|
|
|
<Typography |
|
|
|
|
|
sx={{ fontWeight: 600, fontSize: "18px", letterSpacing: "1.5px" }} |
|
|
|
|
|
> |
|
|
|
|
|
Navigacija |
|
|
|
|
|
</Typography> |
|
|
|
|
|
{/* <img src={x}/> */} |
|
|
|
|
|
<IconButton onClick={handleToggleDrawer}> |
|
|
|
|
|
<CloseIcon /> |
|
|
</IconButton> |
|
|
</IconButton> |
|
|
</ListItem> |
|
|
|
|
|
</List> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
<div className="flex-center flex-col"> |
|
|
|
|
|
<img src={avatarLogo} width="64px" height="64px" /> |
|
|
|
|
|
<Typography |
|
|
|
|
|
variant="h5" |
|
|
|
|
|
sx={{ fontSize: "18px", marginTop: "15px", }} |
|
|
|
|
|
className="text-blue" |
|
|
|
|
|
> |
|
|
|
|
|
Danijela Ranđelović |
|
|
|
|
|
</Typography> |
|
|
|
|
|
<Typography |
|
|
|
|
|
variant="body1" |
|
|
|
|
|
sx={{ fontSize: "14px", marginTop: "8px" }} |
|
|
|
|
|
className="text-grey9d" |
|
|
|
|
|
> |
|
|
|
|
|
HR Specialist |
|
|
|
|
|
</Typography> |
|
|
|
|
|
<div className="hr" style={{ width: "90%", marginTop: "18px" }}></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<List> |
|
|
|
|
|
{navItems.map((n) => ( |
|
|
|
|
|
<ListItemButton key={n} onClick={handleToggleDrawer}> |
|
|
|
|
|
<ListItemIcon> |
|
|
|
|
|
<ListItemText |
|
|
|
|
|
variant="body1" |
|
|
|
|
|
sx={{ |
|
|
|
|
|
// marginRight: "50px", |
|
|
|
|
|
cursor: "pointer", |
|
|
|
|
|
textAlign: "left", |
|
|
|
|
|
lineHeight: "17.6px", |
|
|
|
|
|
fontWeight: "400", |
|
|
|
|
|
color: "#353535", |
|
|
|
|
|
marginY: "0", |
|
|
|
|
|
padding: "0", |
|
|
|
|
|
}} |
|
|
|
|
|
className="text-black" |
|
|
|
|
|
> |
|
|
|
|
|
{t("nav." + n)} |
|
|
|
|
|
</ListItemText> |
|
|
|
|
|
</ListItemIcon> |
|
|
|
|
|
</ListItemButton> |
|
|
|
|
|
))} |
|
|
|
|
|
{/* <ListItem divider> |
|
|
|
|
|
<IconButton onClick={toggleColorMode}> |
|
|
|
|
|
<ListItemText>Toggle {theme.palette.mode} mode</ListItemText> |
|
|
|
|
|
{theme.palette.mode === "dark" ? ( |
|
|
|
|
|
<Brightness7Icon /> |
|
|
|
|
|
) : ( |
|
|
|
|
|
<Brightness4Icon /> |
|
|
|
|
|
)} |
|
|
|
|
|
</IconButton> |
|
|
|
|
|
</ListItem> */} |
|
|
|
|
|
</List> |
|
|
|
|
|
{/* <button style={{width:'90%', margin: 'auto'}} className="flex-center"> */} |
|
|
|
|
|
{/* <Typography>s</Typography> */} |
|
|
|
|
|
<div className="flex-center"> |
|
|
|
|
|
<Button |
|
|
|
|
|
sx={{ |
|
|
|
|
|
padding: "18px 72px", |
|
|
|
|
|
border: "1px solid #226cb0", |
|
|
|
|
|
borderRadius: "9px", |
|
|
|
|
|
background: "white", |
|
|
|
|
|
width: "90%", |
|
|
|
|
|
marginTop: '50px' |
|
|
|
|
|
}} |
|
|
|
|
|
startIcon={<LogoutIcon />} |
|
|
|
|
|
> |
|
|
|
|
|
{t("nav.signOut")} |
|
|
|
|
|
</Button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
), |
|
|
), |
|
|
[handleToggleDrawer] |
|
|
[handleToggleDrawer] |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
> |
|
|
> |
|
|
{matches ? ( |
|
|
{matches ? ( |
|
|
<Box> |
|
|
<Box> |
|
|
<IconButton onClick={handleToggleDrawer}> |
|
|
|
|
|
|
|
|
<IconButton sx={{marginLeft: '15px'}} onClick={handleToggleDrawer}> |
|
|
<MenuOutlinedIcon /> |
|
|
<MenuOutlinedIcon /> |
|
|
</IconButton> |
|
|
</IconButton> |
|
|
</Box> |
|
|
</Box> |
|
|
|
|
|
|
|
|
alignItems: "center", |
|
|
alignItems: "center", |
|
|
paddingRight: "20px", |
|
|
paddingRight: "20px", |
|
|
justifyContent: "flex-end", |
|
|
justifyContent: "flex-end", |
|
|
height: "81px", |
|
|
|
|
|
|
|
|
// HEIGHT OF THE NAVBAR IN md & xl SIZE |
|
|
width: "1076px", |
|
|
width: "1076px", |
|
|
borderBottom: "1px solid #F4F4F4", |
|
|
borderBottom: "1px solid #F4F4F4", |
|
|
boxSizing: "border-box", |
|
|
boxSizing: "border-box", |