feat: Enhance delete confirmation with brand name in notification message
This commit is contained in:
@@ -157,12 +157,12 @@ const ListBrandDevice = memo(function ListBrandDevice(props) {
|
||||
icon: 'question',
|
||||
title: 'Konfirmasi',
|
||||
message: 'Apakah anda yakin hapus data "' + param.brand_name + '" ?',
|
||||
onConfirm: () => handleDelete(param.brand_id),
|
||||
onConfirm: () => handleDelete(param.brand_id, param.brand_name),
|
||||
onCancel: () => {},
|
||||
});
|
||||
};
|
||||
|
||||
const handleDelete = async (brand_id) => {
|
||||
const handleDelete = async (brand_id, brand_name) => {
|
||||
try {
|
||||
const response = await deleteBrand(brand_id);
|
||||
|
||||
@@ -170,7 +170,7 @@ const ListBrandDevice = memo(function ListBrandDevice(props) {
|
||||
NotifOk({
|
||||
icon: 'success',
|
||||
title: 'Berhasil',
|
||||
message: response.message || 'Data Brand Device berhasil dihapus.',
|
||||
message: `Brand ${brand_name} deleted successfully.`,
|
||||
});
|
||||
doFilter(); // Refresh data
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user