diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index c30cacdb..4af22ac4 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -36,6 +36,7 @@ import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import archive from "assets/icons/archiveTracker.svg"; import arrow from "assets/icons/arrows/arrowCalendar.png"; +import arrowDown from "assets/icons/arrows/selectArrow.png"; import close from "assets/icons/close.png"; import commentsBoard from "assets/icons/commentsBoard.svg"; import del from "assets/icons/delete.svg"; @@ -45,7 +46,6 @@ 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 arrowDown from "assets/icons/arrows/selectArrow.png"; export const ProjectTracker = () => { const dispatch = useDispatch(); @@ -64,7 +64,7 @@ export const ProjectTracker = () => { useState(false); const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false); const [selectedExecutor, setSelectedExecutor] = useState(null); - const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false) + const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false); const startWrapperIndexTest = useRef({}); const projectBoard = useSelector(getProjectBoard); const loader = useSelector(getBoarderLoader); @@ -248,12 +248,12 @@ export const ProjectTracker = () => { } function executorFilter(user) { - dispatch(filteredExecutorTasks(user.user_id)) - setSelectedExecutor(user) + dispatch(filteredExecutorTasks(user.user_id)); + setSelectedExecutor(user); } function deleteSelectedExecutorFilter() { - setSelectedExecutor(null) + setSelectedExecutor(null); dispatch(setProjectBoardFetch(projectId.id)); } @@ -437,17 +437,18 @@ export const ProjectTracker = () => { {checkBoxMyTasks && } - {selectedExecutor ? -
{selectedExecutor.user.fio}
+ alt="avatar" + /> { onClick={deleteSelectedExecutorFilter} />Выберите исполнитель
- - {selectExecutorOpen && -{user.user?.fio}
- -Выберите исполнитель
+ + {selectExecutorOpen && ( +{user.user?.fio}
+ +Вернуться на проекты
diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js index e66f755c..7a4b7023 100644 --- a/src/redux/projectsTrackerSlice.js +++ b/src/redux/projectsTrackerSlice.js @@ -124,7 +124,9 @@ export const projectsTrackerSlice = createSlice({ }, filteredExecutorTasks: (state, action) => { state.projectBoard.columns.forEach((column) => { - column.tasks = column.tasks.filter((task) => task.executor_id === action.payload); + column.tasks = column.tasks.filter( + (task) => task.executor_id === action.payload + ); }); }, setColumnName: (state, action) => {