tracker tasks
This commit is contained in:
parent
5fa069d84d
commit
86d29475aa
@ -21,10 +21,10 @@ import {
|
|||||||
urlForLocal,
|
urlForLocal,
|
||||||
} from "@utils/helper";
|
} from "@utils/helper";
|
||||||
|
|
||||||
import { useNotification } from "@hooks/useNotification";
|
|
||||||
|
|
||||||
import { apiRequest } from "@api/request";
|
import { apiRequest } from "@api/request";
|
||||||
|
|
||||||
|
import { useNotification } from "@hooks/useNotification";
|
||||||
|
|
||||||
import { getCorrectDate } from "@components/Calendar/calendarHelper";
|
import { getCorrectDate } from "@components/Calendar/calendarHelper";
|
||||||
import { Footer } from "@components/Common/Footer/Footer";
|
import { Footer } from "@components/Common/Footer/Footer";
|
||||||
import { Loader } from "@components/Common/Loader/Loader";
|
import { Loader } from "@components/Common/Loader/Loader";
|
||||||
|
@ -621,7 +621,7 @@ export const ProjectTracker = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className='tasksContainer'>
|
<div className="tasksContainer">
|
||||||
{column.tasks.map((task) => {
|
{column.tasks.map((task) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@ -678,20 +678,26 @@ export const ProjectTracker = () => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{task.dead_line &&
|
{task.dead_line && (
|
||||||
<div className="tasks__board__item__deadLine">
|
<div className="tasks__board__item__deadLine">
|
||||||
<p>Срок исполнения:</p>
|
<p>Срок исполнения:</p>
|
||||||
<span>
|
<span>
|
||||||
{getCorrectDate(task.dead_line)}
|
{getCorrectDate(task.dead_line)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
<div className="tasks__board__item__info">
|
<div className="tasks__board__item__info">
|
||||||
<div className="tasks__board__item__info__more">
|
<div className="tasks__board__item__info__more">
|
||||||
<img src={commentsBoard} alt="commentsImg" />
|
<img
|
||||||
|
src={commentsBoard}
|
||||||
|
alt="commentsImg"
|
||||||
|
/>
|
||||||
<span>
|
<span>
|
||||||
{task.comment_count}{" "}
|
{task.comment_count}{" "}
|
||||||
{caseOfNum(task.comment_count, "comments")}
|
{caseOfNum(
|
||||||
|
task.comment_count,
|
||||||
|
"comments"
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="tasks__board__item__info__more">
|
<div className="tasks__board__item__info__more">
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
setToggleTab,
|
setToggleTab,
|
||||||
} from "@redux/projectsTrackerSlice";
|
} from "@redux/projectsTrackerSlice";
|
||||||
|
|
||||||
import {caseOfNum, urlForLocal} from "@utils/helper";
|
import { caseOfNum, urlForLocal } from "@utils/helper";
|
||||||
|
|
||||||
import { apiRequest } from "@api/request";
|
import { apiRequest } from "@api/request";
|
||||||
|
|
||||||
@ -296,10 +296,9 @@ export const Tracker = () => {
|
|||||||
<div className="archive__title">
|
<div className="archive__title">
|
||||||
<h3>Архив задач:</h3>
|
<h3>Архив задач:</h3>
|
||||||
<p>
|
<p>
|
||||||
{
|
{`${filterCompleteTasks.length}
|
||||||
`${filterCompleteTasks.length}
|
${caseOfNum(filterCompleteTasks.length, "tasks")}`}
|
||||||
${caseOfNum(filterCompleteTasks.length, "tasks")}`
|
</p>
|
||||||
}</p>
|
|
||||||
<div className="archive__tasks__search">
|
<div className="archive__tasks__search">
|
||||||
<img src={search} alt="search" />
|
<img src={search} alt="search" />
|
||||||
<input
|
<input
|
||||||
@ -358,9 +357,14 @@ export const Tracker = () => {
|
|||||||
<div className="archive__title">
|
<div className="archive__title">
|
||||||
<h3>Архив проектов:</h3>
|
<h3>Архив проектов:</h3>
|
||||||
<p>
|
<p>
|
||||||
{
|
{`${
|
||||||
`${projects.filter((project) => project.status === 10).length}
|
projects.filter((project) => project.status === 10).length
|
||||||
${caseOfNum(projects.filter((project) => project.status === 10).length, "projects")}`}
|
}
|
||||||
|
${caseOfNum(
|
||||||
|
projects.filter((project) => project.status === 10)
|
||||||
|
.length,
|
||||||
|
"projects"
|
||||||
|
)}`}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="archive__tasksWrapper">
|
<div className="archive__tasksWrapper">
|
||||||
|
@ -70,12 +70,12 @@ export function caseOfNum(number, type) {
|
|||||||
files: ["файл", "файла", "файлов"],
|
files: ["файл", "файла", "файлов"],
|
||||||
persons: ["участник", "участника", "участников"],
|
persons: ["участник", "участника", "участников"],
|
||||||
tasks: ["задача", "задачи", "задач"],
|
tasks: ["задача", "задачи", "задач"],
|
||||||
projects: ["проект", "проекта", "проектов"]
|
projects: ["проект", "проекта", "проектов"],
|
||||||
}
|
};
|
||||||
const cases = [2, 0, 1, 1, 1, 2];
|
const cases = [2, 0, 1, 1, 1, 2];
|
||||||
return allTypes[type][
|
return allTypes[type][
|
||||||
number % 100 > 4 && number % 100 < 20
|
number % 100 > 4 && number % 100 < 20
|
||||||
? 2
|
? 2
|
||||||
: cases[number % 10 < 5 ? number % 10 : 5]
|
: cases[number % 10 < 5 ? number % 10 : 5]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user