diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index d3df6090e..a4dee4b4c 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -13,6 +13,7 @@ import axios from 'axios'; import './LoginDialog.css'; import { broadcastChannelPostMessage } from 'educoder' +import Notcompletedysl from "../user/Notcompletedysl"; const $ = window.$; var wait = 60; @@ -100,6 +101,7 @@ class LoginDialog extends Component { authCodeType:true, authCodeclass:'log-botton mt5', isRender: false, + MyEduCoderModals:false, }; } @@ -365,11 +367,12 @@ class LoginDialog extends Component { description:response.data.message, }); }else{ - if(response.data.identity === null || response.data.identity === undefined){ - this.props.history.push("/interesse"); + if(response.data.profile_completed !== null || response.data.profile_completed === false){ + this.setMyEduCoderModals(); return; } - broadcastChannelPostMessage('refreshPage') + + broadcastChannelPostMessage('refreshPage') this.setState({ isRender:false }) @@ -388,17 +391,28 @@ class LoginDialog extends Component { console.log(error) }) - } + }; + setNotcompleteds=()=>{ + this.setState({ + Notcompleteds:true, + MyEduCoderModals:false + }) + }; + setMyEduCoderModals=()=>{ + this.setState({ + MyEduCoderModals:true + }) + }; onKeydowns=(e)=>{ let {disabled}=this.state; if( disabled===false&& e.keyCode === 13){ this.loginEDU() console.log(1) } - } + }; getloginurl=(url)=>{ window.location.href = url; - } + }; render() { let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass, dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender}=this.state; @@ -414,6 +428,10 @@ class LoginDialog extends Component { disableBackdropClick={true} onClose={() => this.handleDialogClose()} > + {this.setNotcompleteds()}} + /> {isRender===true?
{this.handleDialogClose()}}> diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 081f868a7..9b1533bea 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -340,8 +340,8 @@ class LoginRegisterComponent extends Component { } - if(response.data.identity === null || response.data.identity === undefined){ - this.props.history.push("/interesse"); + if(response.data.profile_completed !== null || response.data.profile_completed === false){ + this.setMyEduCoderModals(); return; }