update bugs fix medicine, user record update-delete, user login
This commit is contained in:
@@ -30,8 +30,9 @@ const MENU_OPTIONS = [
|
||||
export default function AccountPopover() {
|
||||
const [open, setOpen] = useState<HTMLElement | null>(null);
|
||||
const navigate = useNavigate();
|
||||
const { logout } = useAuth();
|
||||
const { logout, user } = useAuth();
|
||||
|
||||
console.log(user?.email)
|
||||
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
|
||||
setOpen(event.currentTarget);
|
||||
};
|
||||
@@ -65,7 +66,7 @@ export default function AccountPopover() {
|
||||
}}
|
||||
>
|
||||
<Avatar
|
||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
||||
src="https://linksehat.com/assets/img/users/dummy.jpg"
|
||||
alt="Rayan Moran"
|
||||
/>
|
||||
</IconButtonAnimate>
|
||||
@@ -86,10 +87,10 @@ export default function AccountPopover() {
|
||||
>
|
||||
<Box sx={{ my: 1.5, px: 2.5 }}>
|
||||
<Typography variant="subtitle2" noWrap>
|
||||
Rayan Moran
|
||||
{user?.full_name ? user?.full_name : ''}
|
||||
</Typography>
|
||||
<Typography variant="body2" sx={{ color: 'text.secondary' }} noWrap>
|
||||
rayan.moran@gmail.com
|
||||
{user?.email}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
|
||||
@@ -92,9 +92,9 @@ export default function DashboardHeader({
|
||||
<Box sx={{ flexGrow: 1 }} />
|
||||
|
||||
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>
|
||||
<LanguagePopover />
|
||||
{/* <LanguagePopover />
|
||||
<NotificationsPopover />
|
||||
<ContactsPopover />
|
||||
<ContactsPopover /> */}
|
||||
<AccountPopover />
|
||||
</Stack>
|
||||
</Toolbar>
|
||||
|
||||
@@ -108,7 +108,10 @@ const navConfig = [
|
||||
},
|
||||
{
|
||||
title: 'USER MANAGEMENT',
|
||||
path: '/users',
|
||||
children: [
|
||||
{ title: 'User Access', path: '/master/diagnosis' },
|
||||
{ title: 'User Role', path: '/master/diagnosis' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'LINKING TOOLS',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// @mui
|
||||
import { styled } from '@mui/material/styles';
|
||||
import { Box, Link, Typography, Avatar } from '@mui/material';
|
||||
import useAuth from '../../../hooks/useAuth';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -22,6 +23,8 @@ type Props = {
|
||||
};
|
||||
|
||||
export default function NavbarAccount({ isCollapse }: Props) {
|
||||
|
||||
const { logout, user } = useAuth();
|
||||
return (
|
||||
<Link underline="none" color="inherit">
|
||||
<RootStyle
|
||||
@@ -32,7 +35,7 @@ export default function NavbarAccount({ isCollapse }: Props) {
|
||||
}}
|
||||
>
|
||||
<Avatar
|
||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
||||
src="https://linksehat.com/assets/img/users/dummy.jpg"
|
||||
alt="Rayan Moran"
|
||||
/>
|
||||
|
||||
@@ -50,10 +53,10 @@ export default function NavbarAccount({ isCollapse }: Props) {
|
||||
}}
|
||||
>
|
||||
<Typography variant="subtitle2" noWrap>
|
||||
Rayan Moran
|
||||
|
||||
</Typography>
|
||||
<Typography variant="body2" noWrap sx={{ color: 'text.secondary' }}>
|
||||
user
|
||||
Hi {user?.full_name}
|
||||
</Typography>
|
||||
</Box>
|
||||
</RootStyle>
|
||||
|
||||
Reference in New Issue
Block a user