feat: Enhance delete confirmation with brand name in notification message

This commit is contained in:
2025-11-18 12:43:00 +07:00
parent 8405568e85
commit 3198b71f7e

View File

@@ -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 {