@@ -67,7 +67,7 @@ const Index = () => { | |||||
// } | // } | ||||
// } | // } | ||||
dispatch(handleLogin(data)) | dispatch(handleLogin(data)) | ||||
navigate('/dashboard'); | |||||
navigate('iamsmart/loginSucess', {state:{loginMethod:"iAmSmart"}}); | |||||
}, | }, | ||||
onFail: (response)=>{ | onFail: (response)=>{ | ||||
console.log("onFail"); | console.log("onFail"); | ||||
@@ -3,9 +3,12 @@ import { | |||||
Grid, | Grid, | ||||
Typography, | Typography, | ||||
Stack, | Stack, | ||||
Button | |||||
} from '@mui/material'; | } from '@mui/material'; | ||||
import * as React from "react"; | import * as React from "react"; | ||||
import { FormattedMessage } from "react-intl"; | |||||
import { useLocation } from "react-router-dom"; | |||||
import { useNavigate } from "react-router-dom"; | |||||
import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | ||||
@@ -23,11 +26,16 @@ const BackgroundHead = { | |||||
// ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
const Index = () => { | const Index = () => { | ||||
const location = useLocation(); | |||||
const navigate = useNavigate() | |||||
const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
React.useEffect(() => { | React.useEffect(() => { | ||||
setOnReady(true); | |||||
if("iAmSmart"==location.state.loginMethod){ | |||||
setOnReady(true); | |||||
}else{ | |||||
navigate('/dashboard'); | |||||
} | |||||
}, []); | }, []); | ||||
return ( | return ( | ||||
@@ -42,7 +50,9 @@ const Index = () => { | |||||
<Grid item xs={12} width="100%"> | <Grid item xs={12} width="100%"> | ||||
<div style={BackgroundHead} width="100%"> | <div style={BackgroundHead} width="100%"> | ||||
<Stack direction="row" height='70px'> | <Stack direction="row" height='70px'> | ||||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}>iAM Smart 成功登入</Typography> | |||||
<Typography ml={15} color='#FFF' variant="h4" sx={{ pt: 2 }}> | |||||
<FormattedMessage id="loginSuccessMessage1" /> | |||||
</Typography> | |||||
</Stack> | </Stack> | ||||
</div> | </div> | ||||
</Grid> | </Grid> | ||||
@@ -51,18 +61,31 @@ const Index = () => { | |||||
<Grid container justifyContent="flex-start" alignItems="center" > | <Grid container justifyContent="flex-start" alignItems="center" > | ||||
<center> | <center> | ||||
<Grid item xs={12} md={12} > | <Grid item xs={12} md={12} > | ||||
<Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | <Typography variant="h3" sx={{ ml: 8, mt: 4, mr: 8, textAlign: "center" }}> | ||||
iAM Smart 成功登入 | |||||
<FormattedMessage id="loginSuccessMessage2" /> | |||||
</Typography> | </Typography> | ||||
</Grid> | </Grid> | ||||
</center> | </center> | ||||
</Grid> | </Grid> | ||||
</Grid> | </Grid> | ||||
{/*row 2*/} | {/*row 2*/} | ||||
<Grid item xs={12} md={12} > | |||||
<Grid container justifyContent="flex-start" alignItems="center" > | |||||
<center> | |||||
<Button | |||||
component="span" | |||||
variant="contained" | |||||
size="large" | |||||
sx={{ m: 4 }} | |||||
onClick={() => { navigate("/dashboard"); }} | |||||
> | |||||
<FormattedMessage id="loginSuccessMessage3" /> | |||||
</Button> | |||||
</center> | |||||
</Grid> | |||||
</Grid> | |||||
</Grid > | </Grid > | ||||
); | ); | ||||
}; | }; | ||||
@@ -5,6 +5,7 @@ import Loadable from 'components/Loadable'; | |||||
import { Navigate } from "react-router"; | import { Navigate } from "react-router"; | ||||
const MainLayout = Loadable(lazy(() => import('layout/MainLayout'))); | const MainLayout = Loadable(lazy(() => import('layout/MainLayout'))); | ||||
const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | |||||
// ==============================|| MAIN ROUTING ||============================== // | // ==============================|| MAIN ROUTING ||============================== // | ||||
@@ -42,7 +43,7 @@ const AfterLoginRoutes = { | |||||
}, | }, | ||||
{ | { | ||||
path: 'iamsmart/loginSucess', | path: 'iamsmart/loginSucess', | ||||
element: <Navigate to="/dashboard" /> | |||||
element: <IAmSmart_SuccessCallback/> | |||||
}, | }, | ||||
{ | { | ||||
path: 'verify/:verifyCode/:email', | path: 'verify/:verifyCode/:email', | ||||
@@ -27,7 +27,6 @@ const IAmSmart_DirectLoginCallback = Loadable(lazy(() => import('pages/iAmSmart/ | |||||
//const IAmSmart_FallCallback = Loadable(lazy(() => import('pages/iAmSmart/FallCallback'))); | //const IAmSmart_FallCallback = Loadable(lazy(() => import('pages/iAmSmart/FallCallback'))); | ||||
const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | const IAmSmart_FailCallback = Loadable(lazy(() => import('pages/iAmSmart/FailCallback'))); | ||||
const FailCallback_VerifyMail = Loadable(lazy(() => import('pages/iAmSmart/FailCallback_VerifyMail'))); | const FailCallback_VerifyMail = Loadable(lazy(() => import('pages/iAmSmart/FailCallback_VerifyMail'))); | ||||
const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback'))); | |||||
const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCallback'))); | const IAmSmart_AuthCallback = Loadable(lazy(() => import('pages/iAmSmart/AuthCallback'))); | ||||
const IAmSmart_RegistryCallback = Loadable(lazy(() => import('pages/iAmSmart/RegistryCallback'))); | const IAmSmart_RegistryCallback = Loadable(lazy(() => import('pages/iAmSmart/RegistryCallback'))); | ||||
@@ -90,10 +89,6 @@ const LoginRoutes = { | |||||
path: 'iamsmart/loginFail', | path: 'iamsmart/loginFail', | ||||
element: <IAmSmart_FailCallback/> | element: <IAmSmart_FailCallback/> | ||||
}, | }, | ||||
{ | |||||
path: 'iamsmart/loginSucess', | |||||
element: <IAmSmart_SuccessCallback/> | |||||
}, | |||||
{ | { | ||||
path: 'verify/:verifyCode/:email', | path: 'verify/:verifyCode/:email', | ||||
element: <VerifyPage/> | element: <VerifyPage/> | ||||
@@ -152,7 +152,11 @@ | |||||
"loginErrorMessage3":"Account has not been Verified", | "loginErrorMessage3":"Account has not been Verified", | ||||
"loginErrorMessage4":"System Connection Failed", | "loginErrorMessage4":"System Connection Failed", | ||||
"loginErrorMessage5":"Incorrect Username or Password", | "loginErrorMessage5":"Incorrect Username or Password", | ||||
"loginErrorMessage6":"Login fail, please try again", | |||||
"loginErrorMessage6":"User account not found", | |||||
"loginSuccessMessage1":"User account not found", | |||||
"loginSuccessMessage2":"You are our existing user and successfully linked your existing account. From now on, you can log in through \"iAm Smart\".", | |||||
"loginSuccessMessage3":"Continue to use e-Service", | |||||
"newPassword": "New Password", | "newPassword": "New Password", | ||||
"setNewPassword": "Please enter new password", | "setNewPassword": "Please enter new password", | ||||
@@ -243,7 +247,7 @@ | |||||
"uploadIdDoc": "Upload identity document", | "uploadIdDoc": "Upload identity document", | ||||
"fileName": "File name", | "fileName": "File name", | ||||
"fileSize": "File size", | "fileSize": "File size", | ||||
"fileSizeWarning": "Upload file size should be <10MB", | |||||
"fileSizeWarning": "Upload file size should be within 10MB", | |||||
"dnOverdueWarning": "Please settle the outstanding demand note(s) as soon as possible.", | "dnOverdueWarning": "Please settle the outstanding demand note(s) as soon as possible.", | ||||
"noFile": "No file uploaded", | "noFile": "No file uploaded", | ||||
"termsAndCondition": "Terms and Conditions", | "termsAndCondition": "Terms and Conditions", | ||||
@@ -178,7 +178,11 @@ | |||||
"loginErrorMessage3":"帐户尚未验证", | "loginErrorMessage3":"帐户尚未验证", | ||||
"loginErrorMessage4":"系统连接失败", | "loginErrorMessage4":"系统连接失败", | ||||
"loginErrorMessage5":"用户名或密码错误", | "loginErrorMessage5":"用户名或密码错误", | ||||
"loginErrorMessage6":"登入失败,请重试", | |||||
"loginErrorMessage6":"找不到用户帐户", | |||||
"loginSuccessMessage1":"成功连结现有帐户", | |||||
"loginSuccessMessage2":"你是我们的现有用户,已成功连结现有帐户,以后可以透过「智方便」登入。", | |||||
"loginSuccessMessage3":"继续使用e-Service", | |||||
"newPassword": "新密码", | "newPassword": "新密码", | ||||
"setNewPassword": "请输入新密码", | "setNewPassword": "请输入新密码", | ||||
@@ -197,7 +201,7 @@ | |||||
"requireSecurityCode": "请输入安全验证码", | "requireSecurityCode": "请输入安全验证码", | ||||
"learnMore": "了解更多", | "learnMore": "了解更多", | ||||
"createOrReActivate": "建立帐户", | "createOrReActivate": "建立帐户", | ||||
"usernameTaken": "此用户登入名称已被注册,请使用其他用户登入名称", | |||||
"usernameTaken": "此用户登入名称已被注册,请使用其他用户登入名称。", | |||||
"userRegistered": "此用户已注册,请返回登入页面并进行登入流程。", | "userRegistered": "此用户已注册,请返回登入页面并进行登入流程。", | ||||
"user": "用戶", | "user": "用戶", | ||||
@@ -266,7 +270,7 @@ | |||||
"uploadIdDoc": "上传身份证明文件", | "uploadIdDoc": "上传身份证明文件", | ||||
"fileName": "档案名称", | "fileName": "档案名称", | ||||
"fileSize": "档案大小", | "fileSize": "档案大小", | ||||
"fileSizeWarning": "上传档案大小应<10MB", | |||||
"fileSizeWarning": "上传档案应不大于 10MB", | |||||
"dnOverdueWarning": "请尽快缴付所有逾期未缴交的款额。", | "dnOverdueWarning": "请尽快缴付所有逾期未缴交的款额。", | ||||
"noFile": "没有上传档案", | "noFile": "没有上传档案", | ||||
"termsAndCondition": "条款和条件", | "termsAndCondition": "条款和条件", | ||||
@@ -179,7 +179,11 @@ | |||||
"loginErrorMessage3":"帳戶尚未驗證", | "loginErrorMessage3":"帳戶尚未驗證", | ||||
"loginErrorMessage4":"系統連接失敗", | "loginErrorMessage4":"系統連接失敗", | ||||
"loginErrorMessage5":"用戶名或密碼錯誤", | "loginErrorMessage5":"用戶名或密碼錯誤", | ||||
"loginErrorMessage6":"登入失敗,請重試", | |||||
"loginErrorMessage6":"找不到用戶帳戶", | |||||
"loginSuccessMessage1":"成功連結現有帳戶", | |||||
"loginSuccessMessage2":"你是我們的現有用戶,已成功連結現有帳戶,以後可以透過「智方便」登入。", | |||||
"loginSuccessMessage3":"繼續使用e-Service", | |||||
"newPassword": "新密碼", | "newPassword": "新密碼", | ||||
"setNewPassword": "請輸入新密碼", | "setNewPassword": "請輸入新密碼", | ||||
@@ -268,7 +272,7 @@ | |||||
"uploadFile": "上傳商業登記證及其他文件", | "uploadFile": "上傳商業登記證及其他文件", | ||||
"fileName": "檔案名稱", | "fileName": "檔案名稱", | ||||
"fileSize": "檔案大小", | "fileSize": "檔案大小", | ||||
"fileSizeWarning": "上傳檔案大小應<10MB", | |||||
"fileSizeWarning": "上傳檔案應不大於 10MB", | |||||
"dnOverdueWarning": "請盡快繳付所有逾期未繳交的款額。", | "dnOverdueWarning": "請盡快繳付所有逾期未繳交的款額。", | ||||
"noFile": "沒有上傳檔案", | "noFile": "沒有上傳檔案", | ||||
"termsAndCondition": "條款和條件", | "termsAndCondition": "條款和條件", | ||||