Merge branch 'main' into tracker-connect-back
This commit is contained in:
parent
af8704eafe
commit
ede41ed8ed
@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
|
|||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
|
import { getProfileInfo } from "@redux/outstaffingSlice";
|
||||||
import { setProjectBoardFetch } from "@redux/projectsTrackerSlice";
|
import { setProjectBoardFetch } from "@redux/projectsTrackerSlice";
|
||||||
|
|
||||||
import { getCorrectRequestDate, urlForLocal } from "@utils/helper";
|
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 watch from "assets/icons/watch.svg";
|
||||||
|
|
||||||
import "./modalTicket.scss";
|
import "./modalTicket.scss";
|
||||||
import { getProfileInfo } from "@redux/outstaffingSlice";
|
|
||||||
|
|
||||||
export const ModalTiсket = ({
|
export const ModalTiсket = ({
|
||||||
active,
|
active,
|
||||||
@ -247,28 +247,32 @@ export const ModalTiсket = ({
|
|||||||
(res) => {
|
(res) => {
|
||||||
let timerSeconds = 0;
|
let timerSeconds = 0;
|
||||||
res.length &&
|
res.length &&
|
||||||
res.forEach((time) => {
|
res.forEach((time) => {
|
||||||
timerSeconds += time.deltaSeconds;
|
timerSeconds += time.deltaSeconds;
|
||||||
setCurrentTimerCount({
|
setCurrentTimerCount({
|
||||||
hours: Math.floor(timerSeconds / 60 / 60),
|
hours: Math.floor(timerSeconds / 60 / 60),
|
||||||
minute: Math.floor((timerSeconds / 60) % 60),
|
minute: Math.floor((timerSeconds / 60) % 60),
|
||||||
seconds: timerSeconds % 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 (
|
if (
|
||||||
localStorage.getItem("role_status") !== "18" &&
|
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) => [
|
setCorrectProjectUsers((prevState) => [
|
||||||
...prevState,
|
...prevState,
|
||||||
@ -393,7 +397,7 @@ export const ModalTiсket = ({
|
|||||||
{/* </button>*/}
|
{/* </button>*/}
|
||||||
{/*</p>*/}
|
{/*</p>*/}
|
||||||
<p className="file">
|
<p className="file">
|
||||||
<button className='button-add-file'>
|
<button className="button-add-file">
|
||||||
<img src={file}></img>
|
<img src={file}></img>
|
||||||
Загрузить файл
|
Загрузить файл
|
||||||
</button>
|
</button>
|
||||||
@ -448,7 +452,12 @@ export const ModalTiсket = ({
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="add-worker moreItems ">
|
<div className="add-worker moreItems ">
|
||||||
<button className='button-add-worker' onClick={() => setDropListOpen(true)}>+</button>
|
<button
|
||||||
|
className="button-add-worker"
|
||||||
|
onClick={() => setDropListOpen(true)}
|
||||||
|
>
|
||||||
|
+
|
||||||
|
</button>
|
||||||
<span>Добавить исполнителя</span>
|
<span>Добавить исполнителя</span>
|
||||||
{dropListOpen && (
|
{dropListOpen && (
|
||||||
<div className="dropdownList">
|
<div className="dropdownList">
|
||||||
@ -496,7 +505,12 @@ export const ModalTiсket = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="add-worker moreItems">
|
<div className="add-worker moreItems">
|
||||||
<button className='button-add-worker' onClick={() => setDropListMembersOpen(true)}>+</button>
|
<button
|
||||||
|
className="button-add-worker"
|
||||||
|
onClick={() => setDropListMembersOpen(true)}
|
||||||
|
>
|
||||||
|
+
|
||||||
|
</button>
|
||||||
<span>Добавить участников</span>
|
<span>Добавить участников</span>
|
||||||
{dropListMembersOpen && (
|
{dropListMembersOpen && (
|
||||||
<div className="dropdownList">
|
<div className="dropdownList">
|
||||||
|
Loading…
Reference in New Issue
Block a user