2023-03-07 19:40:52 +03:00
|
|
|
|
import React, { useState } from "react";
|
2023-02-17 15:19:49 +03:00
|
|
|
|
|
2023-03-07 19:40:52 +03:00
|
|
|
|
import { ProfileHeader } from "../../components/ProfileHeader/ProfileHeader";
|
2023-04-10 21:22:22 +03:00
|
|
|
|
import { ProfileBreadcrumbs } from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
2023-03-07 19:40:52 +03:00
|
|
|
|
import { Footer } from "../../components/Footer/Footer";
|
2023-03-03 18:49:02 +03:00
|
|
|
|
|
2023-03-23 21:18:48 +03:00
|
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
|
|
|
|
import { getProjects } from "../../redux/projectsTrackerSlice";
|
|
|
|
|
|
2023-03-08 11:36:34 +03:00
|
|
|
|
import ModalTiket from "../../components/UI/ModalTiket/ModalTiket";
|
2023-03-22 21:48:06 +03:00
|
|
|
|
import ModalCreate from "../../components/UI/ModalCreate/ModalCreate";
|
2023-04-10 21:22:22 +03:00
|
|
|
|
import ModalAdd from "../../components/UI/ModalAdd/ModalAdd";
|
2023-03-08 11:36:34 +03:00
|
|
|
|
|
2023-03-07 19:40:52 +03:00
|
|
|
|
import project from "../../images/trackerProject.svg";
|
|
|
|
|
import tasks from "../../images/trackerTasks.svg";
|
|
|
|
|
import archive from "../../images/archiveTracker.svg";
|
|
|
|
|
import avatarTest from "../../images/AvatarTest .png";
|
|
|
|
|
import selectArrow from "../../images/select.svg";
|
|
|
|
|
import commentsBoard from "../../images/commentsBoard.svg";
|
|
|
|
|
import filesBoard from "../../images/filesBoard.svg";
|
2023-03-30 15:07:05 +03:00
|
|
|
|
import search from "../../images/serchIcon.png";
|
2023-04-10 21:22:22 +03:00
|
|
|
|
import noProjects from "../../images/noProjects.png";
|
|
|
|
|
import arrow from "../../images/arrowCalendar.png";
|
2023-03-03 18:49:02 +03:00
|
|
|
|
|
2023-03-07 19:40:52 +03:00
|
|
|
|
import "./tracker.scss";
|
2023-02-17 15:19:49 +03:00
|
|
|
|
|
|
|
|
|
export const Tracker = () => {
|
2023-03-07 19:40:52 +03:00
|
|
|
|
const [toggleTab, setToggleTab] = useState(1);
|
2023-03-10 01:20:15 +03:00
|
|
|
|
const [tabTaskMok, setTabTaskMok] = useState([
|
2023-03-07 19:40:52 +03:00
|
|
|
|
{
|
|
|
|
|
name: "Открытые",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
open: false,
|
2023-03-07 19:40:52 +03:00
|
|
|
|
tasks: [
|
2023-03-03 18:49:02 +03:00
|
|
|
|
{
|
2023-03-07 19:40:52 +03:00
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 1,
|
2023-03-03 18:49:02 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-07 19:40:52 +03:00
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 2,
|
2023-03-03 18:49:02 +03:00
|
|
|
|
},
|
2023-03-07 19:40:52 +03:00
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "В процессе",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
open: false,
|
2023-03-07 19:40:52 +03:00
|
|
|
|
tasks: [
|
2023-03-03 18:49:02 +03:00
|
|
|
|
{
|
2023-03-07 19:40:52 +03:00
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 3,
|
2023-03-07 19:40:52 +03:00
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "На проверке",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
open: false,
|
2023-03-07 19:40:52 +03:00
|
|
|
|
tasks: [
|
2023-03-07 12:40:16 +03:00
|
|
|
|
{
|
2023-03-07 19:40:52 +03:00
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 4,
|
2023-03-07 12:40:16 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-07 19:40:52 +03:00
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 5,
|
2023-03-07 12:40:16 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-07 19:40:52 +03:00
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 6,
|
2023-03-07 12:40:16 +03:00
|
|
|
|
},
|
2023-03-13 23:33:12 +03:00
|
|
|
|
{
|
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 9,
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
2023-03-07 19:40:52 +03:00
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Готово",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
open: false,
|
2023-03-07 19:40:52 +03:00
|
|
|
|
tasks: [
|
2023-03-07 12:40:16 +03:00
|
|
|
|
{
|
2023-03-07 19:40:52 +03:00
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 7,
|
2023-03-07 19:40:52 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
task: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 12,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-03-22 21:48:06 +03:00
|
|
|
|
id: 8,
|
2023-03-07 19:40:52 +03:00
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
2023-03-30 15:07:05 +03:00
|
|
|
|
const [allTasks] = useState([
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
},
|
2023-04-10 21:22:22 +03:00
|
|
|
|
]);
|
2023-03-30 15:07:05 +03:00
|
|
|
|
|
|
|
|
|
const [archiveProjects] = useState([
|
2023-04-10 21:22:22 +03:00
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "Будущее России",
|
|
|
|
|
date: "7 марта 2023 г",
|
|
|
|
|
},
|
|
|
|
|
]);
|
2023-03-30 15:07:05 +03:00
|
|
|
|
|
2023-03-13 23:33:12 +03:00
|
|
|
|
const [completeTasks] = useState([
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-30 15:07:05 +03:00
|
|
|
|
name: "PR - 2245",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-30 15:07:05 +03:00
|
|
|
|
name: "PR - 2245",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-30 15:07:05 +03:00
|
|
|
|
name: "PR - 2245",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-30 15:07:05 +03:00
|
|
|
|
name: "PR - 2245",
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-30 15:07:05 +03:00
|
|
|
|
name: "PR - 2245",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-30 15:07:05 +03:00
|
|
|
|
name: "PR - 2245",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-30 15:07:05 +03:00
|
|
|
|
name: "PR - 2245",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
2023-03-30 15:07:05 +03:00
|
|
|
|
dateComplete: "7 марта 2023 г",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
avatarDo: avatarTest,
|
2023-04-10 21:22:22 +03:00
|
|
|
|
project: "Будущее России",
|
2023-03-13 23:33:12 +03:00
|
|
|
|
},
|
2023-03-22 21:48:06 +03:00
|
|
|
|
]);
|
2023-03-13 23:33:12 +03:00
|
|
|
|
|
2023-03-22 21:48:06 +03:00
|
|
|
|
const [filterCompleteTasks, setFilterCompleteTasks] = useState(completeTasks);
|
2023-03-13 23:33:12 +03:00
|
|
|
|
|
2023-03-24 19:26:27 +03:00
|
|
|
|
// Modal State
|
2023-03-07 19:40:52 +03:00
|
|
|
|
const [modalActiveTicket, setModalActiveTicket] = useState(false);
|
2023-04-10 21:22:22 +03:00
|
|
|
|
const [modalAddWorker, setModalAddWorker] = useState(false);
|
2023-03-22 21:48:06 +03:00
|
|
|
|
const [modalCreateProject, setModalCreateProject] = useState(false);
|
|
|
|
|
const [modalCreateColl, setModalCreateColl] = useState(false);
|
2023-03-24 19:26:27 +03:00
|
|
|
|
const [modalCreateTiket, setModalCreateTiket] = useState(false);
|
|
|
|
|
const [valueTiket, setValueTiket] = useState("");
|
2023-03-27 19:08:01 +03:00
|
|
|
|
const [valueColl, setValueColl] = useState("");
|
2023-03-24 19:26:27 +03:00
|
|
|
|
//
|
|
|
|
|
|
2023-04-10 21:22:22 +03:00
|
|
|
|
const [projectTasksOpen, setProjectTasksOpen] = useState(false);
|
2023-03-30 15:07:05 +03:00
|
|
|
|
|
2023-03-24 19:26:27 +03:00
|
|
|
|
const [selectedTab, setSelectedTab] = useState({
|
|
|
|
|
name: "",
|
|
|
|
|
indexTab: 0,
|
|
|
|
|
task: [],
|
|
|
|
|
});
|
2023-03-22 21:48:06 +03:00
|
|
|
|
|
|
|
|
|
const [startWrapperIndex, setStartWrapperIndex] = useState(null);
|
|
|
|
|
const [wrapperHover, setWrapperHover] = useState([
|
|
|
|
|
false,
|
|
|
|
|
false,
|
|
|
|
|
false,
|
|
|
|
|
false,
|
|
|
|
|
]);
|
|
|
|
|
|
2023-03-23 16:43:37 +03:00
|
|
|
|
const projects = useSelector(getProjects);
|
2023-03-07 19:40:52 +03:00
|
|
|
|
|
|
|
|
|
const toggleTabs = (index) => {
|
2023-03-30 15:07:05 +03:00
|
|
|
|
if (projectTasksOpen) {
|
2023-04-10 21:22:22 +03:00
|
|
|
|
setProjectTasksOpen(false);
|
2023-03-30 15:07:05 +03:00
|
|
|
|
}
|
2023-03-07 19:40:52 +03:00
|
|
|
|
setToggleTab(index);
|
|
|
|
|
};
|
2023-03-10 01:20:15 +03:00
|
|
|
|
|
2023-03-22 21:48:06 +03:00
|
|
|
|
function toggleMoreTasks(wrapperIndex) {
|
|
|
|
|
setTabTaskMok((prevArray) =>
|
|
|
|
|
prevArray.map((elem, index) => {
|
|
|
|
|
if (wrapperIndex === index) {
|
|
|
|
|
return { ...elem, open: !elem.open };
|
|
|
|
|
} else {
|
|
|
|
|
return elem;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
);
|
2023-03-13 23:33:12 +03:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 01:20:15 +03:00
|
|
|
|
function dragStartHandler(e, task, wrapperIndex) {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
setStartWrapperIndex({ task: task, index: wrapperIndex });
|
2023-03-10 01:20:15 +03:00
|
|
|
|
setTimeout(() => {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
e.target.classList.add("tasks__board__item__hide");
|
|
|
|
|
}, 0);
|
2023-03-10 01:20:15 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function dragEndHandler(e) {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
setWrapperHover((prevArray) =>
|
|
|
|
|
prevArray.map((elem) => {
|
|
|
|
|
return false;
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
e.target.classList.remove("tasks__board__item__hide");
|
2023-03-10 01:20:15 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function dragOverHandler(e) {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
e.preventDefault();
|
2023-03-10 01:20:15 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function dragEnterHandler(wrapperIndex) {
|
|
|
|
|
if (wrapperIndex === startWrapperIndex.index) {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
return;
|
2023-03-10 01:20:15 +03:00
|
|
|
|
}
|
2023-03-22 21:48:06 +03:00
|
|
|
|
setWrapperHover((prevArray) =>
|
|
|
|
|
prevArray.map((elem, index) => {
|
|
|
|
|
if (index === wrapperIndex) {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
);
|
2023-03-10 01:20:15 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function dragDropHandler(e, wrapperIndex) {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
e.preventDefault();
|
2023-03-10 01:20:15 +03:00
|
|
|
|
if (startWrapperIndex.index === wrapperIndex) {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
return;
|
2023-03-10 01:20:15 +03:00
|
|
|
|
}
|
2023-03-22 21:48:06 +03:00
|
|
|
|
setWrapperHover((prevArray) =>
|
|
|
|
|
prevArray.map((elem) => {
|
|
|
|
|
return false;
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
setTabTaskMok((prevArray) =>
|
|
|
|
|
prevArray.map((elem, index) => {
|
|
|
|
|
if (index === wrapperIndex) {
|
|
|
|
|
return { ...elem, tasks: [...elem.tasks, startWrapperIndex.task] };
|
|
|
|
|
} else if (index === startWrapperIndex.index) {
|
|
|
|
|
return {
|
|
|
|
|
...elem,
|
|
|
|
|
tasks: elem.tasks.filter((item) => {
|
|
|
|
|
return item.id !== startWrapperIndex.task.id;
|
|
|
|
|
}),
|
|
|
|
|
};
|
|
|
|
|
} else {
|
|
|
|
|
return elem;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
);
|
2023-03-10 01:20:15 +03:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-13 23:33:12 +03:00
|
|
|
|
function filterArchiveTasks(e) {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
setFilterCompleteTasks(
|
|
|
|
|
completeTasks.filter((item) => {
|
|
|
|
|
if (!e.target.value) {
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
|
item.name.toLowerCase().startsWith(e.target.value.toLowerCase()) ||
|
|
|
|
|
item.description
|
|
|
|
|
.toLowerCase()
|
|
|
|
|
.startsWith(e.target.value.toLowerCase())
|
|
|
|
|
) {
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-24 19:26:27 +03:00
|
|
|
|
function selectedTabTask(e, wrapperIndex, name, tasks) {
|
|
|
|
|
let tab = { name: name, indexTab: wrapperIndex, task: tasks };
|
|
|
|
|
setSelectedTab(tab);
|
|
|
|
|
setModalCreateTiket(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createTiket() {
|
|
|
|
|
tabTaskMok.filter((item) => {
|
|
|
|
|
if (item.name == selectedTab.name) {
|
2023-04-03 14:37:27 +03:00
|
|
|
|
let idItem = 0;
|
|
|
|
|
|
|
|
|
|
item.tasks.forEach((item) => {
|
|
|
|
|
idItem = item.id;
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-24 19:26:27 +03:00
|
|
|
|
let newTiket = {
|
|
|
|
|
task: valueTiket,
|
|
|
|
|
description: "Сверстать часть таблицы. Сверстать часть таблицы",
|
|
|
|
|
comments: 0,
|
|
|
|
|
files: 0,
|
|
|
|
|
avatarCreated: avatarTest,
|
|
|
|
|
avatarDo: avatarTest,
|
2023-04-03 14:37:27 +03:00
|
|
|
|
id: idItem + 1,
|
2023-03-24 19:26:27 +03:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
item.tasks.push(newTiket);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
setModalCreateTiket(false);
|
2023-03-27 19:08:01 +03:00
|
|
|
|
setValueTiket("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createTab() {
|
|
|
|
|
let newTab = {
|
|
|
|
|
name: valueColl,
|
|
|
|
|
open: false,
|
|
|
|
|
tasks: [],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
tabTaskMok.unshift(newTab);
|
|
|
|
|
setValueColl("");
|
|
|
|
|
setModalCreateColl(false);
|
2023-03-13 23:33:12 +03:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-07 19:40:52 +03:00
|
|
|
|
return (
|
|
|
|
|
<div className="tracker">
|
|
|
|
|
<ProfileHeader />
|
|
|
|
|
<div className="container">
|
|
|
|
|
<div className="tracker__content">
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<ProfileBreadcrumbs
|
|
|
|
|
links={[
|
|
|
|
|
{ name: "Главная", link: "/profile" },
|
|
|
|
|
{ name: "Трекер", link: "/profile/tracker" },
|
|
|
|
|
]}
|
2023-03-23 16:18:57 +03:00
|
|
|
|
/>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<h2 className="tracker__title">Управление проектами с трекером</h2>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="tracker__tabs">
|
|
|
|
|
<div className="tracker__tabs__head">
|
|
|
|
|
<div
|
2023-04-10 21:22:22 +03:00
|
|
|
|
className={toggleTab === 1 ? "tab active-tab" : "tab"}
|
|
|
|
|
onClick={() => toggleTabs(1)}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
|
|
|
|
<img src={project} alt="img" />
|
|
|
|
|
<p>Проекты </p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2023-04-10 21:22:22 +03:00
|
|
|
|
className={toggleTab === 2 ? "tab active-tab" : "tab"}
|
|
|
|
|
onClick={() => toggleTabs(2)}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
|
|
|
|
<img src={tasks} alt="img" />
|
|
|
|
|
<p>Все мои задачи</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2023-04-10 21:22:22 +03:00
|
|
|
|
className={toggleTab === 3 ? "tab active-tab" : "tab"}
|
|
|
|
|
onClick={() => toggleTabs(3)}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
|
|
|
|
<img src={archive} alt="img" />
|
|
|
|
|
<p>Архив</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="tracker__tabs__content">
|
|
|
|
|
<div
|
2023-04-10 21:22:22 +03:00
|
|
|
|
className={
|
|
|
|
|
toggleTab === 1
|
|
|
|
|
? "tracker__tabs__content__projects active__content tracker__tabs__content__wrapper"
|
|
|
|
|
: "tracker__tabs__content__projects tracker__tabs__content__wrapper"
|
|
|
|
|
}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
|
|
|
|
<ModalCreate
|
2023-04-10 21:22:22 +03:00
|
|
|
|
active={modalCreateProject}
|
|
|
|
|
setActive={setModalCreateProject}
|
|
|
|
|
title={"Укажите название проекта:"}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
/>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
{Boolean(projects.length) &&
|
|
|
|
|
!projectTasksOpen &&
|
2023-03-30 15:07:05 +03:00
|
|
|
|
projects.map((project, index) => {
|
|
|
|
|
return (
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<div
|
|
|
|
|
className="project"
|
|
|
|
|
key={index}
|
|
|
|
|
onClick={() => setProjectTasksOpen(true)}
|
|
|
|
|
>
|
|
|
|
|
<h3>{project.name}</h3>
|
|
|
|
|
<div className="project__info">
|
|
|
|
|
<p>Открытые задачи</p>
|
|
|
|
|
<span className="count">{project.count}</span>
|
|
|
|
|
<span className="add">+</span>
|
2023-03-07 19:40:52 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
</div>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
);
|
|
|
|
|
})}
|
2023-04-10 21:22:22 +03:00
|
|
|
|
{!Boolean(projects.length) && !projectTasksOpen && (
|
|
|
|
|
<div className="no-projects">
|
|
|
|
|
<div className="no-projects__createNew">
|
|
|
|
|
<div>
|
|
|
|
|
<img src={noProjects} alt="noProjectImg" />
|
|
|
|
|
<p>Создайте свой первый проект</p>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<button
|
|
|
|
|
className="createProjectBtn"
|
|
|
|
|
onClick={() => setModalCreateProject(true)}
|
|
|
|
|
>
|
|
|
|
|
<span>+</span>Создать проект
|
|
|
|
|
</button>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<p className="no-projects__info">
|
|
|
|
|
Ставьте задачи, следите за прогрессом, ведите учёт рабочего
|
|
|
|
|
времени
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{Boolean(projects.length) && !projectTasksOpen && (
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<div className="create-newProject">
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<button
|
|
|
|
|
className="createProjectBtn"
|
|
|
|
|
onClick={() => setModalCreateProject(true)}
|
|
|
|
|
>
|
2023-03-07 19:40:52 +03:00
|
|
|
|
<span>+</span>Создать проект
|
|
|
|
|
</button>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<p>
|
|
|
|
|
Ставьте задачи, следите за прогрессом, ведите учёт рабочего
|
|
|
|
|
времени
|
|
|
|
|
</p>
|
2023-03-07 19:40:52 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
)}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
|
|
|
|
<div
|
2023-04-10 21:22:22 +03:00
|
|
|
|
className={
|
|
|
|
|
toggleTab === 1 && projectTasksOpen
|
|
|
|
|
? "tracker__tabs__content__tasks tasks active__content"
|
|
|
|
|
: "tracker__tabs__content__projects"
|
|
|
|
|
}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
|
|
|
|
<div className="tasks__head">
|
|
|
|
|
<div className="tasks__head__wrapper">
|
|
|
|
|
<h4>Проект : Разработка трекера</h4>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
|
|
|
|
|
<ModalAdd
|
|
|
|
|
active={modalCreateColl}
|
|
|
|
|
setActive={setModalCreateColl}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<div className="title-project">
|
|
|
|
|
<h4>Введите название колонки</h4>
|
|
|
|
|
<div className="input-container">
|
|
|
|
|
<input
|
|
|
|
|
className="name-project"
|
|
|
|
|
value={valueColl}
|
|
|
|
|
onChange={(e) => setValueColl(e.target.value)}
|
|
|
|
|
></input>
|
2023-03-27 19:08:01 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<button className="button-add" onClick={createTab}>
|
|
|
|
|
Создать
|
|
|
|
|
</button>
|
|
|
|
|
</ModalAdd>
|
|
|
|
|
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<div className="tasks__head__add">
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<span onClick={() => setModalCreateColl(true)}>+</span>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<p>добавить задачу в проект</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="tasks__head__persons">
|
|
|
|
|
<img src={avatarTest} alt="avatar" />
|
|
|
|
|
<img src={avatarTest} alt="avatar" />
|
|
|
|
|
<span className="countPersons">+9</span>
|
|
|
|
|
<span className="addPerson">+</span>
|
|
|
|
|
<p>добавить участника в проект</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="tasks__head__select">
|
|
|
|
|
<span>Учавствую</span>
|
|
|
|
|
<img src={selectArrow} alt="arrow" />
|
2023-03-07 19:40:52 +03:00
|
|
|
|
</div>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<div className="tasks__head__select">
|
|
|
|
|
<span>Мои</span>
|
|
|
|
|
<img src={selectArrow} alt="arrow" />
|
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<div
|
|
|
|
|
className="tasks__head__back"
|
|
|
|
|
onClick={() => setProjectTasksOpen(false)}
|
|
|
|
|
>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<p>Вернуться на проекты</p>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<img src={arrow} alt="arrow" />
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-03-24 19:26:27 +03:00
|
|
|
|
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<ModalTiket
|
2023-04-10 21:22:22 +03:00
|
|
|
|
active={modalActiveTicket}
|
|
|
|
|
setActive={setModalActiveTicket}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
/>
|
2023-03-07 19:40:52 +03:00
|
|
|
|
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<ModalAdd active={modalCreateTiket} setActive={setModalCreateTiket}>
|
|
|
|
|
<div className="title-project">
|
|
|
|
|
<h4>Введите название карточки</h4>
|
|
|
|
|
<div className="input-container">
|
|
|
|
|
<input
|
|
|
|
|
className="name-project"
|
|
|
|
|
value={valueTiket}
|
|
|
|
|
onChange={(e) => setValueTiket(e.target.value)}
|
|
|
|
|
></input>
|
2023-03-24 19:26:27 +03:00
|
|
|
|
</div>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<button className="button-add" onClick={createTiket}>
|
|
|
|
|
Создать
|
|
|
|
|
</button>
|
|
|
|
|
</ModalAdd>
|
2023-03-24 19:26:27 +03:00
|
|
|
|
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<div className="tasks__container">
|
|
|
|
|
{tabTaskMok.map((section, wrapperIndex) => {
|
|
|
|
|
return (
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<div
|
|
|
|
|
key={wrapperIndex}
|
|
|
|
|
onDragOver={(e) => dragOverHandler(e)}
|
|
|
|
|
onDragEnter={(e) => dragEnterHandler(wrapperIndex)}
|
|
|
|
|
onDrop={(e) => dragDropHandler(e, wrapperIndex)}
|
|
|
|
|
className={`tasks__board ${
|
|
|
|
|
section.tasks.length >= 3 ? "tasks__board__more" : ""
|
|
|
|
|
} ${
|
|
|
|
|
wrapperHover[wrapperIndex] ? "tasks__board__hover" : ""
|
|
|
|
|
}`}
|
|
|
|
|
>
|
|
|
|
|
<div className="board__head">
|
|
|
|
|
<span className={wrapperIndex === 3 ? "done" : ""}>
|
|
|
|
|
{section.name}
|
|
|
|
|
</span>
|
|
|
|
|
<div>
|
|
|
|
|
<span
|
|
|
|
|
className="add"
|
|
|
|
|
onClick={(e) =>
|
|
|
|
|
selectedTabTask(
|
|
|
|
|
e,
|
|
|
|
|
wrapperIndex,
|
|
|
|
|
section.name,
|
|
|
|
|
section.tasks
|
|
|
|
|
)
|
2023-03-13 23:33:12 +03:00
|
|
|
|
}
|
2023-04-10 21:22:22 +03:00
|
|
|
|
>
|
|
|
|
|
+
|
|
|
|
|
</span>
|
|
|
|
|
<span className="more">...</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{section.tasks.map((task, index) => {
|
|
|
|
|
if (index > 2) {
|
|
|
|
|
if (!section.open) {
|
|
|
|
|
return;
|
2023-03-30 15:07:05 +03:00
|
|
|
|
}
|
2023-04-10 21:22:22 +03:00
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
key={index}
|
|
|
|
|
className="tasks__board__item"
|
|
|
|
|
draggable={true}
|
|
|
|
|
onDragStart={(e) =>
|
|
|
|
|
dragStartHandler(e, task, wrapperIndex)
|
|
|
|
|
}
|
|
|
|
|
onDragEnd={(e) => dragEndHandler(e)}
|
|
|
|
|
onClick={() => setModalActiveTicket(true)}
|
|
|
|
|
>
|
|
|
|
|
<div className="tasks__board__item__title">
|
|
|
|
|
<p>{task.task}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="tasks__board__item__description">
|
|
|
|
|
{task.description}
|
|
|
|
|
</p>
|
|
|
|
|
<div className="tasks__board__item__info">
|
|
|
|
|
<div className="tasks__board__item__info__more">
|
|
|
|
|
<img src={commentsBoard} alt="commentsImg" />
|
|
|
|
|
<span>{task.comments} коментариев</span>
|
2023-03-07 12:40:16 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<div className="tasks__board__item__info__more">
|
|
|
|
|
<img src={filesBoard} alt="filesImg" />
|
|
|
|
|
<span>{task.files} файлов</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="tasks__board__item__info__avatars">
|
|
|
|
|
<img src={task.avatarCreated} alt="avatar" />
|
|
|
|
|
<img src={task.avatarDo} alt="avatar" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
{section.tasks.length > 3 && (
|
|
|
|
|
<span
|
|
|
|
|
className={
|
|
|
|
|
section.open
|
|
|
|
|
? "lessItems openItems"
|
|
|
|
|
: "moreItems openItems"
|
|
|
|
|
}
|
|
|
|
|
onClick={() => toggleMoreTasks(wrapperIndex)}
|
|
|
|
|
>
|
|
|
|
|
{section.open ? "-" : "+"}
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2023-04-10 21:22:22 +03:00
|
|
|
|
className={
|
|
|
|
|
toggleTab === 2
|
|
|
|
|
? "tracker__tabs__content__allTasks taskList tasks active__content"
|
|
|
|
|
: "tracker__tabs__content__projects"
|
|
|
|
|
}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
|
|
|
|
<div className="taskList__head">
|
|
|
|
|
<h3>Список всех задач</h3>
|
|
|
|
|
<div className="taskList__head__search">
|
|
|
|
|
<img src={search} alt="search" />
|
|
|
|
|
<input
|
2023-04-10 21:22:22 +03:00
|
|
|
|
type="text"
|
|
|
|
|
placeholder="Найти задачу"
|
|
|
|
|
onChange={(event) => filterArchiveTasks(event)}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
/>
|
2023-03-07 19:40:52 +03:00
|
|
|
|
</div>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
|
|
|
|
<div className="taskList__wrapper">
|
|
|
|
|
{allTasks.map((task, index) => {
|
2023-04-10 21:22:22 +03:00
|
|
|
|
return (
|
|
|
|
|
<div className="task" key={index}>
|
|
|
|
|
<div className="task__info">
|
|
|
|
|
<h5>{task.name}</h5>
|
|
|
|
|
<p>{task.description}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="task__person">
|
|
|
|
|
<img src={task.avatarDo} alt="avatar" />
|
|
|
|
|
<div className="task__project">
|
|
|
|
|
<p>{task.project}</p>
|
|
|
|
|
<span>{task.dateComplete}</span>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
2023-04-10 21:22:22 +03:00
|
|
|
|
className={
|
|
|
|
|
toggleTab === 3
|
|
|
|
|
? "tracker__tabs__content__archive active__content"
|
|
|
|
|
: "tracker__tabs__content__projects"
|
|
|
|
|
}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
>
|
|
|
|
|
<div className="archive__tasks">
|
|
|
|
|
<div className="archive__title">
|
|
|
|
|
<h3>Архив задач:</h3>
|
|
|
|
|
<p>{filterCompleteTasks.length} задач(а)</p>
|
|
|
|
|
<div className="archive__tasks__search">
|
|
|
|
|
<img src={search} alt="search" />
|
|
|
|
|
<input
|
2023-04-10 21:22:22 +03:00
|
|
|
|
type="text"
|
|
|
|
|
placeholder="Найти задачу"
|
|
|
|
|
onChange={(event) => filterArchiveTasks(event)}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
/>
|
2023-03-13 23:33:12 +03:00
|
|
|
|
</div>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
|
|
|
|
<div className="archive__tasksWrapper">
|
2023-04-10 21:22:22 +03:00
|
|
|
|
{Boolean(filterCompleteTasks.length) ? (
|
2023-03-30 15:07:05 +03:00
|
|
|
|
filterCompleteTasks.map((task, index) => {
|
2023-03-22 21:48:06 +03:00
|
|
|
|
return (
|
2023-04-10 21:22:22 +03:00
|
|
|
|
<div className="archive__completeTask" key={index}>
|
|
|
|
|
<div className="archive__completeTask__description">
|
|
|
|
|
<p>{task.description}</p>
|
|
|
|
|
<p className="date">{task.dateComplete}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="archive__completeTask__info">
|
|
|
|
|
<img src={task.avatarDo} alt="avatar" />
|
|
|
|
|
<div className="archive__completeTask__info__project">
|
|
|
|
|
<span>Проект</span>
|
|
|
|
|
<p>{task.project}</p>
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
2023-03-22 21:48:06 +03:00
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
</div>
|
2023-03-22 21:48:06 +03:00
|
|
|
|
);
|
2023-03-30 15:07:05 +03:00
|
|
|
|
})
|
2023-04-10 21:22:22 +03:00
|
|
|
|
) : (
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<div className="archive__noItem">
|
|
|
|
|
<p>В архиве задач нет</p>
|
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
)}
|
2023-03-30 15:07:05 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="archive__projects">
|
|
|
|
|
<div className="archive__title">
|
|
|
|
|
<h3>Архив проектов:</h3>
|
|
|
|
|
<p>{archiveProjects.length} проект(ов)</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="archive__tasksWrapper">
|
2023-04-10 21:22:22 +03:00
|
|
|
|
{Boolean(archiveProjects) ? (
|
2023-03-30 15:07:05 +03:00
|
|
|
|
archiveProjects.map((project, index) => {
|
2023-04-10 21:22:22 +03:00
|
|
|
|
return (
|
|
|
|
|
<div className="archive__completeTask" key={index}>
|
|
|
|
|
<div className="archive__completeTask__description">
|
|
|
|
|
<p>{project.name}</p>
|
|
|
|
|
<p className="date">{project.date}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
) : (
|
2023-03-30 15:07:05 +03:00
|
|
|
|
<div className="archive__noItem">
|
|
|
|
|
<p>В архиве проектов нет</p>
|
|
|
|
|
</div>
|
2023-04-10 21:22:22 +03:00
|
|
|
|
)}
|
2023-03-13 23:33:12 +03:00
|
|
|
|
</div>
|
2023-03-03 18:49:02 +03:00
|
|
|
|
</div>
|
2023-03-07 19:40:52 +03:00
|
|
|
|
</div>
|
2023-02-17 15:19:49 +03:00
|
|
|
|
</div>
|
2023-03-07 19:40:52 +03:00
|
|
|
|
</div>
|
|
|
|
|
<Footer />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2023-02-17 15:19:49 +03:00
|
|
|
|
};
|