prettier config
This commit is contained in:
@ -15,7 +15,7 @@ import {
|
||||
caseOfNum,
|
||||
getCorrectRequestDate,
|
||||
getToken,
|
||||
urlForLocal,
|
||||
urlForLocal
|
||||
} from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
@ -56,7 +56,7 @@ export const ModalTiсket = ({
|
||||
projectName,
|
||||
projectUsers,
|
||||
projectOwnerId,
|
||||
projectMarks,
|
||||
projectMarks
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const [addSubtask, setAddSubtask] = useState(false);
|
||||
@ -64,7 +64,7 @@ export const ModalTiсket = ({
|
||||
const [inputsValue, setInputsValue] = useState({
|
||||
title: task.title,
|
||||
description: task.description,
|
||||
comment: "",
|
||||
comment: ""
|
||||
});
|
||||
const [comments, setComments] = useState([]);
|
||||
const [deadLine, setDeadLine] = useState(task.dead_line);
|
||||
@ -85,7 +85,7 @@ export const ModalTiсket = ({
|
||||
const [currentTimerCount, setCurrentTimerCount] = useState({
|
||||
hours: 0,
|
||||
minute: 0,
|
||||
seconds: 0,
|
||||
seconds: 0
|
||||
});
|
||||
const [timerId, setTimerId] = useState(null);
|
||||
const [taskFiles, setTaskFiles] = useState([]);
|
||||
@ -104,15 +104,15 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
setActive(false);
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Задача успешно была перемещена в архив",
|
||||
type: "archive",
|
||||
type: "archive"
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -120,22 +120,22 @@ export const ModalTiсket = ({
|
||||
const priority = {
|
||||
2: "Высокий",
|
||||
1: "Средний",
|
||||
0: "Низкий",
|
||||
0: "Низкий"
|
||||
};
|
||||
|
||||
const priorityTypes = [
|
||||
{
|
||||
name: "Высокий",
|
||||
key: 2,
|
||||
key: 2
|
||||
},
|
||||
{
|
||||
name: "Средний",
|
||||
key: 1,
|
||||
key: 1
|
||||
},
|
||||
{
|
||||
name: "Низкий",
|
||||
key: 0,
|
||||
},
|
||||
key: 0
|
||||
}
|
||||
];
|
||||
|
||||
function archiveTask() {
|
||||
@ -147,7 +147,7 @@ export const ModalTiсket = ({
|
||||
return showNotification({
|
||||
show: true,
|
||||
text: "Заполните поля",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
apiRequest("/task/update-task", {
|
||||
@ -155,15 +155,15 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
task_id: task.id,
|
||||
title: inputsValue.title,
|
||||
description: inputsValue.description,
|
||||
},
|
||||
description: inputsValue.description
|
||||
}
|
||||
}).then((res) => {
|
||||
setEditOpen(!editOpen);
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Изменения сохранены",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -176,8 +176,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
text: inputsValue.comment,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
},
|
||||
entity_id: task.id
|
||||
}
|
||||
}).then((res) => {
|
||||
let newComment = res;
|
||||
setCommentSendDisable(false);
|
||||
@ -199,8 +199,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
comment_id: subComment.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {});
|
||||
});
|
||||
}
|
||||
@ -234,8 +234,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
created_at: getCorrectRequestDate(new Date()),
|
||||
},
|
||||
created_at: getCorrectRequestDate(new Date())
|
||||
}
|
||||
}).then((res) => {
|
||||
setTimerStart(true);
|
||||
setTimerInfo(res);
|
||||
@ -248,8 +248,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
timer_id: timerInfo.id,
|
||||
stopped_at: getCorrectRequestDate(new Date()),
|
||||
},
|
||||
stopped_at: getCorrectRequestDate(new Date())
|
||||
}
|
||||
}).then(() => {
|
||||
setTimerStart(false);
|
||||
clearInterval(timerId);
|
||||
@ -261,8 +261,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
executor_id: person.user_id,
|
||||
},
|
||||
executor_id: person.user_id
|
||||
}
|
||||
}).then((res) => {
|
||||
setExecutorId(person.user_id);
|
||||
setDropListOpen(false);
|
||||
@ -276,8 +276,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
executor_id: 0,
|
||||
},
|
||||
executor_id: 0
|
||||
}
|
||||
}).then(() => {
|
||||
setExecutorId(null);
|
||||
setExecutor(null);
|
||||
@ -291,8 +291,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
execution_priority: key,
|
||||
},
|
||||
execution_priority: key
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
});
|
||||
@ -303,8 +303,8 @@ export const ModalTiсket = ({
|
||||
method: "POST",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
user_id: person.user_id,
|
||||
},
|
||||
user_id: person.user_id
|
||||
}
|
||||
}).then((res) => {
|
||||
setDropListMembersOpen(false);
|
||||
setMembers((prevValue) => [...prevValue, res]);
|
||||
@ -317,8 +317,8 @@ export const ModalTiсket = ({
|
||||
method: "DELETE",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
user_id: person.user_id,
|
||||
},
|
||||
user_id: person.user_id
|
||||
}
|
||||
}).then(() => {
|
||||
setMembers(members.filter((item) => item.user_id !== person.user_id));
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
@ -351,7 +351,7 @@ export const ModalTiсket = ({
|
||||
setCurrentTimerCount({
|
||||
hours: Math.floor(timerSeconds / 60 / 60),
|
||||
minute: Math.floor((timerSeconds / 60) % 60),
|
||||
seconds: timerSeconds % 60,
|
||||
seconds: timerSeconds % 60
|
||||
});
|
||||
updateTimerHours = Math.floor(timerSeconds / 60 / 60);
|
||||
updateTimerMinute = Math.floor((timerSeconds / 60) % 60);
|
||||
@ -386,10 +386,10 @@ export const ModalTiсket = ({
|
||||
{
|
||||
user: {
|
||||
avatar: profileInfo.photo,
|
||||
fio: profileInfo.fio,
|
||||
fio: profileInfo.fio
|
||||
},
|
||||
user_id: profileInfo.id_user,
|
||||
},
|
||||
user_id: profileInfo.id_user
|
||||
}
|
||||
]);
|
||||
}
|
||||
}, []);
|
||||
@ -410,7 +410,7 @@ export const ModalTiсket = ({
|
||||
const res = await fetch("https://itguild.info/api/file/upload", {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
headers: { ...getToken() },
|
||||
headers: { ...getToken() }
|
||||
});
|
||||
|
||||
const data = await res.json();
|
||||
@ -430,8 +430,8 @@ export const ModalTiсket = ({
|
||||
file_id: id,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
status: 1,
|
||||
},
|
||||
status: 1
|
||||
}
|
||||
}).then((res) => {
|
||||
setTaskFiles((prevValue) => [...prevValue, res]);
|
||||
// setUploadedFile(null);
|
||||
@ -470,7 +470,7 @@ export const ModalTiсket = ({
|
||||
return setCurrentTimerCount({
|
||||
hours: updateTimerHours,
|
||||
minute: updateTimerMinute,
|
||||
seconds: updateTimerSec,
|
||||
seconds: updateTimerSec
|
||||
});
|
||||
}
|
||||
|
||||
@ -496,7 +496,7 @@ export const ModalTiсket = ({
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ссылка скопирована в буфер обмена",
|
||||
type: "copy",
|
||||
type: "copy"
|
||||
});
|
||||
}
|
||||
|
||||
@ -505,8 +505,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
dead_line: getCorrectRequestDate(date),
|
||||
},
|
||||
dead_line: getCorrectRequestDate(date)
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
});
|
||||
@ -518,8 +518,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
mark_id: tagId,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
},
|
||||
entity_id: task.id
|
||||
}
|
||||
}).then((data) => {
|
||||
setSelectTagsOpen(false);
|
||||
setTaskTags((prevValue) => [...prevValue, data.mark]);
|
||||
@ -533,8 +533,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
mark_id: tagId,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
},
|
||||
entity_id: task.id
|
||||
}
|
||||
}).then(() => {
|
||||
setTaskTags((prevValue) => prevValue.filter((tag) => tag.id !== tagId));
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
@ -617,7 +617,7 @@ export const ModalTiсket = ({
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
title: e.target.value,
|
||||
title: e.target.value
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
@ -640,14 +640,14 @@ export const ModalTiсket = ({
|
||||
"ImageToolbar",
|
||||
"ImageUpload",
|
||||
"MediaEmbed",
|
||||
"BlockQuote",
|
||||
],
|
||||
"BlockQuote"
|
||||
]
|
||||
}}
|
||||
onChange={(event, editor) => {
|
||||
const data = editor.getData();
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
description: data,
|
||||
description: data
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
@ -729,7 +729,7 @@ export const ModalTiсket = ({
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
comment: e.target.value,
|
||||
comment: e.target.value
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user