Commit 7a7673c6 authored by syadziy's avatar syadziy

update issue loading

parent bec3cb35
......@@ -464,10 +464,11 @@ export default class UserRole extends Component {
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
this.getUser()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }, () => {
this.closeEdit()
window.location.reload();
})
// this.getUser()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......@@ -495,9 +496,10 @@ export default class UserRole extends Component {
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success', add: false })
this.getUser()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success', add: false }, () => {
window.location.reload();
})
// this.getUser()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
......
......@@ -141,7 +141,7 @@ export default class AddRole extends Component {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
setTimeout(() => {
this.props.onClickClose()
this.props.refresh()
// this.props.refresh()
window.location.reload();
}, 750);
} else {
......
......@@ -169,7 +169,7 @@ export default class EditRole extends Component {
setTimeout(() => {
this.props.onClickClose()
window.location.reload();
this.props.refresh()
// this.props.refresh()
}, 750);
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
......
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