Browse Source

change alert notification & data table

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

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

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

Loading…
Cancel
Save