| @@ -13,7 +13,10 @@ export const hostPath = `http://${hostname}:${hostPort}`; | |||
| export const apiPath = `${hostPath}/api`; | |||
| // export const apiPath = `/api`; | |||
| export const paymentPath = `http://pnspsdev.gld.gov.hk/payment`; | |||
| export const iAmSmartPath = `https://<iAM_Smart_domain>`; | |||
| export const iAmSmartPath = `https://apigw-isit.staging-eid.gov.hk`; | |||
| // clientId : cf61fa7c121e4869966f69c8694b1cd2 | |||
| export const isUserLoggedIn = () => { | |||
| @@ -0,0 +1,66 @@ | |||
| // material-ui | |||
| import { | |||
| Grid, | |||
| Typography, | |||
| Stack, | |||
| } from '@mui/material'; | |||
| import * as React from "react"; | |||
| import Loadable from 'components/Loadable'; | |||
| const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | |||
| 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' | |||
| } | |||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
| const Index = () => { | |||
| const [onReady, setOnReady] = React.useState(false); | |||
| React.useEffect(() => { | |||
| setOnReady(true); | |||
| }, []); | |||
| return ( | |||
| !onReady ? | |||
| <LoadingComponent /> | |||
| : | |||
| <Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||
| <Grid item xs={12} width="100%"> | |||
| <div style={BackgroundHead} width="100%"> | |||
| <Stack direction="row" height='70px'> | |||
| <Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>iAmSmart 登入失敗</Typography> | |||
| </Stack> | |||
| </div> | |||
| </Grid> | |||
| {/*row 1*/} | |||
| <Grid item xs={12} md={12} > | |||
| <Grid container justifyContent="flex-start" alignItems="center" > | |||
| <center> | |||
| <Grid item xs={12} md={12} > | |||
| <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | |||
| 連接 iAM Smart 時出現錯誤,請重試。 | |||
| </Typography> | |||
| </Grid> | |||
| </center> | |||
| </Grid> | |||
| </Grid> | |||
| {/*row 2*/} | |||
| </Grid > | |||
| ); | |||
| }; | |||
| export default Index; | |||
| @@ -0,0 +1,66 @@ | |||
| // material-ui | |||
| import { | |||
| Grid, | |||
| Typography, | |||
| Stack, | |||
| } from '@mui/material'; | |||
| import * as React from "react"; | |||
| import Loadable from 'components/Loadable'; | |||
| const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | |||
| 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' | |||
| } | |||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | |||
| const Index = () => { | |||
| const [onReady, setOnReady] = React.useState(false); | |||
| React.useEffect(() => { | |||
| setOnReady(true); | |||
| }, []); | |||
| return ( | |||
| !onReady ? | |||
| <LoadingComponent /> | |||
| : | |||
| <Grid container sx={{ minHeight: '110vh', backgroundColor: '#fff' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||
| <Grid item xs={12} width="100%"> | |||
| <div style={BackgroundHead} width="100%"> | |||
| <Stack direction="row" height='70px'> | |||
| <Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>iAmSmart 成功登入</Typography> | |||
| </Stack> | |||
| </div> | |||
| </Grid> | |||
| {/*row 1*/} | |||
| <Grid item xs={12} md={12} > | |||
| <Grid container justifyContent="flex-start" alignItems="center" > | |||
| <center> | |||
| <Grid item xs={12} md={12} > | |||
| <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | |||
| iAmSmart 成功登入 | |||
| </Typography> | |||
| </Grid> | |||
| </center> | |||
| </Grid> | |||
| </Grid> | |||
| {/*row 2*/} | |||
| </Grid > | |||
| ); | |||
| }; | |||
| export default Index; | |||
| @@ -11,6 +11,10 @@ const AuthRegister = Loadable(lazy(() => import('pages/authentication/RegisterCu | |||
| const RegisterForm = Loadable(lazy(() => import('pages/authentication/Register'))); | |||
| const BusRegisterForm = Loadable(lazy(() => import('pages/authentication/BusRegister'))); | |||
| const ErrorPage = Loadable(lazy(() => import('pages/extra-pages/ErrorPage'))); | |||
| const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | |||
| const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | |||
| //TODO: this page for testing only, please remove at prod | |||
| const TestMailPage = Loadable(lazy(() => import('pages/pnspsNotifyTest'))); | |||
| // ==============================|| AUTH ROUTING ||============================== // | |||
| @@ -19,6 +23,10 @@ const LoginRoutes = { | |||
| path: '/', | |||
| element: <MainLayout />, | |||
| children: [ | |||
| {//TODO: this page for testing only, please remove at prod | |||
| path: 'testMailPage', | |||
| element: <TestMailPage/> | |||
| }, | |||
| { | |||
| path: 'login', | |||
| element: <AuthLogin /> | |||
| @@ -40,8 +48,12 @@ const LoginRoutes = { | |||
| element: <ErrorPage/> | |||
| }, | |||
| { | |||
| path: 'testMailPage', | |||
| element: <TestMailPage/> | |||
| path: 'iamsmart/loginfailback', | |||
| element: <IAmSmart_FailCallback/> | |||
| }, | |||
| { | |||
| path: 'iamsmart/logincallback', | |||
| element: <IAmSmart_SuccessCallback/> | |||
| } | |||
| ] | |||
| }; | |||