src/views/examples/Login.js
//#region authinticate method & fill user data in redux
region authinticate method & fill user data in redux
region authinticate method & fill user data in redux
async function SignIn() {
    let oParams_Authenticate = new P.Params_Authenticate();
    oParams_Authenticate.EMAIL = email;
    oParams_Authenticate.PASSWORD = password;
    let result = await myProxy.Authenticate(oParams_Authenticate);
    if (result?.My_Result) {
      handleUserData(result.My_Result);
      if (result?.My_Result.USER_TYPE_CODE_ID === 2) {
        history.push("/admin/index")
      }
      if (result?.My_Result.USER_TYPE_CODE_ID === 3) {
        history.push("/admin/index")
      }
    }
    if (result?.ExceptionMsg) {
      setErrorMsg(result.ExceptionMsg);
      handleAPiError(result?.ExceptionMsg)
      console.log('error was sent:' + result?.ExceptionMsg);
    }
  }
async function SignIn ( ) { let oParams_Authenticate = new P . Params_Authenticate ( ) ; oParams_Authenticate . EMAIL = email ; oParams_Authenticate . PASSWORD = password ; let result = await myProxy . Authenticate ( oParams_Authenticate ) ; if ( result ?. My_Result ) { handleUserData ( result . My_Result ) ; if ( result ?. My_Result . USER_TYPE_CODE_ID === 2 ) { history . push ( "/admin/index" ) } if ( result ?. My_Result . USER_TYPE_CODE_ID === 3 ) { history . push ( "/admin/index" ) } } if ( result ?. ExceptionMsg ) { setErrorMsg ( result . ExceptionMsg ) ; handleAPiError ( result ?. ExceptionMsg ) console . log ( 'error was sent:' + result ?. ExceptionMsg ) ; } }
region authinticate method & fill user data in redux
region authinticate method & fill user data in redux
// student parameter to login //run handleUserData() to put user data in store // navigate to profile/home page // history.push("/admin/user-profile") //log error if exists