From c3ef01ee3568b7186d46a172277ba7bb9305e035 Mon Sep 17 00:00:00 2001 From: M1kola Date: Fri, 7 Jul 2023 00:46:58 +0300 Subject: [PATCH] tracker fixes --- .../Modal/Tracker/ModalTicket/ModalTicket.jsx | 3 +- .../TicketFullScreen/TicketFullScreen.jsx | 2 +- .../Tracker/TrackerModal/TrackerModal.jsx | 31 +++++++++++++------ src/pages/ProjectTracker/ProjectTracker.js | 7 +++-- src/pages/Tracker/Tracker.js | 2 +- src/utils/helper.js | 10 +++--- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index a711a0ab..08fd0281 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -463,8 +463,7 @@ export const ModalTiсket = ({
- setActive(false)}> - + setActive(false)}>

Создатель : {task.user?.fio}

{executor ? ( diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index a8451048..3b163d5d 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -24,7 +24,6 @@ import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadc import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import TrackerTaskComment from "@components/TrackerTaskComment/TrackerTaskComment"; -import archive from "assets/images/archiveIcon.png"; import arrow from "assets/icons/arrows/arrowCalendar.png"; import arrowStart from "assets/icons/arrows/arrowStart.png"; import close from "assets/icons/close.png"; @@ -36,6 +35,7 @@ import send from "assets/icons/send.svg"; import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import watch from "assets/icons/watch.svg"; +import archive from "assets/images/archiveIcon.png"; import avatarMok from "assets/images/avatarMok.png"; import "./ticketFullScreen.scss"; diff --git a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx index 7b38a024..a640dc53 100644 --- a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx +++ b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx @@ -272,7 +272,7 @@ export const TrackerModal = ({ > {modalType === "addWorker" && ( <> -
+

Добавьте участника

{/*
*/} @@ -282,12 +282,16 @@ export const TrackerModal = ({ {/* onChange={(e) => setEmailWorker(e.target.value)}*/} {/* />*/} {/*
*/} -

Выберите пользователя в проекте или добавьте по e- mail

-
-
+

+ Выберите пользователя в проекте или добавьте по e- mail +

+
+
setSelectWorkersOpen(!selectWorkersOpen)} > @@ -326,14 +330,21 @@ export const TrackerModal = ({
)}
- + Добавить
или -
-
- +
+
+
Отправить приглашение @@ -372,7 +383,7 @@ export const TrackerModal = ({ "blockQuote", ], removePlugins: ["BlockQuote"], - placeholder: "Описание задачи" + placeholder: "Описание задачи", }} onChange={(event, editor) => { const data = editor.getData(); diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 86a8f0c9..d34ab06d 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -34,7 +34,6 @@ import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -import archive from "assets/images/archiveIcon.png"; import arrow from "assets/icons/arrows/arrowCalendar.png"; import arrowDown from "assets/icons/arrows/selectArrow.png"; import close from "assets/icons/close.png"; @@ -46,6 +45,7 @@ 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 archive from "assets/images/archiveIcon.png"; import avatarMok from "assets/images/avatarMok.png"; export const ProjectTracker = () => { @@ -390,7 +390,10 @@ export const ProjectTracker = () => { />
{projectBoard.projectUsers?.length} - {caseOfNum(projectBoard.projectUsers?.length, "persons")} + {caseOfNum( + projectBoard.projectUsers?.length, + "persons" + )}
В проекте - diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 564700d0..7e3f3c05 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -23,10 +23,10 @@ import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadc import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import ProjectTiket from "@components/ProjectTiket/ProjectTiket"; -import archive from "assets/images/archiveIcon.png"; import search from "assets/icons/serchIcon.png"; import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; +import archive from "assets/images/archiveIcon.png"; import avatarMok from "assets/images/avatarMok.png"; import noProjects from "assets/images/noProjects.png"; diff --git a/src/utils/helper.js b/src/utils/helper.js index b3e8ebb5..22659289 100644 --- a/src/utils/helper.js +++ b/src/utils/helper.js @@ -65,7 +65,7 @@ export function getCorrectRequestDate(date) { export function caseOfNum(number, type) { const comments = ["коментарий", "комментария", " коментариев"]; const files = ["файл", "файла", "файлов"]; - const persons = ["участник", "участника", "участников"] + const persons = ["участник", "участника", "участников"]; const cases = [2, 0, 1, 1, 1, 2]; if (type === "comments") { return comments[ @@ -84,9 +84,9 @@ export function caseOfNum(number, type) { if (type === "persons") { return persons[ - 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] + ]; } }