Anna Ho преди 1 година
родител
ревизия
524272274d
променени са 4 файла, в които са добавени 181 реда и са изтрити 2 реда
  1. +0
    -0
      src/pages/extra-pages/UserMenu/index.js
  2. +173
    -0
      src/pages/extra-pages/UserMenuPub/index.js
  3. +1
    -1
      src/pages/iAmSmart/RegistryCallback/index.js
  4. +7
    -1
      src/routes/LoginRoutes.js

src/pages/UserMenu/index.js → src/pages/extra-pages/UserMenu/index.js Целия файл


+ 173
- 0
src/pages/extra-pages/UserMenuPub/index.js Целия файл

@@ -0,0 +1,173 @@
import { Grid, Typography, Stack, } from '@mui/material';
import { useState, useEffect, lazy } from "react";

import Loadable from 'components/Loadable';
import { useIntl, FormattedMessage } from "react-intl";

import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'
const BackgroundHead = {
backgroundImage: `url(${titleBackgroundImg})`,
width: '100%',
height: '100%',
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
backgroundColor: '#0C489E',
backgroundPosition: 'right'
}

const LoadingComponent = Loadable(lazy(() => import('pages/extra-pages/LoadingComponent')));

import DownloadIcon from '@mui/icons-material/Download';

const UserMenu = () => {
const intl = useIntl();
const { locale } = intl;
const [onReady, setOnReady] = useState(false);

useEffect(() => {
setOnReady(true);
}, [locale]);

const tableStyle = {
fontFamily: "arial, sans-serif",
borderCollapse: "collapse",
width: "100%",
}

const cellStyle = {
border: "1px solid #dddddd",
textAlign: "left",
padding: "8px"
};

const getRow = ({ title, en, zh, cn }) => {
return <>
<tr>
<td style={cellStyle}>{title}</td>
<td style={cellStyle}><a href={en} target='_brank'><DownloadIcon /></a></td>
<td style={cellStyle}><a href={zh} target='_brank'><DownloadIcon /></a></td>
<td style={cellStyle}><a href={cn} target='_brank'><DownloadIcon /></a></td>
</tr>
</>
;
}


return (
!onReady ?
<Grid container sx={{ minHeight: '87vh', mb: 3 }} direction="column" justifyContent="center" alignItems="center">
<Grid item>
<LoadingComponent />
</Grid>
</Grid>
:
(
<Grid container justifyContent="center" alignItems="center" >
<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', pt: 2 } }}>
<FormattedMessage id="userGuide" />
</Typography>
</Stack>
</div>
</Grid>
<Grid item xs={10} md={5}>
<div style={{
textAlign: "justify",
textJustify: "interWord",
fontStyle: "normal"
}}>

<p>
<FormattedMessage id="userGuideDes" />
<table style={tableStyle}>
<tr>
<th style={cellStyle} width="70%"> <FormattedMessage id="fileName" /></th>
<th style={cellStyle} width="10%">English</th>
<th style={cellStyle} width="10%">繁體中文</th>
<th style={cellStyle} width="10%">简体中文</th>
</tr>

{getRow({
title: <FormattedMessage id="userGuide1" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/01 - Account Activation.pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/01c - Account Activation.pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/01sc - Account Activation.pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide2" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/02 - Login.pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/02c - Login.pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/02sc - Login.pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide3" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/03 - Application for publishing a Public Notice in the Gazette.pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/03c - Application for publishing a Public Notice in the Gazette.pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/03sc - Application for publishing a Public Notice in the Gazette.pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide4" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/04 - Proofreading reply (with correction).pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/04c - Proofreading reply (with correction).pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/04sc - Proofreading reply (with correction).pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide5" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/05 - Proofreading reply (pass for printing).pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/05c - Proofreading reply (pass for printing).pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/05sc - Proofreading reply (pass for printing).pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide6" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/06 - Cancellation of application for publishing a Public Notice in the Gazette.pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/06c - Cancellation of application for publishing a Public Notice in the Gazette.pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/06sc - Cancellation of application for publishing a Public Notice in the Gazette.pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide7" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/07 - Forgot password.pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/07c - Forgot password.pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/07sc - Forgot password.pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide8" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/08 - Change password.pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/08c - Change password.pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/08sc - Change password.pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide9" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/09 - Language of email notification.pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/09c - Language of email notification.pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/09sc - Language of email notification.pdf"
})}

{getRow({
title: <FormattedMessage id="userGuide10" />,
en: "https://pnsps.gld.gov.hk/user-guide/eng/10 - Download General Demand Note for making payment(s).pdf",
zh: "https://pnsps.gld.gov.hk/user-guide/cht/10c - Download General Demand Note for making payment(s).pdf",
cn: "https://pnsps.gld.gov.hk/user-guide/chs/10sc - Download General Demand Note for making payment(s).pdf"
})}


</table>
</p>
</div>
</Grid>
</Grid>
)
);

}

export default UserMenu;

+ 1
- 1
src/pages/iAmSmart/RegistryCallback/index.js Целия файл

@@ -39,7 +39,7 @@ const Index = () => {
onError:(error)=>{
console.log(error);
if(error?.response?.data?.exception == "msg: account created"){
window.location.assign("/iamsmart/pleaseLogin", { state: {registryMethod:"iAmSmart"}} );
navigate("/iamsmart/pleaseLogin", { state: {registryMethod:"iAmSmart"}} );
}else{
window.location.assign("/register");
}


+ 7
- 1
src/routes/LoginRoutes.js Целия файл

@@ -15,7 +15,9 @@ const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage')));
const PrivacyPolicyPage = Loadable(lazy(() => import('pages/extra-pages/PrivacyPolicy')));
const ImportantNoticePage = Loadable(lazy(() => import('pages/extra-pages/ImportantNotice')));
const AboutUsPage = Loadable(lazy(() => import('pages/AboutUs')));
const UserMenuPage = Loadable(lazy(() => import('pages/UserMenu')));
const UserMenuPage = Loadable(lazy(() => import('pages/extra-pages/UserMenu')));
const UserMenuPubPage = Loadable(lazy(() => import('pages/extra-pages/UserMenuPub')));


const ForgotPassword = Loadable(lazy(() => import('pages/authentication/ForgotPassword')));
const AfterForgotPasswordPage = Loadable(lazy(() => import('pages/authentication/ForgotPassword/AfterForgotPasswordPage')));
@@ -87,6 +89,10 @@ const LoginRoutes = {
path: 'userGuide',
element: <UserMenuPage/>
},
{
path: 'userGuidePub',
element: <UserMenuPubPage/>
},
{
path: 'iamsmart/logincallback',
element: <IAmSmart_DirectLoginCallback/>


Зареждане…
Отказ
Запис