diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index 4ef24ca6..54e92a72 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -21,10 +21,10 @@ import { urlForLocal, } from "@utils/helper"; -import { useNotification } from "@hooks/useNotification"; - import { apiRequest } from "@api/request"; +import { useNotification } from "@hooks/useNotification"; + import { getCorrectDate } from "@components/Calendar/calendarHelper"; import { Footer } from "@components/Common/Footer/Footer"; import { Loader } from "@components/Common/Loader/Loader"; diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 95c84f84..18d83967 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -621,7 +621,7 @@ export const ProjectTracker = () => { )} -
+
{column.tasks.map((task) => { return (
{ /> )}
- {task.dead_line && -
-

Срок исполнения:

- - {getCorrectDate(task.dead_line)} - -
- } + {task.dead_line && ( +
+

Срок исполнения:

+ + {getCorrectDate(task.dead_line)} + +
+ )}
- commentsImg + commentsImg {task.comment_count}{" "} - {caseOfNum(task.comment_count, "comments")} + {caseOfNum( + task.comment_count, + "comments" + )}
diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 9f43ab15..955c1e7d 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -9,7 +9,7 @@ import { setToggleTab, } from "@redux/projectsTrackerSlice"; -import {caseOfNum, urlForLocal} from "@utils/helper"; +import { caseOfNum, urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; @@ -296,10 +296,9 @@ export const Tracker = () => {

Архив задач:

- { - `${filterCompleteTasks.length} - ${caseOfNum(filterCompleteTasks.length, "tasks")}` - }

+ {`${filterCompleteTasks.length} + ${caseOfNum(filterCompleteTasks.length, "tasks")}`} +

search {

Архив проектов:

- { - `${projects.filter((project) => project.status === 10).length} - ${caseOfNum(projects.filter((project) => project.status === 10).length, "projects")}`} + {`${ + projects.filter((project) => project.status === 10).length + } + ${caseOfNum( + projects.filter((project) => project.status === 10) + .length, + "projects" + )}`}

diff --git a/src/utils/helper.js b/src/utils/helper.js index 15ad0602..d530919e 100644 --- a/src/utils/helper.js +++ b/src/utils/helper.js @@ -70,12 +70,12 @@ export function caseOfNum(number, type) { files: ["файл", "файла", "файлов"], persons: ["участник", "участника", "участников"], tasks: ["задача", "задачи", "задач"], - projects: ["проект", "проекта", "проектов"] - } + projects: ["проект", "проекта", "проектов"], + }; const cases = [2, 0, 1, 1, 1, 2]; return allTypes[type][ - number % 100 > 4 && number % 100 < 20 - ? 2 - : cases[number % 10 < 5 ? number % 10 : 5] - ]; + number % 100 > 4 && number % 100 < 20 + ? 2 + : cases[number % 10 < 5 ? number % 10 : 5] + ]; }