|
@@ -1,5 +1,4 @@ |
|
|
import { lazy, useContext } from 'react'; |
|
|
|
|
|
import { SysContext } from "components/SysSettingProvider" |
|
|
|
|
|
|
|
|
import { lazy } from 'react'; |
|
|
|
|
|
|
|
|
// project import |
|
|
// project import |
|
|
import Loadable from 'components/Loadable'; |
|
|
import Loadable from 'components/Loadable'; |
|
@@ -40,121 +39,111 @@ const Payment_FPS_CallBack = Loadable(lazy(() => import('pages/Payment/FPS/fpsca |
|
|
|
|
|
|
|
|
// ==============================|| AUTH ROUTING ||============================== // |
|
|
// ==============================|| AUTH ROUTING ||============================== // |
|
|
|
|
|
|
|
|
export default function LoginRoutes(){ |
|
|
|
|
|
|
|
|
|
|
|
const { sysSetting } = useContext(SysContext); |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
|
path: '/', |
|
|
|
|
|
element: <MainLayout />, |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'login', |
|
|
|
|
|
element: <AuthLogin /> |
|
|
|
|
|
}, |
|
|
|
|
|
... sysSetting?.allowRegistration ?[ |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'register', |
|
|
|
|
|
element: <AuthRegister /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'registerFrom', |
|
|
|
|
|
element: <RegisterForm /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'registerFromOrganization', |
|
|
|
|
|
element: <BusRegisterForm /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iAmSmartRegisterFrom', |
|
|
|
|
|
element: <IAmSmartRegister /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/registrycallback', |
|
|
|
|
|
element: <IAmSmart_RegistryCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'verify/:verifyCode/:email', |
|
|
|
|
|
element: <VerifyPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
]:[] |
|
|
|
|
|
, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'error', |
|
|
|
|
|
element: <ErrorPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'privacyPolicy', |
|
|
|
|
|
element: <PrivacyPolicyPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'aboutUs', |
|
|
|
|
|
element: <AboutUsPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/logincallback', |
|
|
|
|
|
element: <IAmSmart_DirectLoginCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/loginfallback', |
|
|
|
|
|
element: <IAmSmart_FailCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/notverify', |
|
|
|
|
|
element: <FailCallback_VerifyMail/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/authcallback', |
|
|
|
|
|
element: <IAmSmart_AuthCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/loginFail', |
|
|
|
|
|
element: <IAmSmart_FailCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'testfps', |
|
|
|
|
|
element: <Testfps/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'testfpscallback', |
|
|
|
|
|
element: <Payment_FPS_CallBack/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password', |
|
|
|
|
|
element: <ForgotPassword/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password/sent', |
|
|
|
|
|
element: <AfterForgotPasswordPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password/verify/:verifyCode/:email', |
|
|
|
|
|
element: <ForgotPassword_Callback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password/success', |
|
|
|
|
|
element: <ForgotPassword_Success/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username', |
|
|
|
|
|
element: <ForgotUsername/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username/sent', |
|
|
|
|
|
element: <AfterForgotUsernamePage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username/verify/:verifyCode/:email', |
|
|
|
|
|
element: <ForgotUsername_Callback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username/success', |
|
|
|
|
|
element: <ForgotUsername_Success/> |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// export default LoginRoutes; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const LoginRoutes = { |
|
|
|
|
|
path: '/', |
|
|
|
|
|
element: <MainLayout />, |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'login', |
|
|
|
|
|
element: <AuthLogin /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'register', |
|
|
|
|
|
element: <AuthRegister /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'registerFrom', |
|
|
|
|
|
element: <RegisterForm /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'registerFromOrganization', |
|
|
|
|
|
element: <BusRegisterForm /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iAmSmartRegisterFrom', |
|
|
|
|
|
element: <IAmSmartRegister /> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'error', |
|
|
|
|
|
element: <ErrorPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'privacyPolicy', |
|
|
|
|
|
element: <PrivacyPolicyPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'aboutUs', |
|
|
|
|
|
element: <AboutUsPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/logincallback', |
|
|
|
|
|
element: <IAmSmart_DirectLoginCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/loginfallback', |
|
|
|
|
|
element: <IAmSmart_FailCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/notverify', |
|
|
|
|
|
element: <FailCallback_VerifyMail/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/authcallback', |
|
|
|
|
|
element: <IAmSmart_AuthCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/registrycallback', |
|
|
|
|
|
element: <IAmSmart_RegistryCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'iamsmart/loginFail', |
|
|
|
|
|
element: <IAmSmart_FailCallback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'verify/:verifyCode/:email', |
|
|
|
|
|
element: <VerifyPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'testfps', |
|
|
|
|
|
element: <Testfps/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'testfpscallback', |
|
|
|
|
|
element: <Payment_FPS_CallBack/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password', |
|
|
|
|
|
element: <ForgotPassword/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password/sent', |
|
|
|
|
|
element: <AfterForgotPasswordPage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password/verify/:verifyCode/:email', |
|
|
|
|
|
element: <ForgotPassword_Callback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/password/success', |
|
|
|
|
|
element: <ForgotPassword_Success/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username', |
|
|
|
|
|
element: <ForgotUsername/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username/sent', |
|
|
|
|
|
element: <AfterForgotUsernamePage/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username/verify/:verifyCode/:email', |
|
|
|
|
|
element: <ForgotUsername_Callback/> |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
path: 'forgot/username/success', |
|
|
|
|
|
element: <ForgotUsername_Success/> |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export default LoginRoutes; |