Commit de6f5610 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'syadziy' into 'master'

Syadziy

See merge request !217
parents 72957447 bca744f8
......@@ -113,7 +113,7 @@ class Login extends Component {
this.props.history.push('/home/beranda')
} else {
if (response.data.message == 'Password is Not Correct') {
this.setState({ errorPassword: true, msgPassword: response.data.message })
this.setState({ errorPassword: true, msgPassword: 'Incorrect Password' })
} else {
this.setState({ errorEmail: true, msgEmail: response.data.message })
}
......
......@@ -104,7 +104,11 @@ export default class VisualPerusahaan extends Component {
if (response.data) {
if (response.ok) {
if (response.data.status == 'success') {
this.props.onClickClose()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }, () => {
setTimeout(() => {
this.props.onClickClose()
}, 1000);
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Token")) {
......
......@@ -392,7 +392,7 @@ export default class UserRole extends Component {
if (response.data.status === "success") {
console.log(response)
this.getUser()
this.setState({ visibleUser: true })
this.setState({ visibleUser: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Token")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment