|
|
@ -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!!`); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|