tasks
This commit is contained in:
parent
6e4d2c1dc2
commit
f6c7609b1c
@ -462,7 +462,8 @@ export const TicketFullScreen = () => {
|
|||||||
участник
|
участник
|
||||||
</div>
|
</div>
|
||||||
<div className="persons__list__info">
|
<div className="persons__list__info">
|
||||||
<span>В проекте - </span><p>“{projectInfo.name}”</p>
|
<span>В проекте - </span>
|
||||||
|
<p>“{projectInfo.name}”</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="persons__list__items">
|
<div className="persons__list__items">
|
||||||
{projectInfo.projectUsers?.map((person) => {
|
{projectInfo.projectUsers?.map((person) => {
|
||||||
|
@ -42,11 +42,11 @@ import commentsBoard from "assets/icons/commentsBoard.svg";
|
|||||||
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";
|
||||||
import filesBoard from "assets/icons/filesBoard.svg";
|
import filesBoard from "assets/icons/filesBoard.svg";
|
||||||
|
import trackerNoTasks from "assets/icons/trackerNoTasks.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 accept from "assets/images/accept.png";
|
import accept from "assets/images/accept.png";
|
||||||
import avatarMok from "assets/images/avatarMok.png";
|
import avatarMok from "assets/images/avatarMok.png";
|
||||||
import trackerNoTasks from "assets/icons/trackerNoTasks.svg"
|
|
||||||
|
|
||||||
export const ProjectTracker = () => {
|
export const ProjectTracker = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@ -63,7 +63,7 @@ export const ProjectTracker = () => {
|
|||||||
const [personListOpen, setPersonListOpen] = useState(false);
|
const [personListOpen, setPersonListOpen] = useState(false);
|
||||||
const [checkBoxParticipateTasks, setCheckBoxParticipateTasks] =
|
const [checkBoxParticipateTasks, setCheckBoxParticipateTasks] =
|
||||||
useState(false);
|
useState(false);
|
||||||
const [filteredNoTasks, setFilteredNoTasks] = useState(false)
|
const [filteredNoTasks, setFilteredNoTasks] = useState(false);
|
||||||
const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false);
|
const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false);
|
||||||
const [selectedExecutor, setSelectedExecutor] = useState(null);
|
const [selectedExecutor, setSelectedExecutor] = useState(null);
|
||||||
const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false);
|
const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false);
|
||||||
@ -79,10 +79,10 @@ export const ProjectTracker = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const tasksHover = {};
|
const tasksHover = {};
|
||||||
const columnHover = {};
|
const columnHover = {};
|
||||||
let columnsTasksEmpty = true
|
let columnsTasksEmpty = true;
|
||||||
if (Object.keys(projectBoard).length) {
|
if (Object.keys(projectBoard).length) {
|
||||||
projectBoard.columns.forEach((column) => {
|
projectBoard.columns.forEach((column) => {
|
||||||
if (column.tasks.length) columnsTasksEmpty = false
|
if (column.tasks.length) columnsTasksEmpty = false;
|
||||||
setOpenColumnSelect((prevState) => ({
|
setOpenColumnSelect((prevState) => ({
|
||||||
...prevState,
|
...prevState,
|
||||||
[column.id]: false,
|
[column.id]: false,
|
||||||
@ -91,10 +91,13 @@ export const ProjectTracker = () => {
|
|||||||
column.tasks.forEach((task) => (tasksHover[task.id] = false));
|
column.tasks.forEach((task) => (tasksHover[task.id] = false));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (columnsTasksEmpty && (checkBoxMyTasks || selectedExecutor || checkBoxParticipateTasks)) {
|
if (
|
||||||
setFilteredNoTasks(true)
|
columnsTasksEmpty &&
|
||||||
|
(checkBoxMyTasks || selectedExecutor || checkBoxParticipateTasks)
|
||||||
|
) {
|
||||||
|
setFilteredNoTasks(true);
|
||||||
} else {
|
} else {
|
||||||
setFilteredNoTasks(false)
|
setFilteredNoTasks(false);
|
||||||
}
|
}
|
||||||
setWrapperHover(columnHover);
|
setWrapperHover(columnHover);
|
||||||
setTaskHover(tasksHover);
|
setTaskHover(tasksHover);
|
||||||
@ -270,8 +273,6 @@ export const ProjectTracker = () => {
|
|||||||
dispatch(setProjectBoardFetch(projectId.id));
|
dispatch(setProjectBoardFetch(projectId.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="tracker">
|
<div className="tracker">
|
||||||
<ProfileHeader />
|
<ProfileHeader />
|
||||||
@ -392,7 +393,8 @@ export const ProjectTracker = () => {
|
|||||||
участник
|
участник
|
||||||
</div>
|
</div>
|
||||||
<div className="persons__list__info">
|
<div className="persons__list__info">
|
||||||
<span>В проекте - </span><p>“{projectBoard.name}”</p>
|
<span>В проекте - </span>
|
||||||
|
<p>“{projectBoard.name}”</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="persons__list__items">
|
<div className="persons__list__items">
|
||||||
{projectBoard.projectUsers?.map((person) => {
|
{projectBoard.projectUsers?.map((person) => {
|
||||||
@ -528,7 +530,8 @@ export const ProjectTracker = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="tasks__container">
|
<div className="tasks__container">
|
||||||
{Boolean(projectBoard?.columns) && !filteredNoTasks &&
|
{Boolean(projectBoard?.columns) &&
|
||||||
|
!filteredNoTasks &&
|
||||||
Boolean(projectBoard.columns.length) &&
|
Boolean(projectBoard.columns.length) &&
|
||||||
projectBoard.columns.map((column) => {
|
projectBoard.columns.map((column) => {
|
||||||
return (
|
return (
|
||||||
@ -674,15 +677,18 @@ export const ProjectTracker = () => {
|
|||||||
В проекте нет задач.
|
В проекте нет задач.
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{filteredNoTasks &&
|
{filteredNoTasks && (
|
||||||
<div className='tasks__board__noTasks'>
|
<div className="tasks__board__noTasks">
|
||||||
<div className='tasks__board__noTasksInfo'>
|
<div className="tasks__board__noTasksInfo">
|
||||||
<img src={trackerNoTasks} alt='noTasks' />
|
<img src={trackerNoTasks} alt="noTasks" />
|
||||||
<p>Пока нет подходящих задач</p>
|
<p>Пока нет подходящих задач</p>
|
||||||
</div>
|
</div>
|
||||||
<p className='tasks__board__noTasksMore'>Ставьте задачи, следите за прогрессом, ведите учёт рабочего времени</p>
|
<p className="tasks__board__noTasksMore">
|
||||||
|
Ставьте задачи, следите за прогрессом, ведите учёт
|
||||||
|
рабочего времени
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user