import React, { useEffect, useState } from "react"; import { ProfileHeader } from "../../ProfileHeader/ProfileHeader"; import { ProfileBreadcrumbs } from "../../ProfileBreadcrumbs/ProfileBreadcrumbs"; import { Footer } from "../../Footer/Footer"; import { Link, useParams, useNavigate } from "react-router-dom"; import ModalAdd from "../ModalAdd/ModalAdd"; import { Navigation } from "../../Navigation/Navigation"; import { useDispatch } from "react-redux"; import { setToggleTab } from "../../../redux/projectsTrackerSlice"; import { apiRequest } from "../../../api/request"; import project from "../../../images/trackerProject.svg"; import watch from "../../../images/watch.png"; import file from "../../../images/fileModal.svg"; import task from "../../../images/tasksMock.png"; import send from "../../../images/send.svg"; import arrow2 from "../../../images/arrowStart.png"; import plus from "../../../images/plus.svg"; import tasks from "../../../images/trackerTasks.svg"; import archive from "../../../images/archiveTracker.svg"; import selectArrow from "../../../images/select.svg"; import avatarTest from "../../../images/AvatarTest .png"; import arrow from "../../../images/arrowCalendar.png"; import link from "../../../images/link.svg"; import archive2 from "../../../images/archive.svg"; import del from "../../../images/delete.svg"; import edit from "../../../images/edit.svg"; import "./ticketFullScreen.scss"; export const TicketFullScreen = ({}) => { const [addSubtask, setAddSubtask] = useState(false); const [modalAddWorker, setModalAddWorker] = useState(false); const [valueTiket, setValueTiket] = useState(""); const ticketId = useParams(); const dispatch = useDispatch(); const navigate = useNavigate(); const [projectInfo, setProjectInfo] = useState({}); const [taskInfo, setTaskInfo] = useState({}); useEffect(() => { apiRequest(`/task/get-task?task_id=${ticketId.id}`).then((taskInfo) => { setTaskInfo(taskInfo); apiRequest(`/project/get-project?project_id=${taskInfo.project_id}`).then( (project) => { setProjectInfo(project); } ); }); }, []); function deleteTask() { apiRequest("/task/update-task", { method: "PUT", data: { task_id: ticketId.id, status: 0, }, }).then((res) => { navigate(`/tracker/project/${taskInfo.project_id}`); }); } const toggleTabs = (index) => { dispatch(setToggleTab(index)); }; return (

Управление проектами с трекером

toggleTabs(1)} > img

Проекты

toggleTabs(2)} > img

Все мои задачи

toggleTabs(3)} > img

Архив

Проект : {projectInfo.name}

Добавьте участника

Введите имя или e-mail

setValueTiket(e.target.value)} >
avatar avatar +9 +

добавить участника в проект

Учавствую arrow
Мои arrow

Вернуться на проекты

arrow
Задача
{taskInfo.title}

{taskInfo.description}

{taskInfo.description}

{0} Файлов

Создатель : {taskInfo.user?.fio}

{Boolean(taskInfo.taskUsers?.length) && taskInfo.taskUsers.map((worker, index) => { return (

{worker.name}

); })}
Добавить участников
Длительность :

{"8:30:22"}

редактировать

ссылка на проект

в архив

удалить

Вы добавляете подзадачу

в колонку задачи {"Готово"}

Введите текст

); }; export default TicketFullScreen;