tracker-tasks
This commit is contained in:
parent
4db278fdbd
commit
3131fbe1ef
@ -1,8 +1,8 @@
|
|||||||
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
||||||
import React, { useEffect, useState } from "react";
|
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 ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
|
||||||
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
|
||||||
|
|
||||||
import { getProfileInfo } from "@redux/outstaffingSlice";
|
import { getProfileInfo } from "@redux/outstaffingSlice";
|
||||||
import { setProjectBoardFetch } from "@redux/projectsTrackerSlice";
|
import { setProjectBoardFetch } from "@redux/projectsTrackerSlice";
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { Link, useNavigate, useParams } from "react-router-dom";
|
import { Link, useNavigate, useParams } from "react-router-dom";
|
||||||
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
|
||||||
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
deletePersonOnProject,
|
deletePersonOnProject,
|
||||||
@ -40,9 +40,9 @@ import send from "assets/icons/send.svg";
|
|||||||
import project from "assets/icons/trackerProject.svg";
|
import project from "assets/icons/trackerProject.svg";
|
||||||
import tasks from "assets/icons/trackerTasks.svg";
|
import tasks from "assets/icons/trackerTasks.svg";
|
||||||
import watch from "assets/icons/watch.svg";
|
import watch from "assets/icons/watch.svg";
|
||||||
|
import avatarMok from "assets/images/avatarMok.png";
|
||||||
|
|
||||||
import "./ticketFullScreen.scss";
|
import "./ticketFullScreen.scss";
|
||||||
import avatarMok from "assets/images/avatarMok.png";
|
|
||||||
|
|
||||||
export const TicketFullScreen = () => {
|
export const TicketFullScreen = () => {
|
||||||
const [modalAddWorker, setModalAddWorker] = useState(false);
|
const [modalAddWorker, setModalAddWorker] = useState(false);
|
||||||
@ -89,10 +89,11 @@ export const TicketFullScreen = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
setComments(comments);
|
setComments(comments);
|
||||||
});
|
});
|
||||||
apiRequest(`/timer/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`).then(
|
apiRequest(
|
||||||
(res) => {
|
`/timer/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
|
||||||
let timerSeconds = 0;
|
).then((res) => {
|
||||||
res.length &&
|
let timerSeconds = 0;
|
||||||
|
res.length &&
|
||||||
res.forEach((time) => {
|
res.forEach((time) => {
|
||||||
timerSeconds += time.deltaSeconds;
|
timerSeconds += time.deltaSeconds;
|
||||||
setCurrentTimerCount({
|
setCurrentTimerCount({
|
||||||
@ -109,8 +110,7 @@ export const TicketFullScreen = () => {
|
|||||||
setTimerInfo(time);
|
setTimerInfo(time);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
);
|
|
||||||
dispatch(setProjectBoardFetch(taskInfo.project_id));
|
dispatch(setProjectBoardFetch(taskInfo.project_id));
|
||||||
setLoader(boardLoader);
|
setLoader(boardLoader);
|
||||||
});
|
});
|
||||||
@ -337,11 +337,9 @@ export const TicketFullScreen = () => {
|
|||||||
></TrackerModal>
|
></TrackerModal>
|
||||||
|
|
||||||
<div className="tasks__head__persons">
|
<div className="tasks__head__persons">
|
||||||
{projectBoard.projectUsers?.length > 3 &&
|
{projectBoard.projectUsers?.length > 3 && (
|
||||||
<span className="countPersons">
|
<span className="countPersons">+1...</span>
|
||||||
+1...
|
)}
|
||||||
</span>
|
|
||||||
}
|
|
||||||
<div className="projectPersons">
|
<div className="projectPersons">
|
||||||
{projectBoard.projectUsers?.length &&
|
{projectBoard.projectUsers?.length &&
|
||||||
projectBoard.projectUsers
|
projectBoard.projectUsers
|
||||||
@ -478,7 +476,11 @@ export const TicketFullScreen = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<p dangerouslySetInnerHTML={{ __html: inputsValue.description }} />
|
<p
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: inputsValue.description,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="content__communication">
|
<div className="content__communication">
|
||||||
@ -535,7 +537,8 @@ export const TicketFullScreen = () => {
|
|||||||
<div className="workers">
|
<div className="workers">
|
||||||
<div className="workers_box task__info">
|
<div className="workers_box task__info">
|
||||||
<p className="workers__creator">
|
<p className="workers__creator">
|
||||||
Создатель : <br/>{taskInfo.user?.fio}
|
Создатель : <br />
|
||||||
|
{taskInfo.user?.fio}
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<div>
|
||||||
{Boolean(taskInfo.taskUsers?.length) &&
|
{Boolean(taskInfo.taskUsers?.length) &&
|
||||||
@ -590,7 +593,8 @@ export const TicketFullScreen = () => {
|
|||||||
{timerStart ? (
|
{timerStart ? (
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
taskInfo.executor_id === Number(localStorage.getItem("id"))
|
taskInfo.executor_id ===
|
||||||
|
Number(localStorage.getItem("id"))
|
||||||
? "stop"
|
? "stop"
|
||||||
: "stop disable"
|
: "stop disable"
|
||||||
}
|
}
|
||||||
@ -601,7 +605,8 @@ export const TicketFullScreen = () => {
|
|||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
taskInfo.executor_id === Number(localStorage.getItem("id"))
|
taskInfo.executor_id ===
|
||||||
|
Number(localStorage.getItem("id"))
|
||||||
? "start"
|
? "start"
|
||||||
: "start disable"
|
: "start disable"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
|
||||||
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
|
|
||||||
import { getProfileInfo } from "@redux/outstaffingSlice";
|
import { getProfileInfo } from "@redux/outstaffingSlice";
|
||||||
import {
|
import {
|
||||||
@ -27,9 +27,9 @@ import BaseButton from "@components/Common/BaseButton/BaseButton";
|
|||||||
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
|
||||||
|
|
||||||
import arrowDown from "assets/icons/arrows/selectArrow.png";
|
import arrowDown from "assets/icons/arrows/selectArrow.png";
|
||||||
|
import avatarMok from "assets/images/avatarMok.png";
|
||||||
|
|
||||||
import "./trackerModal.scss";
|
import "./trackerModal.scss";
|
||||||
import avatarMok from "assets/images/avatarMok.png";
|
|
||||||
|
|
||||||
export const TrackerModal = ({
|
export const TrackerModal = ({
|
||||||
active,
|
active,
|
||||||
@ -344,10 +344,17 @@ export const TrackerModal = ({
|
|||||||
editor={ClassicEditor}
|
editor={ClassicEditor}
|
||||||
data={descriptionTicket}
|
data={descriptionTicket}
|
||||||
config={{
|
config={{
|
||||||
toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
|
toolbar: [
|
||||||
removePlugins: [
|
"heading",
|
||||||
"BlockQuote",
|
"|",
|
||||||
|
"bold",
|
||||||
|
"italic",
|
||||||
|
"link",
|
||||||
|
"bulletedList",
|
||||||
|
"numberedList",
|
||||||
|
"blockQuote",
|
||||||
],
|
],
|
||||||
|
removePlugins: ["BlockQuote"],
|
||||||
}}
|
}}
|
||||||
onChange={(event, editor) => {
|
onChange={(event, editor) => {
|
||||||
const data = editor.getData();
|
const data = editor.getData();
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
import { urlForLocal } from "@utils/helper";
|
import { urlForLocal } from "@utils/helper";
|
||||||
@ -6,8 +8,6 @@ import { apiRequest } from "@api/request";
|
|||||||
|
|
||||||
import { getCorrectDate } from "@components/Calendar/calendarHelper";
|
import { getCorrectDate } from "@components/Calendar/calendarHelper";
|
||||||
import TrackerTaskSubComment from "@components/TrackerTaskComment/TrackerTaskComment";
|
import TrackerTaskSubComment from "@components/TrackerTaskComment/TrackerTaskComment";
|
||||||
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
|
||||||
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
|
||||||
|
|
||||||
import del from "assets/icons/delete.svg";
|
import del from "assets/icons/delete.svg";
|
||||||
import edit from "assets/icons/edit.svg";
|
import edit from "assets/icons/edit.svg";
|
||||||
@ -78,7 +78,7 @@ export const TrackerTaskComment = ({
|
|||||||
? "comments__list__item__main"
|
? "comments__list__item__main"
|
||||||
: "",
|
: "",
|
||||||
"comments__list__item",
|
"comments__list__item",
|
||||||
commentsEditOpen ? 'comment__edit--open' : '',
|
commentsEditOpen ? "comment__edit--open" : "",
|
||||||
comment.parent_id ? "comments__list__item__subComment" : "",
|
comment.parent_id ? "comments__list__item__subComment" : "",
|
||||||
].join(" ")}
|
].join(" ")}
|
||||||
>
|
>
|
||||||
@ -132,7 +132,10 @@ export const TrackerTaskComment = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<p dangerouslySetInnerHTML={{ __html: commentsEditText}} className="comments__list__item__text" />
|
<p
|
||||||
|
dangerouslySetInnerHTML={{ __html: commentsEditText }}
|
||||||
|
className="comments__list__item__text"
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
{!comment.parent_id && !commentsEditOpen && (
|
{!comment.parent_id && !commentsEditOpen && (
|
||||||
<>
|
<>
|
||||||
|
@ -322,11 +322,9 @@ export const ProjectTracker = () => {
|
|||||||
<p>добавить колонку</p>
|
<p>добавить колонку</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="tasks__head__persons">
|
<div className="tasks__head__persons">
|
||||||
{projectBoard.projectUsers?.length > 3 &&
|
{projectBoard.projectUsers?.length > 3 && (
|
||||||
<span className="countPersons">
|
<span className="countPersons">+1...</span>
|
||||||
+1...
|
)}
|
||||||
</span>
|
|
||||||
}
|
|
||||||
<div className="projectPersons">
|
<div className="projectPersons">
|
||||||
{projectBoard.projectUsers?.length &&
|
{projectBoard.projectUsers?.length &&
|
||||||
projectBoard.projectUsers
|
projectBoard.projectUsers
|
||||||
@ -468,7 +466,13 @@ export const ProjectTracker = () => {
|
|||||||
<span
|
<span
|
||||||
className="add"
|
className="add"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
selectedTabTask(column.id, projectBoard?.columns ? projectBoard?.columns[0].tasks.at(-1).priority + 1 : 1)
|
selectedTabTask(
|
||||||
|
column.id,
|
||||||
|
projectBoard?.columns
|
||||||
|
? projectBoard?.columns[0].tasks.at(-1)
|
||||||
|
.priority + 1
|
||||||
|
: 1
|
||||||
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
+
|
+
|
||||||
|
Loading…
Reference in New Issue
Block a user