pop-up notifications

This commit is contained in:
2024-03-12 16:14:44 +03:00
parent 8797ba0778
commit 727d55798a
12 changed files with 186 additions and 40 deletions

View File

@ -118,15 +118,23 @@ export const ModalTiсket = ({
task_id: task.id,
status: 0
}
}).then(() => {
closeModal();
dispatch(setProjectBoardFetch(projectId));
showNotification({
show: true,
text: "Задача успешно была перемещена в архив",
type: "archive"
})
.then(() => {
closeModal();
dispatch(setProjectBoardFetch(projectId));
showNotification({
show: true,
text: "Задача успешно удалена",
type: "success"
});
})
.catch(() => {
showNotification({
show: true,
text: "Ошибка удаления",
type: "error"
});
});
});
}
const priority = {
@ -169,15 +177,23 @@ export const ModalTiсket = ({
title: inputsValue.title,
description: inputsValue.description
}
}).then((res) => {
setEditOpen(!editOpen);
dispatch(setProjectBoardFetch(projectId));
showNotification({
show: true,
text: "Изменения сохранены",
type: "success"
})
.then((res) => {
setEditOpen(!editOpen);
dispatch(setProjectBoardFetch(projectId));
showNotification({
show: true,
text: "Изменения сохранены",
type: "success"
});
})
.catch(() => {
showNotification({
show: true,
text: "Ошибка при сохранении изменений",
type: "error"
});
});
});
}
function createComment() {