prettier config
This commit is contained in:
@ -20,7 +20,7 @@ import {
|
||||
setColumnName,
|
||||
setColumnPriority,
|
||||
setProjectBoardFetch,
|
||||
setToggleTab,
|
||||
setToggleTab
|
||||
} from "@redux/projectsTrackerSlice";
|
||||
|
||||
import { urlForLocal } from "@utils/helper";
|
||||
@ -73,7 +73,7 @@ export const ProjectTracker = () => {
|
||||
const [tags, setTags] = useState({
|
||||
open: false,
|
||||
add: false,
|
||||
edit: false,
|
||||
edit: false
|
||||
});
|
||||
const [acceptModalOpen, setAcceptModalOpen] = useState(false);
|
||||
const [currentColumnDelete, setCurrentColumnDelete] = useState(null);
|
||||
@ -93,13 +93,13 @@ export const ProjectTracker = () => {
|
||||
const priority = {
|
||||
2: "Высокий",
|
||||
1: "Средний",
|
||||
0: "Низкий",
|
||||
0: "Низкий"
|
||||
};
|
||||
|
||||
const priorityClass = {
|
||||
2: "high",
|
||||
1: "middle",
|
||||
0: "low",
|
||||
0: "low"
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@ -117,7 +117,7 @@ export const ProjectTracker = () => {
|
||||
if (column.tasks.length) columnsTasksEmpty = false;
|
||||
setOpenColumnSelect((prevState) => ({
|
||||
...prevState,
|
||||
[column.id]: false,
|
||||
[column.id]: false
|
||||
}));
|
||||
columnHover[column.id] = false;
|
||||
column.tasks.forEach((task) => (tasksHover[task.id] = false));
|
||||
@ -154,7 +154,7 @@ export const ProjectTracker = () => {
|
||||
function dragEndTaskHandler() {
|
||||
setTaskHover((prevState) => ({ [prevState]: false }));
|
||||
setWrapperHover((prevState) => ({
|
||||
[prevState]: false,
|
||||
[prevState]: false
|
||||
}));
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ export const ProjectTracker = () => {
|
||||
movePositionProjectTask({
|
||||
startTask: startWrapperIndexTest.current.task,
|
||||
finishTask: task,
|
||||
finishIndex: finishTask,
|
||||
finishIndex: finishTask
|
||||
})
|
||||
);
|
||||
}
|
||||
@ -184,7 +184,7 @@ export const ProjectTracker = () => {
|
||||
|
||||
setWrapperHover((prevState) => ({
|
||||
[prevState]: false,
|
||||
[columnId]: true,
|
||||
[columnId]: true
|
||||
}));
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ export const ProjectTracker = () => {
|
||||
e.preventDefault();
|
||||
|
||||
setWrapperHover((prevState) => ({
|
||||
[prevState]: false,
|
||||
[prevState]: false
|
||||
}));
|
||||
|
||||
if (
|
||||
@ -206,7 +206,7 @@ export const ProjectTracker = () => {
|
||||
dispatch(
|
||||
moveProjectTask({
|
||||
startWrapperIndex: startWrapperIndexTest.current,
|
||||
columnId,
|
||||
columnId
|
||||
})
|
||||
);
|
||||
}
|
||||
@ -234,14 +234,14 @@ export const ProjectTracker = () => {
|
||||
data: {
|
||||
column_id: column.id,
|
||||
project_id: projectBoard.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
if (column.priority < projectBoard.columns.length) {
|
||||
for (let i = column.priority; i < projectBoard.columns.length; i++) {
|
||||
const currentColumn = {
|
||||
column_id: projectBoard.columns[i].id,
|
||||
priority: i,
|
||||
priority: i
|
||||
};
|
||||
priorityColumns.push(currentColumn);
|
||||
}
|
||||
@ -249,8 +249,8 @@ export const ProjectTracker = () => {
|
||||
method: "POST",
|
||||
data: {
|
||||
project_id: projectBoard.id,
|
||||
data: JSON.stringify(priorityColumns),
|
||||
},
|
||||
data: JSON.stringify(priorityColumns)
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||
});
|
||||
@ -266,8 +266,8 @@ export const ProjectTracker = () => {
|
||||
method: "DELETE",
|
||||
data: {
|
||||
project_id: projectBoard.id,
|
||||
user_id: userId,
|
||||
},
|
||||
user_id: userId
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(deletePersonOnProject(userId));
|
||||
});
|
||||
@ -316,21 +316,21 @@ export const ProjectTracker = () => {
|
||||
title: tagInfo.description,
|
||||
slug: tagInfo.name,
|
||||
color: color,
|
||||
status: 1,
|
||||
},
|
||||
status: 1
|
||||
}
|
||||
}).then((data) => {
|
||||
apiRequest("/mark/attach", {
|
||||
method: "POST",
|
||||
data: {
|
||||
mark_id: data.id,
|
||||
entity_type: 1,
|
||||
entity_id: projectId.id,
|
||||
},
|
||||
entity_id: projectId.id
|
||||
}
|
||||
}).then((data) => {
|
||||
dispatch(addNewTagToProject(data.mark));
|
||||
setTags((prevState) => ({
|
||||
...prevState,
|
||||
add: false,
|
||||
add: false
|
||||
}));
|
||||
});
|
||||
});
|
||||
@ -343,13 +343,13 @@ export const ProjectTracker = () => {
|
||||
mark_id: tagInfo.editMarkId,
|
||||
title: tagInfo.description,
|
||||
slug: tagInfo.name,
|
||||
color: color,
|
||||
},
|
||||
color: color
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectId.id));
|
||||
setTags((prevState) => ({
|
||||
...prevState,
|
||||
edit: false,
|
||||
edit: false
|
||||
}));
|
||||
setTagInfo({ description: "", name: "" });
|
||||
setColor("#aabbcc");
|
||||
@ -362,8 +362,8 @@ export const ProjectTracker = () => {
|
||||
data: {
|
||||
mark_id: tagId,
|
||||
entity_type: 1,
|
||||
entity_id: projectId.id,
|
||||
},
|
||||
entity_id: projectId.id
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(deleteTagProject(tagId));
|
||||
});
|
||||
@ -412,11 +412,11 @@ export const ProjectTracker = () => {
|
||||
setTags({
|
||||
open: false,
|
||||
add: false,
|
||||
edit: false,
|
||||
edit: false
|
||||
});
|
||||
setTagInfo({
|
||||
description: "",
|
||||
name: "",
|
||||
name: ""
|
||||
});
|
||||
setColor("#aabbcc");
|
||||
}
|
||||
@ -453,7 +453,7 @@ export const ProjectTracker = () => {
|
||||
<ProfileBreadcrumbs
|
||||
links={[
|
||||
{ name: "Главная", link: "/profile" },
|
||||
{ name: "Трекер", link: "/profile/tracker" },
|
||||
{ name: "Трекер", link: "/profile/tracker" }
|
||||
]}
|
||||
/>
|
||||
<h2 className="tracker__title">Управление проектами с трекером</h2>
|
||||
@ -705,7 +705,7 @@ export const ProjectTracker = () => {
|
||||
onClick={() => {
|
||||
setTags((prevState) => ({
|
||||
...prevState,
|
||||
open: !tags.open,
|
||||
open: !tags.open
|
||||
}));
|
||||
}}
|
||||
>
|
||||
@ -719,7 +719,7 @@ export const ProjectTracker = () => {
|
||||
onClick={() =>
|
||||
setTags((prevState) => ({
|
||||
...prevState,
|
||||
add: true,
|
||||
add: true
|
||||
}))
|
||||
}
|
||||
>
|
||||
@ -751,12 +751,12 @@ export const ProjectTracker = () => {
|
||||
onClick={() => {
|
||||
setTags((prevState) => ({
|
||||
...prevState,
|
||||
edit: true,
|
||||
edit: true
|
||||
}));
|
||||
setTagInfo({
|
||||
description: tag.title,
|
||||
name: tag.slug,
|
||||
editMarkId: tag.id,
|
||||
editMarkId: tag.id
|
||||
});
|
||||
setColor(tag.color);
|
||||
}}
|
||||
@ -784,11 +784,11 @@ export const ProjectTracker = () => {
|
||||
setTags((prevState) => ({
|
||||
...prevState,
|
||||
add: false,
|
||||
edit: false,
|
||||
edit: false
|
||||
}));
|
||||
setTagInfo({
|
||||
description: "",
|
||||
name: "",
|
||||
name: ""
|
||||
});
|
||||
setColor("#aabbcc");
|
||||
}}
|
||||
@ -801,7 +801,7 @@ export const ProjectTracker = () => {
|
||||
onChange={(e) =>
|
||||
setTagInfo((prevState) => ({
|
||||
...prevState,
|
||||
description: e.target.value,
|
||||
description: e.target.value
|
||||
}))
|
||||
}
|
||||
/>
|
||||
@ -813,7 +813,7 @@ export const ProjectTracker = () => {
|
||||
onChange={(e) =>
|
||||
setTagInfo((prevState) => ({
|
||||
...prevState,
|
||||
name: e.target.value,
|
||||
name: e.target.value
|
||||
}))
|
||||
}
|
||||
/>
|
||||
@ -890,7 +890,7 @@ export const ProjectTracker = () => {
|
||||
onClick={() => {
|
||||
setOpenColumnSelect((prevState) => ({
|
||||
...prevState,
|
||||
[column.id]: true,
|
||||
[column.id]: true
|
||||
}));
|
||||
}}
|
||||
className="more"
|
||||
@ -906,7 +906,7 @@ export const ProjectTracker = () => {
|
||||
onClick={() => {
|
||||
setOpenColumnSelect((prevState) => ({
|
||||
...prevState,
|
||||
[column.id]: false,
|
||||
[column.id]: false
|
||||
}));
|
||||
dispatch(modalToggle("editColumn"));
|
||||
dispatch(setColumnName(column.title));
|
||||
@ -970,7 +970,7 @@ export const ProjectTracker = () => {
|
||||
</div>
|
||||
<p
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: task.description,
|
||||
__html: task.description
|
||||
}}
|
||||
className="tasks__board__item__description"
|
||||
></p>
|
||||
|
Reference in New Issue
Block a user