Browse Source

change alert notification

pull/2/head
wahyuun 1 year ago
parent
commit
476b872e35
  1. 14
      src/views/Master/MasterMenu/index.js

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

@ -49,12 +49,6 @@ const Index = ({ params }) => {
} }
}; };
useEffect(() => {
getDataMenu();
getDataAllMenu();
}, [])
useEffect(() => { useEffect(() => {
getDataMenu(); getDataMenu();
}, [search, currentPage, rowsPerPage]) }, [search, currentPage, rowsPerPage])
@ -173,9 +167,9 @@ const Index = ({ params }) => {
if (result && result.data && result.data.code === 200) { if (result && result.data && result.data.code === 200) {
getDataMenu(); getDataMenu();
getDataAllMenu(); getDataAllMenu();
NotificationManager.success(`Data menu berhasil ditambah`, 'Success!!'); NotificationManager.success(`Data menu berhasil ditambahkan`, 'Success!!');
} else { } else {
NotificationManager.error(`${result.data.message}`, 'Failed!!'); NotificationManager.error(`Data menu gagal ditambahkan`, 'Failed!!');
} }
} }
@ -189,9 +183,9 @@ const Index = ({ params }) => {
if (result && result.data && result.data.code === 200) { if (result && result.data && result.data.code === 200) {
getDataMenu(); getDataMenu();
NotificationManager.success(`Data menu berhasil diedit`, 'Success!!'); NotificationManager.success(`Data menu berhasil diubah`, 'Success!!');
} else { } else {
NotificationManager.error(`Data menu gagal di edit`, `Failed!!`); NotificationManager.error(`Data menu gagal diubah`, `Failed!!`);
} }
} }

Loading…
Cancel
Save