Khi Delete scenario k tắt modal add/edit

This commit is contained in:
Truong Vo 2025-12-05 09:19:46 +07:00
parent cf6a950dcb
commit 637bdfa16b
1 changed files with 4 additions and 1 deletions

View File

@ -175,6 +175,10 @@ function DrawerScenario({
});
if (response.data.status) {
setScenarios((pre) => pre.filter((el) => el.id !== dataScenario?.id));
// Reset form về trạng thái add mới, không đóng form
setIsEdit(false);
setDataScenario(undefined);
form.reset();
notifications.show({
title: "Success",
message: response.data.message,
@ -457,7 +461,6 @@ function DrawerScenario({
handle={() => {
setOpenConfirm(false);
handleDelete();
handleClose();
}}
centered={true}
/>