setSelectedExecutorOpen(!selectExecutorOpen)}
+ >
+
Выберите исполнителя
+
+ {selectExecutorOpen && (
+
+ {projectBoard.projectUsers.map((user) => {
+ return (
+
executorFilter(user)}
+ >
+
{removeLast(user.user?.fio)}
+
+
+ );
+ })}
+
+ )}
+
+ );
+ }
+};
+
+export default TrackerSelectExecutor;
diff --git a/src/components/TrackerSelectExecutor/trackerSelectExecutor.scss b/src/components/TrackerSelectExecutor/trackerSelectExecutor.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/src/pages/ProjectTracker/ProjectTracker.jsx b/src/pages/ProjectTracker/ProjectTracker.jsx
index 5494adea..07cee39b 100644
--- a/src/pages/ProjectTracker/ProjectTracker.jsx
+++ b/src/pages/ProjectTracker/ProjectTracker.jsx
@@ -40,6 +40,7 @@ import { Navigation } from "@components/Navigation/Navigation";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import TrackerSelectColumn from "@components/TrackerSelectColumn/TrackerSelectColumn";
+import TrackerSelectExecutor from "@components/TrackerSelectExecutor/TrackerSelectExecutor";
import arrow from "assets/icons/arrows/arrowRight.png";
import arrowDown from "assets/icons/arrows/selectArrow.png";
@@ -53,7 +54,6 @@ 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 archive from "assets/images/archiveIcon.png";
import avatarMok from "assets/images/avatarMok.png";
import { getCorrectDate } from "../../utils/calendarHelper";
@@ -85,7 +85,6 @@ export const ProjectTracker = () => {
const [filteredNoTasks, setFilteredNoTasks] = useState(false);
const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false);
const [selectedExecutor, setSelectedExecutor] = useState(null);
- const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false);
const startWrapperIndexTest = useRef({});
const projectBoard = useSelector(getProjectBoard);
const loader = useSelector(getBoarderLoader);
@@ -288,11 +287,6 @@ export const ProjectTracker = () => {
setCheckBoxMyTasks(!checkBoxMyTasks);
}
- function executorFilter(user) {
- dispatch(filteredExecutorTasks(user.user_id));
- setSelectedExecutor(user);
- }
-
function deleteSelectedExecutorFilter() {
setSelectedExecutor(null);
setCheckBoxParticipateTasks(false);
@@ -394,18 +388,6 @@ export const ProjectTracker = () => {
setPersonListOpen(false);
}
- if (
- event &&
- !path.find(
- (div) =>
- div.classList &&
- (div.classList.contains("tasks__head__executor") ||
- div.classList.contains("tasks__head__executor-dropdown"))
- )
- ) {
- setSelectedExecutorOpen(false);
- }
-
if (
event &&
!path.find(
@@ -577,63 +559,14 @@ export const ProjectTracker = () => {
{checkBoxMyTasks &&
- setSelectedExecutorOpen(!selectExecutorOpen)
- }
- >
-
Выберите исполнителя
-
- {selectExecutorOpen && (
-
- {projectBoard.projectUsers.map((user) => {
- return (
-
executorFilter(user)}
- >
-
{removeLast(user.user?.fio)}
-
-
- );
- })}
-
- )}
-
- )}
+
+