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