diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index 8c1bbea2..178e5f1f 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -7,13 +7,7 @@ import { useDispatch, useSelector } from "react-redux"; import { Link, useNavigate, useParams } from "react-router-dom"; import { getProfileInfo } from "@redux/outstaffingSlice"; -import { - deletePersonOnProject, - getBoarderLoader, - modalToggle, - setProjectBoardFetch, - setToggleTab -} from "@redux/projectsTrackerSlice"; +import { getBoarderLoader, setToggleTab } from "@redux/projectsTrackerSlice"; import { backendImg, @@ -32,7 +26,6 @@ import { Footer } from "@components/Common/Footer/Footer"; import { Loader } from "@components/Common/Loader/Loader"; import FileTracker from "@components/FileTracker/FileTracker"; import AcceptModal from "@components/Modal/AcceptModal/AcceptModal"; -import TrackerModal from "@components/Modal/Tracker/TrackerModal/TrackerModal"; import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; @@ -60,7 +53,6 @@ import "./ticketFullScreen.scss"; registerLocale("ru", ru); export const TicketFullScreen = () => { - const [modalAddWorker, setModalAddWorker] = useState(false); const ticketId = useParams(); const dispatch = useDispatch(); const navigate = useNavigate(); @@ -71,7 +63,6 @@ export const TicketFullScreen = () => { const [inputsValue, setInputsValue] = useState({}); const [loader, setLoader] = useState(true); const [comments, setComments] = useState([]); - const [personListOpen, setPersonListOpen] = useState(false); const [timerStart, setTimerStart] = useState(false); const [timerInfo, setTimerInfo] = useState({}); const [currentTimerCount, setCurrentTimerCount] = useState({ @@ -292,18 +283,6 @@ export const TicketFullScreen = () => { }); } - function deletePerson(userId) { - apiRequest("/project/del-user", { - method: "DELETE", - data: { - project_id: projectInfo.id, - user_id: userId - } - }).then(() => { - dispatch(deletePersonOnProject(userId)); - }); - } - function commentDelete(comment) { setComments((prevValue) => prevValue.filter((item) => item.id !== comment.id) @@ -616,18 +595,6 @@ export const TicketFullScreen = () => { ) { setSelectTagsOpen(false); } - - if ( - event && - !path.find( - (div) => - div.classList && - (div.classList.contains("addPerson") || - div.classList.contains("persons__list")) - ) - ) { - setPersonListOpen(false); - } }; return ( @@ -680,98 +647,6 @@ export const TicketFullScreen = () => {
{projectInfo.name}
- - - -
-
- {projectInfo.projectUsers?.length && - projectInfo.projectUsers.slice(0, 3).map((person) => { - return ( - avatar - ); - })} -
- {projectInfo.projectUsers?.length > 3 && ( - +1 - )} - { - setPersonListOpen(true); - }} - > - + - -

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

- {personListOpen && ( -
- close setPersonListOpen(false)} - /> -
- {projectInfo.projectUsers?.length} - участник -
-
- В проекте - -

“{projectInfo.name}”

-
-
- {projectInfo.projectUsers?.map((person) => { - return ( -
- avatar - {person.user.fio} - delete deletePerson(person.user_id)} - /> -
- ); - })} -
-
{ - dispatch(modalToggle("addWorker")); - setModalAddWorker(true); - setPersonListOpen(false); - }} - > - + -

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

-
-
- )} -
{ /> ) : (
- Название задачи: {inputsValue.title}
)} @@ -833,12 +707,7 @@ export const TicketFullScreen = () => { /> ) : (
- - Описание -
- задачи:{" "} -
-

{

)}
- {/*

*/} - {/* {*/} - {/* dispatch(modalToggle("addSubtask"));*/} - {/* setModalAddWorker(true);*/} - {/* }}*/} - {/* styles={"button-green-add"}*/} - {/* >*/} - {/* */} - {/* Добавить под задачу*/} - {/* */} - {/*

*/}
{
-

- Создатель:

 {taskInfo.user?.fio}

-

+
+ Создатель:

 {taskInfo.user?.fio}

+
{taskInfo.executor ? ( -
-

Исполнитель: {taskInfo.executor.fio}

- avatar - deleteTaskExecutor()} - /> -
+ <> +
Исполнитель:
+
+

{taskInfo.executor.fio}

+ avatar + deleteTaskExecutor()} + /> +
+ ) : (