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

@ -173,6 +173,13 @@ export const TicketFullScreen = () => {
}
function editTask() {
if (!inputsValue.title || !inputsValue.description) {
return showNotification({
show: true,
text: "Заполните поля",
type: "error",
});
}
apiRequest("/task/update-task", {
method: "PUT",
data: {
@ -186,6 +193,7 @@ export const TicketFullScreen = () => {
text: "Изменения сохранены",
type: "success",
});
setEditOpen(!editOpen);
});
}
@ -985,7 +993,6 @@ export const TicketFullScreen = () => {
className={editOpen ? "edit" : ""}
onClick={() => {
if (editOpen) {
setEditOpen(!editOpen);
editTask();
} else {
setEditOpen(!editOpen);