import React, { useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { Link, useParams } from "react-router-dom"; import { setToggleTab } from "@redux/projectsTrackerSlice"; import { copyProjectLink } from "@utils/helper"; import { urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; import { Footer } from "@components/Common/Footer/Footer"; import { Loader } from "@components/Common/Loader/Loader"; import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import arrow from "assets/icons/arrows/arrowCalendar.png"; import emailImg from "assets/icons/emailStatistics.svg"; import link from "assets/icons/link.svg"; import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import archive from "assets/images/archiveIcon.png"; import mockAvatar from "assets/images/mock/AvatarTest .png"; import "./statistics.scss"; const Statistics = () => { const dispatch = useDispatch(); const params = useParams(); const [projectStatistic, setProjectStatistic] = useState(null); const [projectInfo, setProjectInfo] = useState(null); const [loader, setLoader] = useState(true); useEffect(() => { apiRequest(`/project/get-project?project_id=${params.id}`).then((res) => { setProjectInfo(res); }); apiRequest(`/project/statistic?project_id=${params.id}`).then((res) => { setProjectStatistic(res); setLoader(false); }); }, []); const teams = [ { avatar: mockAvatar, name: "Дмитрий Рогов", email: "dmitryi.zavadskyi@yandex.ru", role: "Программист", status: true }, { avatar: mockAvatar, name: "Марина Орехова", email: "dmitryi.zavadskyi@yandex.ru", role: "Менеджер", status: true }, { avatar: mockAvatar, name: "Тамара Доценко", email: "dmitryi.zavadskyi@yandex.ru51515188151", role: "Тестировщик", status: false }, { avatar: mockAvatar, name: "Кек Лолов", email: "dm4124gmail.com", role: "PM", status: false } ]; const toggleTabs = (index) => { dispatch(setToggleTab(index)); }; return (
Проекты
toggleTabs(2)} >Все мои задачи
Проект:
{projectInfo?.owner_info?.fio}
Открытые задачи
{projectStatistic?.open_tasks_count}Задач в работе
{projectStatistic?.task_on_work_count}Закрыто задач
{projectStatistic?.closed_task_count}Имя
Почта
Роль
Статус
{person.username}
{person.email}
{person.role ? person.role : "-"}
{/* */} {person.status ? "Активно" : "Не активно"}Добавить участника