From f6c7609b1c3c34f84f678efb79636cd0f1dfc2f3 Mon Sep 17 00:00:00 2001 From: M1kola Date: Tue, 4 Jul 2023 16:19:58 +0300 Subject: [PATCH] tasks --- .../TicketFullScreen/TicketFullScreen.jsx | 3 +- src/pages/ProjectTracker/ProjectTracker.js | 40 +++++++++++-------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index 49f0a72b..b6acf4fb 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -462,7 +462,8 @@ export const TicketFullScreen = () => { участник
- В проекте -

“{projectInfo.name}”

+ В проекте - +

“{projectInfo.name}”

{projectInfo.projectUsers?.map((person) => { diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 074d24ad..812905f4 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -42,11 +42,11 @@ import commentsBoard from "assets/icons/commentsBoard.svg"; import del from "assets/icons/delete.svg"; import edit from "assets/icons/edit.svg"; import filesBoard from "assets/icons/filesBoard.svg"; +import trackerNoTasks from "assets/icons/trackerNoTasks.svg"; import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import accept from "assets/images/accept.png"; import avatarMok from "assets/images/avatarMok.png"; -import trackerNoTasks from "assets/icons/trackerNoTasks.svg" export const ProjectTracker = () => { const dispatch = useDispatch(); @@ -63,7 +63,7 @@ export const ProjectTracker = () => { const [personListOpen, setPersonListOpen] = useState(false); const [checkBoxParticipateTasks, setCheckBoxParticipateTasks] = useState(false); - const [filteredNoTasks, setFilteredNoTasks] = useState(false) + const [filteredNoTasks, setFilteredNoTasks] = useState(false); const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false); const [selectedExecutor, setSelectedExecutor] = useState(null); const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false); @@ -79,10 +79,10 @@ export const ProjectTracker = () => { useEffect(() => { const tasksHover = {}; const columnHover = {}; - let columnsTasksEmpty = true + let columnsTasksEmpty = true; if (Object.keys(projectBoard).length) { projectBoard.columns.forEach((column) => { - if (column.tasks.length) columnsTasksEmpty = false + if (column.tasks.length) columnsTasksEmpty = false; setOpenColumnSelect((prevState) => ({ ...prevState, [column.id]: false, @@ -91,10 +91,13 @@ export const ProjectTracker = () => { column.tasks.forEach((task) => (tasksHover[task.id] = false)); }); } - if (columnsTasksEmpty && (checkBoxMyTasks || selectedExecutor || checkBoxParticipateTasks)) { - setFilteredNoTasks(true) + if ( + columnsTasksEmpty && + (checkBoxMyTasks || selectedExecutor || checkBoxParticipateTasks) + ) { + setFilteredNoTasks(true); } else { - setFilteredNoTasks(false) + setFilteredNoTasks(false); } setWrapperHover(columnHover); setTaskHover(tasksHover); @@ -270,8 +273,6 @@ export const ProjectTracker = () => { dispatch(setProjectBoardFetch(projectId.id)); } - - return (
@@ -392,7 +393,8 @@ export const ProjectTracker = () => { участник
- В проекте -

“{projectBoard.name}”

+ В проекте - +

“{projectBoard.name}”

{projectBoard.projectUsers?.map((person) => { @@ -528,7 +530,8 @@ export const ProjectTracker = () => { )}
- {Boolean(projectBoard?.columns) && !filteredNoTasks && + {Boolean(projectBoard?.columns) && + !filteredNoTasks && Boolean(projectBoard.columns.length) && projectBoard.columns.map((column) => { return ( @@ -674,15 +677,18 @@ export const ProjectTracker = () => { В проекте нет задач.
)} - {filteredNoTasks && -
-
- noTasks + {filteredNoTasks && ( +
+
+ noTasks

Пока нет подходящих задач

-

Ставьте задачи, следите за прогрессом, ведите учёт рабочего времени

+

+ Ставьте задачи, следите за прогрессом, ведите учёт + рабочего времени +

- } + )}
)}