Browse Source

change alert notification & data table

pull/2/head
wahyuun 1 year ago
parent
commit
0ccbef29aa
  1. 14
      src/views/Master/MasterRoles/index.js

14
src/views/Master/MasterRoles/index.js

@ -165,9 +165,9 @@ class index extends Component {
.catch((error) => error.response);
if (result && result.data && result.data.code === 200) {
this.deleteCurrentRoleMenu(idDelete)
this.getDataRoles()
this.setState({ idDelete: 0, alertDelete: false })
await this.deleteCurrentRoleMenu(idDelete);
this.getDataRoles();
this.setState({ idDelete: 0, alertDelete: false })
NotificationManager.success(`Data role berhasil dihapus`, 'Success!!');
} else {
this.setState({ idDelete: 0, alertDelete: false })
@ -188,9 +188,9 @@ class index extends Component {
if (result && result.data && result.data.code === 200) {
this.getDataRoles();
NotificationManager.success(`Data role berhasil ditambah`, 'Success!!');
NotificationManager.success(`Data role berhasil ditambahkan`, 'Success!!');
} else {
NotificationManager.error(`${result.data.message}`, 'Failed!!');
NotificationManager.error(`Data role gagal ditambahkan`, 'Failed!!');
}
}
@ -207,9 +207,9 @@ class index extends Component {
if (result && result.data && result.data.code === 200) {
this.getDataRoles();
NotificationManager.success(`Data role berhasil diedit`, 'Success!!');
NotificationManager.success(`Data role berhasil diubah`, 'Success!!');
} else {
NotificationManager.error(`Data role gagal di edit`, `Failed!!`);
NotificationManager.error(`Data role gagal diubah`, `Failed!!`);
}
}

Loading…
Cancel
Save