From ede41ed8ed4c0cebda93e50b07257ff7887d54bf Mon Sep 17 00:00:00 2001
From: M1kola
Date: Mon, 26 Jun 2023 12:58:07 +0300
Subject: [PATCH] Merge branch 'main' into tracker-connect-back
---
.../Modal/Tracker/ModalTicket/ModalTicket.jsx | 54 ++++++++++++-------
1 file changed, 34 insertions(+), 20 deletions(-)
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 = ({
{/* */}
{/*
*/}
-