@@ -4,7 +4,7 @@ import enMessages from '../translations/en.json'; | |||||
import cnMessages from '../translations/zh-CN.json'; | import cnMessages from '../translations/zh-CN.json'; | ||||
import hkMessages from '../translations/zh-HK.json'; | import hkMessages from '../translations/zh-HK.json'; | ||||
import { POST_TERMS_N_CONDITIONS } from "utils/ApiPathConst"; | |||||
import { GET_COMBO, POST_TERMS_N_CONDITIONS } from "utils/ApiPathConst"; | |||||
import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
const LocaleContext = createContext(); | const LocaleContext = createContext(); | ||||
@@ -30,6 +30,19 @@ export const I18nProvider = ({ children }) => { | |||||
hkMessages["termsAndCon"]= responseData.zh; | hkMessages["termsAndCon"]= responseData.zh; | ||||
} | } | ||||
}); | }); | ||||
HttpUtils.get({ | |||||
url: GET_COMBO, | |||||
onSuccess: (responseData) => { | |||||
for(let i =0; i<responseData.length; i++){ | |||||
let item = responseData[i]; | |||||
enMessages[item.key]= item.en; | |||||
cnMessages[item.key]= item.cn; | |||||
hkMessages[item.key]= item.zh; | |||||
} | |||||
} | |||||
}); | |||||
} | } | ||||
useEffect(() => { | useEffect(() => { | ||||
@@ -62,7 +62,7 @@ const ApplicationDetailCard = ({ data }) => { | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={5} lg={5} sx={{ mb: 1, ml: 1 }}> | |||||
<Grid item xs={12} md={6} lg={6} sx={{ mb: 1 }}> | |||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={12} md={3} lg={3} | <Grid item xs={12} md={3} lg={3} | ||||
sx={{ display: 'flex', alignItems: 'center' }}> | sx={{ display: 'flex', alignItems: 'center' }}> | ||||
@@ -96,7 +96,7 @@ const ApplicationDetailCard = ({ data }) => { | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={5} lg={5} sx={{ mb: 1, ml: 1 }}> | |||||
<Grid item xs={12} md={6} lg={6} sx={{ mb: 1}}> | |||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={12} md={4} lg={4} | <Grid item xs={12} md={4} lg={4} | ||||
sx={{ display: 'flex', alignItems: 'center' }}> | sx={{ display: 'flex', alignItems: 'center' }}> | ||||
@@ -126,7 +126,7 @@ const ApplicationDetailCard = ({ data }) => { | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12} md={5} lg={5} sx={{ mb: 1, ml: 1 }}> | |||||
<Grid item xs={12} md={6} lg={6} sx={{ mb: 1}}> | |||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={12} md={4} lg={4} | <Grid item xs={12} md={4} lg={4} | ||||
sx={{ display: 'flex', alignItems: 'center' }}> | sx={{ display: 'flex', alignItems: 'center' }}> | ||||
@@ -8,6 +8,7 @@ import { | |||||
import * as React from "react"; | import * as React from "react"; | ||||
import * as HttpUtils from "utils/HttpUtils"; | import * as HttpUtils from "utils/HttpUtils"; | ||||
import * as DateUtils from "utils/DateUtils"; | |||||
import * as StatusUtils from "utils/statusUtils/DnStatus"; | import * as StatusUtils from "utils/statusUtils/DnStatus"; | ||||
import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
const MainCard = Loadable(React.lazy(() => import('components/MainCard'))); | const MainCard = Loadable(React.lazy(() => import('components/MainCard'))); | ||||
@@ -39,7 +40,7 @@ const DnDetailCard = ({ data }) => { | |||||
}; | }; | ||||
const getDisplayField = (label, value) => { | const getDisplayField = (label, value) => { | ||||
return <Grid item xs={12} md={5} lg={5} sx={{ mb: 1 }}> | |||||
return <Grid item xs={12} md={6} lg={6} sx={{ mb: 1 }}> | |||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={12} md={3} lg={3} | <Grid item xs={12} md={3} lg={3} | ||||
sx={{ display: 'flex', alignItems: 'center' }}> | sx={{ display: 'flex', alignItems: 'center' }}> | ||||
@@ -70,7 +71,7 @@ const DnDetailCard = ({ data }) => { | |||||
{getDisplayField("DN No.", dnData.dnNo)} | {getDisplayField("DN No.", dnData.dnNo)} | ||||
<Grid item xs={12} md={5} lg={5} sx={{ mb: 1, ml: 1 }}> | |||||
<Grid item xs={12} md={6} lg={6} sx={{ mb: 1}}> | |||||
<Grid container alignItems={"center"}> | <Grid container alignItems={"center"}> | ||||
<Grid item xs={12} md={3} lg={3} | <Grid item xs={12} md={3} lg={3} | ||||
sx={{ display: 'flex', alignItems: 'center' }}> | sx={{ display: 'flex', alignItems: 'center' }}> | ||||
@@ -89,7 +90,7 @@ const DnDetailCard = ({ data }) => { | |||||
{getDisplayField("Issue Date", dnData.issueDate)} | {getDisplayField("Issue Date", dnData.issueDate)} | ||||
{getDisplayField("DN Sent", dnData?.sentDate ? dnData.sentDate + " - " + dnData.sentBy : "--")} | |||||
{getDisplayField("DN Sent", dnData?.sentDate ? dnData.sentDate + " - " + (dnData.sentBy == null ? "System" : dnData.sentBy) : "--")} | |||||
</Grid> | </Grid> | ||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | <Grid container direction="row" justifyContent="space-between" alignItems="center"> | ||||
@@ -120,6 +121,35 @@ const DnDetailCard = ({ data }) => { | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | |||||
{getDisplayField("Reminder Schedule", "")} | |||||
{getDisplayField("Sent on", "")} | |||||
</Grid> | |||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | |||||
{getDisplayField("Reminder 1", DateUtils.dateStr(dnData.expectReminder1))} | |||||
{getDisplayField("Reminder 1", dnData?.reminder1 ? DateUtils.datetimeStr(dnData.reminder1) : "--")} | |||||
</Grid> | |||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | |||||
{getDisplayField("Reminder 2", DateUtils.dateStr(dnData.expectReminder2))} | |||||
{getDisplayField("Reminder 2", dnData?.reminder2 ? DateUtils.datetimeStr(dnData.reminder2) : "--")} | |||||
</Grid> | |||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | |||||
{getDisplayField("Reminder 3", DateUtils.dateStr(dnData.expectReminder3))} | |||||
{getDisplayField("Reminder 3", dnData?.reminder3 ? DateUtils.datetimeStr(dnData.reminder3) : "--")} | |||||
</Grid> | |||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | |||||
{getDisplayField("Reminder 4", DateUtils.dateStr(dnData.expectReminder4))} | |||||
{getDisplayField("Reminder 4", dnData?.reminder4 ? DateUtils.datetimeStr(dnData.reminder4) : "--")} | |||||
</Grid> | |||||
<Grid container direction="row" justifyContent="space-between" alignItems="center"> | |||||
{getDisplayField("Reminder Final", DateUtils.dateStr(dnData.expectReminderFinal))} | |||||
{getDisplayField("Reminder Final", dnData?.reminderFinal ? DateUtils.datetimeStr(dnData.reminderFinal) : "--")} | |||||
</Grid> | |||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
</MainCard> | </MainCard> | ||||
@@ -279,7 +279,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
<Grid container spacing={1}> | <Grid container spacing={1}> | ||||
<Grid item xs={12}> | <Grid item xs={12}> | ||||
<Typography variant="h4" sx={{ mb: 2, mr: 3, borderBottom: "1px solid black" }}> | <Typography variant="h4" sx={{ mb: 2, mr: 3, borderBottom: "1px solid black" }}> | ||||
Organization Details | |||||
Organisation Details | |||||
</Typography> | </Typography> | ||||
</Grid> | </Grid> | ||||
<Grid item xs={12}> | <Grid item xs={12}> | ||||
@@ -136,7 +136,7 @@ const OrganizationDetailPage = () => { | |||||
<Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | ||||
{isGLDLoggedIn()? | {isGLDLoggedIn()? | ||||
<Typography ml={15} color='#FFF' variant="h4" sx={{display: { xs: 'none', sm: 'none', md: 'block' }}}> | <Typography ml={15} color='#FFF' variant="h4" sx={{display: { xs: 'none', sm: 'none', md: 'block' }}}> | ||||
Maintain Organization | |||||
Maintain Organisation | |||||
</Typography> | </Typography> | ||||
: | : | ||||
<Typography ml={15} color='#FFF' variant="h4" sx={{display: { xs: 'none', sm: 'none', md: 'block' }}}> | <Typography ml={15} color='#FFF' variant="h4" sx={{display: { xs: 'none', sm: 'none', md: 'block' }}}> | ||||
@@ -283,27 +283,6 @@ | |||||
"pwGood": "Good", | "pwGood": "Good", | ||||
"pwStrong": "Strong", | "pwStrong": "Strong", | ||||
"islandCombo": "Island District", | |||||
"kwaiTsingCombo": "Kwai Tsing District", | |||||
"northCombo": "North District", | |||||
"saiKungCombo": "Sai Kung District", | |||||
"shaTinCombo": "Sha Tin District", | |||||
"taiPoCombo": "Tai Po District", | |||||
"tsuenWanCombo": "Tsuen Wan District", | |||||
"tuenMunCombo": "Tuen Mun District", | |||||
"yuenLongCombo": "Yuen Long District", | |||||
"kowloonCityCombo": "Kowloon City District", | |||||
"kwunTongCombo": "Kwun Tong District", | |||||
"shamShuiPoCombo": "Sham Shui Po District", | |||||
"wongTaiSinCombo": "Wong Tai Sin District", | |||||
"yauTsimMongCombo": "Yau Tsim Mong District", | |||||
"centralAndWesternCombo": "Central and Western District", | |||||
"easternCombo": "Eastern District", | |||||
"southernCombo": "Southern District", | |||||
"wanChaiCombo": "Wan Chai District", | |||||
"lantauIslandCombo": "Lantau Island", | |||||
"lammaIslandCombo": "Lamma Island District", | |||||
"pengChauCombo": "Peng Chau District", | |||||
"applyPublicNotice": "Apply for Public Notice", | "applyPublicNotice": "Apply for Public Notice", | ||||
"attention": "attention", | "attention": "attention", | ||||
@@ -277,28 +277,6 @@ | |||||
"pwGood": "良好", | "pwGood": "良好", | ||||
"pwStrong": "强", | "pwStrong": "强", | ||||
"islandCombo": "离岛区", | |||||
"kwaiTsingCombo": "葵青区", | |||||
"northCombo": "北区", | |||||
"saiKungCombo": "西贡区", | |||||
"shaTinCombo": "沙田区", | |||||
"taiPoCombo": "大埔区", | |||||
"tsuenWanCombo": "荃湾区", | |||||
"tuenMunCombo": "屯门区", | |||||
"yuenLongCombo": "元朗区", | |||||
"kowloonCityCombo": "九龙城区", | |||||
"kwunTongCombo": "观塘区", | |||||
"shamShuiPoCombo": "深水埗区", | |||||
"wongTaiSinCombo": "黄大仙区", | |||||
"yauTsimMongCombo": "油尖旺区", | |||||
"centralAndWesternCombo": "中西区", | |||||
"easternCombo": "东区", | |||||
"southernCombo": "南区", | |||||
"wanChaiCombo": "湾仔区", | |||||
"lantauIslandCombo": "大屿山区", | |||||
"lammaIslandCombo": "南丫岛区", | |||||
"pengChauCombo": "坪洲区", | |||||
"applyPublicNotice": "申请公共启事", | "applyPublicNotice": "申请公共启事", | ||||
"attention": "注意", | "attention": "注意", | ||||
"to": "到", | "to": "到", | ||||
@@ -280,28 +280,6 @@ | |||||
"pwGood": "良好", | "pwGood": "良好", | ||||
"pwStrong": "強", | "pwStrong": "強", | ||||
"islandCombo": "離島區", | |||||
"kwaiTsingCombo": "葵青區", | |||||
"northCombo": "北區", | |||||
"saiKungCombo": "西貢區", | |||||
"shaTinCombo": "沙田區", | |||||
"taiPoCombo": "大埔區", | |||||
"tsuenWanCombo": "荃灣區", | |||||
"tuenMunCombo": "屯門區", | |||||
"yuenLongCombo": "元朗區", | |||||
"kowloonCityCombo": "九龍城區", | |||||
"kwunTongCombo": "觀塘區", | |||||
"shamShuiPoCombo": "深水埗區", | |||||
"wongTaiSinCombo": "黃大仙區", | |||||
"yauTsimMongCombo": "油尖旺區", | |||||
"centralAndWesternCombo": "中西區", | |||||
"easternCombo": "東區", | |||||
"southernCombo": "南區", | |||||
"wanChaiCombo": "灣仔區", | |||||
"lantauIslandCombo": "大嶼山區", | |||||
"lammaIslandCombo": "南丫島區", | |||||
"pengChauCombo": "坪洲區", | |||||
"applyPublicNotice": "申請公共啟事", | "applyPublicNotice": "申請公共啟事", | ||||
"attention": "注意", | "attention": "注意", | ||||
"to": "到", | "to": "到", | ||||
@@ -79,6 +79,7 @@ export const POST_LOGIN = '/login'; | |||||
export const POST_CAPTCHA = apiPath+'/captcha'; | export const POST_CAPTCHA = apiPath+'/captcha'; | ||||
export const POST_TERMS_N_CONDITIONS = apiPath+'/termsAndConditions'; | export const POST_TERMS_N_CONDITIONS = apiPath+'/termsAndConditions'; | ||||
export const POST_VERIFY_CAPTCHA = apiPath+'/verifyCaptcha'; | export const POST_VERIFY_CAPTCHA = apiPath+'/verifyCaptcha'; | ||||
export const GET_COMBO = apiPath+'/combo-data'; | |||||
//register | //register | ||||
export const POST_PUBLIC_USER_REGISTER = apiPath+'/user/register'; | export const POST_PUBLIC_USER_REGISTER = apiPath+'/user/register'; | ||||