@@ -31,6 +31,8 @@ import {
3131 Edit as EditIcon ,
3232 CameraAlt as CameraAltIcon ,
3333 Chat as ChatIcon ,
34+ Person as PersonIcon ,
35+ Settings as SettingsIcon ,
3436} from '@mui/icons-material'
3537import { useNavigate , useLocation } from 'react-router-dom'
3638import { useState , useEffect } from 'react'
@@ -215,7 +217,7 @@ const Layout = ({ children }) => {
215217 display : 'flex' ,
216218 alignItems : 'center' ,
217219 justifyContent : 'center' ,
218- gap : ( isMobile || isExpanded ) ? '8px' : 0 ,
220+ gap : isMobile || isExpanded ? '8px' : 0 ,
219221 px : 2.5 ,
220222 minWidth : 0 ,
221223 transition : 'all 0.4s cubic-bezier(0.4, 0, 0.2, 1)' ,
@@ -229,12 +231,12 @@ const Layout = ({ children }) => {
229231 < Box
230232 component = "span"
231233 sx = { {
232- opacity : ( isMobile || isExpanded ) ? 1 : 0 ,
233- width : ( isMobile || isExpanded ) ? 'auto' : 0 ,
234+ opacity : isMobile || isExpanded ? 1 : 0 ,
235+ width : isMobile || isExpanded ? 'auto' : 0 ,
234236 overflow : 'hidden' ,
235237 whiteSpace : 'nowrap' ,
236238 transition : 'opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1)' ,
237- transitionDelay : ( isMobile || isExpanded ) ? '0.1s' : '0s' ,
239+ transitionDelay : isMobile || isExpanded ? '0.1s' : '0s' ,
238240 } }
239241 >
240242 Tạo hóa đơn mới
@@ -254,7 +256,7 @@ const Layout = ({ children }) => {
254256 display : 'flex' ,
255257 alignItems : 'center' ,
256258 justifyContent : 'flex-start' ,
257- gap : ( isMobile || isExpanded ) ? '12px' : 0 ,
259+ gap : isMobile || isExpanded ? '12px' : 0 ,
258260 borderRadius : '16px' ,
259261 height : '48px' ,
260262 px : 2 ,
@@ -294,12 +296,12 @@ const Layout = ({ children }) => {
294296 < Box
295297 component = "span"
296298 sx = { {
297- opacity : ( isMobile || isExpanded ) ? 1 : 0 ,
298- width : ( isMobile || isExpanded ) ? 'auto' : 0 ,
299+ opacity : isMobile || isExpanded ? 1 : 0 ,
300+ width : isMobile || isExpanded ? 'auto' : 0 ,
299301 overflow : 'hidden' ,
300302 whiteSpace : 'nowrap' ,
301303 transition : 'opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1)' ,
302- transitionDelay : ( isMobile || isExpanded ) ? '0.1s' : '0s' ,
304+ transitionDelay : isMobile || isExpanded ? '0.1s' : '0s' ,
303305 } }
304306 >
305307 { item . label }
@@ -317,8 +319,8 @@ const Layout = ({ children }) => {
317319 p : 2 ,
318320 display : 'flex' ,
319321 alignItems : 'center' ,
320- gap : ( isMobile || isExpanded ) ? 2 : 0 ,
321- justifyContent : ( isMobile || isExpanded ) ? 'flex-start' : 'center' ,
322+ gap : isMobile || isExpanded ? 2 : 0 ,
323+ justifyContent : isMobile || isExpanded ? 'flex-start' : 'center' ,
322324 cursor : 'pointer' ,
323325 borderRadius : '16px' ,
324326 mx : 2 ,
@@ -587,8 +589,31 @@ const Layout = ({ children }) => {
587589 } ,
588590 } }
589591 >
592+ { /* Profile and Settings */ }
593+ < MenuItem onClick = { ( ) => {
594+ handleNavigate ( '/profile' )
595+ handleProfileMenuClose ( )
596+ } } >
597+ < ListItemIcon >
598+ < PersonIcon fontSize = "small" />
599+ </ ListItemIcon >
600+ < ListItemText > Profile</ ListItemText >
601+ </ MenuItem >
602+ < MenuItem onClick = { ( ) => {
603+ handleNavigate ( '/settings' )
604+ handleProfileMenuClose ( )
605+ } } >
606+ < ListItemIcon >
607+ < SettingsIcon fontSize = "small" />
608+ </ ListItemIcon >
609+ < ListItemText > Settings</ ListItemText >
610+ </ MenuItem >
611+
612+ { /* Divider */ }
613+ < Box sx = { { borderBottom : '1px solid' , borderColor : 'divider' , my : 1 } } />
614+
590615 { /* Theme Mode Options */ }
591- < MenuItem onClick = { ( ) => handleModeChange ( 'light' ) } >
616+ { /* <MenuItem onClick={() => handleModeChange('light')}>
592617 <ListItemIcon>
593618 <LightModeIcon fontSize="small" />
594619 </ListItemIcon>
@@ -608,11 +633,34 @@ const Layout = ({ children }) => {
608633 </ListItemIcon>
609634 <ListItemText>System</ListItemText>
610635 {mode === 'system' && <Box sx={{ ml: 1, color: COLORS.secondary }}>✓</Box> }
636+ </MenuItem> */ }
637+
638+ { /* Theme Mode Options */ }
639+ < MenuItem onClick = { ( ) => handleModeChange ( 'light' ) } >
640+ < ListItemIcon >
641+ < LightModeIcon fontSize = "small" />
642+ </ ListItemIcon >
643+ < ListItemText > Light Mode</ ListItemText >
644+ { mode === 'light' && < Box sx = { { ml : 1 , color : COLORS . secondary } } > ✓</ Box > }
645+ </ MenuItem >
646+ < MenuItem onClick = { ( ) => handleModeChange ( 'dark' ) } >
647+ < ListItemIcon >
648+ < DarkModeIcon fontSize = "small" />
649+ </ ListItemIcon >
650+ < ListItemText > Dark Mode</ ListItemText >
651+ { mode === 'dark' && < Box sx = { { ml : 1 , color : COLORS . secondary } } > ✓</ Box > }
611652 </ MenuItem >
653+ < MenuItem onClick = { ( ) => handleModeChange ( 'system' ) } >
654+ < ListItemIcon >
655+ < SettingsBrightnessIcon fontSize = "small" />
656+ </ ListItemIcon >
657+ < ListItemText > System</ ListItemText >
658+ { mode === 'system' && < Box sx = { { ml : 1 , color : COLORS . secondary } } > ✓</ Box > }
659+ </ MenuItem > { ' ' }
660+
612661
613662 { /* Divider */ }
614663 < Box sx = { { borderBottom : '1px solid' , borderColor : 'divider' , my : 1 } } />
615-
616664 { /* Logout */ }
617665 < MenuItem onClick = { handleLogout } >
618666 < ListItemIcon >
0 commit comments