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

update

parent d11839d4
......@@ -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