tracker tasks

This commit is contained in:
Mikola
2023-09-11 18:28:56 +03:00
parent 617ca5af6e
commit 3b773e0008
18 changed files with 168 additions and 83 deletions

View File

@@ -113,6 +113,13 @@ export const ModalTiсket = ({
}
function editTask() {
if (!inputsValue.title || !inputsValue.description) {
return showNotification({
show: true,
text: "Заполните поля",
type: "error",
});
}
apiRequest("/task/update-task", {
method: "PUT",
data: {
@@ -121,6 +128,7 @@ export const ModalTiсket = ({
description: inputsValue.description,
},
}).then((res) => {
setEditOpen(!editOpen);
dispatch(setProjectBoardFetch(projectId));
showNotification({
show: true,
@@ -809,7 +817,6 @@ export const ModalTiсket = ({
className={editOpen ? "edit" : ""}
onClick={() => {
if (editOpen) {
setEditOpen(!editOpen);
editTask();
} else {
setEditOpen(!editOpen);