diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index fe3d4e14..ac27adff 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link } from "react-router-dom"; +import { getProfileInfo } from "@redux/outstaffingSlice"; import { setProjectBoardFetch } from "@redux/projectsTrackerSlice"; import { getCorrectRequestDate, urlForLocal } from "@utils/helper"; @@ -24,7 +25,6 @@ import send from "assets/icons/send.svg"; import watch from "assets/icons/watch.svg"; import "./modalTicket.scss"; -import { getProfileInfo } from "@redux/outstaffingSlice"; export const ModalTiсket = ({ active, @@ -247,28 +247,32 @@ export const ModalTiсket = ({ (res) => { let timerSeconds = 0; res.length && - res.forEach((time) => { - timerSeconds += time.deltaSeconds; - setCurrentTimerCount({ - hours: Math.floor(timerSeconds / 60 / 60), - minute: Math.floor((timerSeconds / 60) % 60), - seconds: timerSeconds % 60, + res.forEach((time) => { + timerSeconds += time.deltaSeconds; + setCurrentTimerCount({ + hours: Math.floor(timerSeconds / 60 / 60), + minute: Math.floor((timerSeconds / 60) % 60), + seconds: timerSeconds % 60, + }); + updateTimerHours = Math.floor(timerSeconds / 60 / 60); + updateTimerMinute = Math.floor((timerSeconds / 60) % 60); + updateTimerSec = timerSeconds % 60; + if (!time.stopped_at) { + setTimerStart(true); + startTimer(); + setTimerInfo(time); + } }); - updateTimerHours = Math.floor(timerSeconds / 60 / 60); - updateTimerMinute = Math.floor((timerSeconds / 60) % 60); - updateTimerSec = timerSeconds % 60; - if (!time.stopped_at) { - setTimerStart(true); - startTimer(); - setTimerInfo(time); - } - }); } ); if ( localStorage.getItem("role_status") !== "18" && - Boolean(!correctProjectUsers.find((item) => item.user_id === profileInfo.id_user)) + Boolean( + !correctProjectUsers.find( + (item) => item.user_id === profileInfo.id_user + ) + ) ) { setCorrectProjectUsers((prevState) => [ ...prevState, @@ -393,7 +397,7 @@ export const ModalTiсket = ({ {/* */} {/*

*/}

- @@ -448,7 +452,12 @@ export const ModalTiсket = ({ ) : (

- + Добавить исполнителя {dropListOpen && (
@@ -496,7 +505,12 @@ export const ModalTiсket = ({ )}
- + Добавить участников {dropListMembersOpen && (