瀏覽代碼

update setting page i18n

master
jason.lam 1 年之前
父節點
當前提交
016b915a5a
共有 8 個檔案被更改,包括 90 行新增68 行删除
  1. +2
    -2
      src/layout/MainLayout/Header/index.js
  2. +26
    -33
      src/pages/User/DetailsPage_Individual/UserInformationCard_Individual_Pub.js
  3. +4
    -1
      src/pages/User/DetailsPage_Individual/index.js
  4. +21
    -29
      src/pages/User/DetailsPage_Organization/UserInformationCard_Organization_Pub.js
  5. +4
    -2
      src/pages/User/DetailsPage_Organization/index.js
  6. +11
    -1
      src/translations/en.json
  7. +11
    -0
      src/translations/zh-CN.json
  8. +11
    -0
      src/translations/zh-HK.json

+ 2
- 2
src/layout/MainLayout/Header/index.js 查看文件

@@ -208,7 +208,7 @@ function Header(props) {
<Link className="manageUser" to={'/orgUser'}> <Link className="manageUser" to={'/orgUser'}>
<Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}> <Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}>
{/* <FormattedMessage id="companyOrUserRecord" /> */} {/* <FormattedMessage id="companyOrUserRecord" /> */}
User Profile
<FormattedMessage id="userProfile" />
</Typography> </Typography>
</Link> </Link>
</li> </li>
@@ -235,7 +235,7 @@ function Header(props) {
<Link className="manageUser" to={'/indUser'}> <Link className="manageUser" to={'/indUser'}>
<Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}> <Typography style={{ opacity: 0.9 }} variant={"pnspsHeaderTitle"} sx={{ ml: 2 }}>
{/* <FormattedMessage id="companyOrUserRecord" /> */} {/* <FormattedMessage id="companyOrUserRecord" /> */}
User Profile
<FormattedMessage id="userProfile" />
</Typography> </Typography>
</Link> </Link>
</li> </li>


+ 26
- 33
src/pages/User/DetailsPage_Individual/UserInformationCard_Individual_Pub.js 查看文件

@@ -16,7 +16,9 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo
import Loadable from 'components/Loadable'; import Loadable from 'components/Loadable';
import { lazy } from 'react'; import { lazy } from 'react';
import {notifySaveSuccess,} from 'utils/CommonFunction'; import {notifySaveSuccess,} from 'utils/CommonFunction';
import {useIntl} from "react-intl";
import {FormattedMessage, useIntl} from "react-intl";
import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst";
import {ThemeProvider} from "@emotion/react";
// ==============================|| DASHBOARD - DEFAULT ||============================== // // ==============================|| DASHBOARD - DEFAULT ||============================== //




@@ -111,63 +113,52 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {
<Grid container maxWidth justifyContent="flex-start"> <Grid container maxWidth justifyContent="flex-start">
{editMode ? {editMode ?
<> <>
<Grid item sx={{ mr: 3 }}>
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Grid item sx={{ mr: 3 }}>
<Button <Button
size="large"
variant="contained" variant="contained"
onClick={loadDataFun} onClick={loadDataFun}
sx={{
textTransform: 'capitalize',
alignItems: 'end'
}}
> >
<Typography variant="h5">Reset & Back</Typography>
<FormattedMessage id="resetAndBack" />
</Button> </Button>
</Grid> </Grid>


<Grid item sx={{ ml: 3, mr: 3 }}> <Grid item sx={{ ml: 3, mr: 3 }}>
<Button <Button
size="large"
variant="contained" variant="contained"
type="submit" type="submit"
color="success" color="success"
sx={{
textTransform: 'capitalize',
alignItems: 'end'
}}
> >
<Typography variant="h5">Save</Typography>
<FormattedMessage id="save" />
</Button> </Button>
</Grid> </Grid>
</ThemeProvider>
</> </>
: :
<> <>
<Grid item sx={{ mr: 3 }}>
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Grid item sx={{ mr: 3 }}>
<Button <Button
size="large"
variant="contained" variant="contained"
sx={{
textTransform: 'capitalize',
alignItems: 'end'
}}
onClick={onEditClick} onClick={onEditClick}
> >
<Typography variant="h5">Edit</Typography>
<FormattedMessage id="edit" />
</Button> </Button>
</Grid> </Grid>
</ThemeProvider>
</> </>
} }
</Grid> </Grid>
</Grid> </Grid>
{/*end top button*/} {/*end top button*/}
<Typography variant="h4" sx={{ mt: 3, mb: 2, borderBottom: "1px solid black" }}> <Typography variant="h4" sx={{ mt: 3, mb: 2, borderBottom: "1px solid black" }}>
User Details
<FormattedMessage id="userDetail" />
</Typography> </Typography>
<Grid item xs={12} sm={12} md={12} lg={12}> <Grid item xs={12} sm={12} md={12} lg={12}>
<Grid container> <Grid container>
<Grid item xs={12} sm={12} md={12} lg={4} > <Grid item xs={12} sm={12} md={12} lg={4} >
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "Username:",
label: intl.formatMessage({id: 'userLoginName'}) + ":",
valueName: "username", valueName: "username",
disabled: true, disabled: true,
form: formik form: formik
@@ -176,7 +167,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "English Name:",
label: intl.formatMessage({id: 'userEnglishName'}) + ":",
valueName: "enName", valueName: "enName",
disabled: true, disabled: true,
form: formik form: formik
@@ -185,7 +176,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "Chinese Name:",
label: intl.formatMessage({id: 'userChineseName'}) + ":",
valueName: "chName", valueName: "chName",
disabled: true, disabled: true,
form: formik form: formik
@@ -194,7 +185,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getComboField({ {FieldUtils.getComboField({
label: "ID Type:",
label: intl.formatMessage({id: 'idType'}) + ":",
valueName: "idDocType", valueName: "idDocType",
disabled: true, disabled: true,
dataList: ComboData.idDocType, dataList: ComboData.idDocType,
@@ -223,7 +214,9 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {
<Grid xs={12} sm={12} md={12} lg={4}> <Grid xs={12} sm={12} md={12} lg={4}>
<Grid container alignItems={"center"} sx={{mb:2}}> <Grid container alignItems={"center"} sx={{mb:2}}>
<Grid item xs={12} sm={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> <Grid item xs={12} sm={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}>
<Typography variant="h5">ID No.:</Typography>
<Typography variant="h5">
<FormattedMessage id="idNo" />:
</Typography>
</Grid> </Grid>


<Grid item xs={12} sm={12} md={9} lg={6}> <Grid item xs={12} sm={12} md={9} lg={6}>
@@ -270,7 +263,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getPhoneField({ {FieldUtils.getPhoneField({
label: "Contact Tel:",
label: intl.formatMessage({id: 'userContactNumber'}) + ":",
valueName: { valueName: {
code: "tel_countryCode", code: "tel_countryCode",
num: "phoneNumber" num: "phoneNumber"
@@ -282,7 +275,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getComboField({ {FieldUtils.getComboField({
label: "Country:",
label: intl.formatMessage({id: 'country'}) + ":",
valueName: "country", valueName: "country",
getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "", getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "",
dataList: ComboData.country, dataList: ComboData.country,
@@ -293,7 +286,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {
<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "Email:",
label: intl.formatMessage({id: 'userContactEmail'}) + ":",
valueName: "emailAddress", valueName: "emailAddress",
disabled: true, disabled: true,
form: formik form: formik
@@ -302,7 +295,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getPhoneField({ {FieldUtils.getPhoneField({
label: "Fax No.:",
label: intl.formatMessage({id: 'userFaxNumber'}) + ":",
valueName: { valueName: {
code: "fax_countryCode", code: "fax_countryCode",
num: "faxNumber" num: "faxNumber"
@@ -316,7 +309,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getAddressField({ {FieldUtils.getAddressField({
label: "Address:",
label: intl.formatMessage({id: 'userAddress'}) + ":",
valueName: ["addressLine1", "addressLine2", "addressLine3"], valueName: ["addressLine1", "addressLine2", "addressLine3"],
disabled: (!editMode), disabled: (!editMode),
form: formik form: formik
@@ -325,7 +318,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => {


<Grid item xs={12} sm={12} md={12} lg={4}> <Grid item xs={12} sm={12} md={12} lg={4}>
{FieldUtils.getComboField({ {FieldUtils.getComboField({
label: "District:",
label: intl.formatMessage({id: 'district'}) + ":",
valueName: "district", valueName: "district",
dataList: ComboData.district, dataList: ComboData.district,
getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "", getOptionLabel: (option) => option.type? intl.formatMessage({ id: option.type }) : "",


+ 4
- 1
src/pages/User/DetailsPage_Individual/index.js 查看文件

@@ -33,6 +33,7 @@ import {
isINDLoggedIn, isINDLoggedIn,
isORGLoggedIn isORGLoggedIn
} from "utils/Utils"; } from "utils/Utils";
import {FormattedMessage} from "react-intl";
// ==============================|| DASHBOARD - DEFAULT ||============================== // // ==============================|| DASHBOARD - DEFAULT ||============================== //




@@ -126,7 +127,9 @@ const UserMaintainPage_Individual = () => {
{isGLDLoggedIn()? {isGLDLoggedIn()?
<Typography ml={15} color='#FFF' variant="h4">Maintain Individual User</Typography> <Typography ml={15} color='#FFF' variant="h4">Maintain Individual User</Typography>
: :
<Typography ml={15} color='#FFF' variant="h4">User Profile</Typography>
<Typography ml={15} color='#FFF' variant="h4">
<FormattedMessage id="userProfile" />
</Typography>
} }
</Stack> </Stack>
</div> </div>


+ 21
- 29
src/pages/User/DetailsPage_Organization/UserInformationCard_Organization_Pub.js 查看文件

@@ -16,7 +16,9 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo
import Loadable from 'components/Loadable'; import Loadable from 'components/Loadable';
import { lazy } from 'react'; import { lazy } from 'react';
import { notifySaveSuccess, } from 'utils/CommonFunction'; import { notifySaveSuccess, } from 'utils/CommonFunction';
import {useIntl} from "react-intl";
import {FormattedMessage, useIntl} from "react-intl";
import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst";
import {ThemeProvider} from "@emotion/react";


// import { // import {
// isPrimaryLoggedIn, // isPrimaryLoggedIn,
@@ -107,51 +109,41 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {
<Grid container maxWidth justifyContent="flex-start"> <Grid container maxWidth justifyContent="flex-start">
{editMode ? {editMode ?
<> <>
<Grid item sx={{ ml: 3, mr: 3 }}>
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Grid item sx={{ ml: 3, mr: 3 }}>
<Button <Button
size="large"
variant="contained" variant="contained"
onClick={loadDataFun} onClick={loadDataFun}
sx={{
textTransform: 'capitalize',
alignItems: 'end'
}}
> >
<Typography variant="h5">Reset & Back</Typography>
<FormattedMessage id="resetAndBack" />

</Button> </Button>
</Grid> </Grid>
<Grid item sx={{ ml: 3, mr: 3 }}> <Grid item sx={{ ml: 3, mr: 3 }}>
<Button <Button
size="large"
variant="contained" variant="contained"
type="submit" type="submit"
color="success" color="success"
sx={{
textTransform: 'capitalize',
alignItems: 'end'
}}
> >
<Typography variant="h5">Save</Typography>
<FormattedMessage id="save" />

</Button> </Button>
</Grid> </Grid>
</ThemeProvider>
</> </>
: :
<> <>
<Grid item sx={{ ml: 3, mr: 3 }}>
<ThemeProvider theme={PNSPS_BUTTON_THEME}>
<Grid item sx={{ ml: 3, mr: 3 }}>
<Button <Button
size="large"
variant="contained" variant="contained"
sx={{
textTransform: 'capitalize',
alignItems: 'end'
}}
onClick={onEditClick} onClick={onEditClick}
> >
<Typography variant="h5">Edit</Typography>
<FormattedMessage id="edit" />

</Button> </Button>
</Grid> </Grid>
</ThemeProvider>
</> </>
} }


@@ -161,12 +153,12 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {
{/*end top button*/} {/*end top button*/}
<div style={{ paddingLeft: 24, paddingRight: 24 }}> <div style={{ paddingLeft: 24, paddingRight: 24 }}>
<Typography variant="h4" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}> <Typography variant="h4" sx={{ mt: 3, mb: 2, mr: 3, borderBottom: "1px solid black" }}>
User Details
<FormattedMessage id="userDetail" />
</Typography> </Typography>
<Grid container spacing={1}> <Grid container spacing={1}>
<Grid item lg={12}> <Grid item lg={12}>
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "Username:",
label: intl.formatMessage({id: 'userLoginName'}) + ":",
valueName: "username", valueName: "username",
disabled: true, disabled: true,
form: formik form: formik
@@ -175,7 +167,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {


<Grid item lg={12}> <Grid item lg={12}>
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "Name:",
label: intl.formatMessage({id: 'userContactName'}) + ":",
valueName: "contactPerson", valueName: "contactPerson",
disabled: true, disabled: true,
form: formik form: formik
@@ -184,7 +176,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {


<Grid item lg={12}> <Grid item lg={12}>
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "Email:",
label: intl.formatMessage({id: 'userContactEmail'}) + ":",
valueName: "emailBus", valueName: "emailBus",
disabled: true, disabled: true,
form: formik form: formik
@@ -193,7 +185,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {


<Grid item lg={12}> <Grid item lg={12}>
{FieldUtils.getPhoneField({ {FieldUtils.getPhoneField({
label: "Contact Tel:",
label: intl.formatMessage({id: 'userContactNumber'}) + ":",
valueName: { valueName: {
code: "tel_countryCode", code: "tel_countryCode",
num: "phoneNumber" num: "phoneNumber"
@@ -205,7 +197,7 @@ const UserInformationCard_Organization_Pub = ({ userData, loadDataFun,}) => {


<Grid item lg={12}> <Grid item lg={12}>
{FieldUtils.getTextField({ {FieldUtils.getTextField({
label: "Primary User:",
label: intl.formatMessage({id: 'primaryUser'}) + ":",
valueName: "primaryUser", valueName: "primaryUser",
disabled: true, disabled: true,
form: formik form: formik


+ 4
- 2
src/pages/User/DetailsPage_Organization/index.js 查看文件

@@ -36,7 +36,7 @@ import {
isORGLoggedIn, isORGLoggedIn,
isINDLoggedIn isINDLoggedIn
} from "utils/Utils"; } from "utils/Utils";
import {useIntl} from "react-intl";
import {FormattedMessage, useIntl} from "react-intl";


// ==============================|| DASHBOARD - DEFAULT ||============================== // // ==============================|| DASHBOARD - DEFAULT ||============================== //


@@ -188,7 +188,9 @@ const UserMaintainPage_Organization = () => {
{isGLDLoggedIn()? {isGLDLoggedIn()?
<Typography ml={15} color='#FFF' variant="h4">Maintain Organisation User</Typography> <Typography ml={15} color='#FFF' variant="h4">Maintain Organisation User</Typography>
: :
<Typography ml={15} color='#FFF' variant="h4">User Profile</Typography>
<Typography ml={15} color='#FFF' variant="h4">
<FormattedMessage id="userProfile" />
</Typography>
} }
</Stack> </Stack>
</div> </div>


+ 11
- 1
src/translations/en.json 查看文件

@@ -59,7 +59,6 @@


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

"iAmSmartLogin": "iAM Smart Login", "iAmSmartLogin": "iAM Smart Login",
"continueWithIAmSmart": "Continue with iAmSmart", "continueWithIAmSmart": "Continue with iAmSmart",
"authorizeIAmSmartForInfo": "Authorize iAmSmart to provide personal information", "authorizeIAmSmartForInfo": "Authorize iAmSmart to provide personal information",
@@ -343,6 +342,17 @@
"viewAllSystemMessage": "Show all messages", "viewAllSystemMessage": "Show all messages",
"msgDetails": "Message Details", "msgDetails": "Message Details",


"userDetail": "User Details",
"userProfile": "User Profile",
"primaryUser": "Primary User",
"resetAndBack": "Reset & Back",
"edit": "Edit",
"save": "Save",
"idType": " ID Type",
"idNo": "ID No.",
"country": "Country",
"district": "District",

"Dashboard": "Dashboard", "Dashboard": "Dashboard",
"event": "Event" "event": "Event"
} }

+ 11
- 0
src/translations/zh-CN.json 查看文件

@@ -342,6 +342,17 @@
"viewAllSystemMessage": "显示所有消息", "viewAllSystemMessage": "显示所有消息",
"msgDetails": "消息详情", "msgDetails": "消息详情",


"userDetail": "用户详细信息",
"userProfile": "用户个人资料",
"primaryUser": "主要用户",
"resetAndBack": "重置并返回",
"edit": "编辑",
"save": "保存",
"idType": "身份证类型",
"idNo": "身份证号码",
"country": "国家",
"district": "区",

"Dashboard": "仪表板", "Dashboard": "仪表板",
"event": "活动" "event": "活动"
} }

+ 11
- 0
src/translations/zh-HK.json 查看文件

@@ -342,6 +342,17 @@
"viewAllSystemMessage": "顯示所有消息", "viewAllSystemMessage": "顯示所有消息",
"msgDetails": "消息詳情", "msgDetails": "消息詳情",


"userDetail": "使用者詳細資料",
"userProfile": "使用者個人資料",
"primaryUser": "主要使用者",
"resetAndBack": "重置並返回",
"edit": "編輯",
"save": "保存",
"idType": "身分證類型",
"idNo": "身分證號碼",
"country": "國家",
"district": "區",

"Dashboard": "儀表板", "Dashboard": "儀表板",
"event": "活動" "event": "活動"
} }

Loading…
取消
儲存