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