Procházet zdrojové kódy

update label

master
Anna Ho před 1 rokem
rodič
revize
35d9301c57
5 změnil soubory, kde provedl 39 přidání a 5 odebrání
  1. +14
    -1
      src/pages/dashboard/GLD/index.js
  2. +15
    -1
      src/pages/dashboard/Public/index.js
  3. +4
    -1
      src/translations/en.json
  4. +3
    -1
      src/translations/zh-CN.json
  5. +3
    -1
      src/translations/zh-HK.json

+ 14
- 1
src/pages/dashboard/GLD/index.js Zobrazit soubor

@@ -20,13 +20,26 @@ const DashboardDefault = () => {
backgroundColor: '#0C489E',
backgroundPosition: 'right'
}
const getWelcomeMsg=()=>{
var current = new Date()
var curHr = current.getHours()

if (curHr < 12) {
return "Good Morning"
} else if (curHr < 18) {
return "Good Afternoon"
} else {
//evening
return "Good Evening"
}
}
return (
<Grid container sx={{minHeight: '87vh', backgroundColor: "backgroundColor.default"}} direction="column">
<Grid item xs={12}>
<div style={BackgroundHead}>
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center">
<Typography ml={15} color='#FFF' variant="h4" sx={{display: { xs: 'none', sm: 'none', md: 'block' }}}>
Morning, {userData.fullenName}
{getWelcomeMsg()}, {userData.fullenName}
</Typography>
</Stack>
</div>


+ 15
- 1
src/pages/dashboard/Public/index.js Zobrazit soubor

@@ -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>


+ 4
- 1
src/translations/en.json Zobrazit soubor

@@ -96,7 +96,10 @@
"onlinePaymentHistory": "Online Payment History",
"setting": "Settings",
"companyOrUserRecord": "Company/Institutional User Records",
"welcomeMsg": "Good afternoon! Please select the required service.",
"welcomeMsg_am": "Good morning! Please select the required service.",
"welcomeMsg_pm": "Good afternoon! Please select the required service.",
"welcomeMsg_night": "Good evening! Please select the required service.",


"login": "Login",
"logout": "Logout",


+ 3
- 1
src/translations/zh-CN.json Zobrazit soubor

@@ -95,7 +95,9 @@
"onlinePaymentHistory": "网上付款记录",
"setting": "设置",
"companyOrUserRecord": "公司/机构用户记录",
"welcomeMsg": "午安! 请选择所需服务。",
"welcomeMsg_am": "早安! 请选择所需服务。",
"welcomeMsg_pm": "午安! 请选择所需服务。",
"welcomeMsg_night": "晚安! 请选择所需服务。",

"login": "登录",
"logout": "登出",


+ 3
- 1
src/translations/zh-HK.json Zobrazit soubor

@@ -95,7 +95,9 @@
"onlinePaymentHistory": "網上付款記錄",
"setting": "設定",
"companyOrUserRecord": "公司/機構用戶記錄",
"welcomeMsg": "午安! 請選擇所需服務。",
"welcomeMsg_am": "早安! 請選擇所需服務。",
"welcomeMsga_pm": "午安! 請選擇所需服務。",
"welcomeMsg_night": "晚安! 請選擇所需服務。",

"login": "登入",
"logout": "登出",


Načítá se…
Zrušit
Uložit