|
|
@@ -35,6 +35,20 @@ const DashboardDefault = () => { |
|
|
|
backgroundColor: '#0C489E', |
|
|
|
backgroundPosition: 'right' |
|
|
|
} |
|
|
|
|
|
|
|
const getWelcomeMsg=()=>{ |
|
|
|
var current = new Date() |
|
|
|
var curHr = current.getHours() |
|
|
|
|
|
|
|
if (curHr < 12) { |
|
|
|
return <FormattedMessage id="welcomeMsg_am" /> |
|
|
|
} else if (curHr < 18) { |
|
|
|
return <FormattedMessage id="welcomeMsg_pm" /> |
|
|
|
} else { |
|
|
|
return <FormattedMessage id="welcomeMsg_night" /> |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<Grid container sx={{ minHeight: '87vh' }} direction="column"> |
|
|
|
<Grid item xs={12} > |
|
|
@@ -42,7 +56,7 @@ const DashboardDefault = () => { |
|
|
|
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> |
|
|
|
{/* <Typography variant="h5">我的公共啟事</Typography> */} |
|
|
|
<Typography color='#FFF' variant="h5" sx={{ ml: 10, display: { xs: 'none', sm: 'none', md: 'block' } }}> |
|
|
|
{isORGLoggedIn() ? userData.fullenName : userData.fullchName}, <FormattedMessage id="welcomeMsg" /> |
|
|
|
{isORGLoggedIn() ? userData.fullenName : userData.fullchName}, {getWelcomeMsg()} |
|
|
|
</Typography> |
|
|
|
</Stack> |
|
|
|
</div> |
|
|
|