Commit bca744f8 authored by a.bairuha's avatar a.bairuha

update

parent d11839d4
...@@ -104,7 +104,11 @@ export default class VisualPerusahaan extends Component { ...@@ -104,7 +104,11 @@ export default class VisualPerusahaan extends Component {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }, () => {
setTimeout(() => {
this.props.onClickClose() this.props.onClickClose()
}, 1000);
})
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Token")) { if (response.data.message.includes("Token")) {
......
...@@ -392,7 +392,7 @@ export default class UserRole extends Component { ...@@ -392,7 +392,7 @@ export default class UserRole extends Component {
if (response.data.status === "success") { if (response.data.status === "success") {
console.log(response) console.log(response)
this.getUser() this.getUser()
this.setState({ visibleUser: true }) this.setState({ visibleUser: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Token")) { 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