From 9697c375e70a438e7d2850b2b663ab61d9b2e54b Mon Sep 17 00:00:00 2001 From: Mikola Date: Sun, 19 Nov 2023 20:01:27 +0300 Subject: [PATCH] fixes --- .../Common/ModalLayout/ModalLayout.jsx | 7 ++-- .../Common/ModalLayout/modalLayout.scss | 12 ++++++- .../Modal/ModalSelect/modalSelect.scss | 2 +- .../Modal/Tracker/ModalTicket/ModalTicket.jsx | 2 +- .../TicketFullScreen/TicketFullScreen.jsx | 16 ++++----- .../Tracker/TrackerModal/TrackerModal.jsx | 33 +++++++++++++++++++ src/components/ProjectTiket/ProjectTiket.jsx | 8 +++-- src/components/ProjectTiket/projectTiket.scss | 8 ++--- src/pages/Summary/Summary.js | 3 ++ src/pages/Summary/summary.scss | 10 ++++++ src/pages/Tracker/tracker.scss | 9 +++-- 11 files changed, 85 insertions(+), 25 deletions(-) diff --git a/src/components/Common/ModalLayout/ModalLayout.jsx b/src/components/Common/ModalLayout/ModalLayout.jsx index 3c7d2872..4bd33a8c 100644 --- a/src/components/Common/ModalLayout/ModalLayout.jsx +++ b/src/components/Common/ModalLayout/ModalLayout.jsx @@ -13,7 +13,11 @@ export const ModalLayout = ({ return (
setActive(false)} + onClick={(event) => { + if (event.target.className === 'modal-layout active') { + setActive(false) + } + }} {...props} >
e.stopPropagation()} > {children}
diff --git a/src/components/Common/ModalLayout/modalLayout.scss b/src/components/Common/ModalLayout/modalLayout.scss index c3be785b..bc6d706e 100644 --- a/src/components/Common/ModalLayout/modalLayout.scss +++ b/src/components/Common/ModalLayout/modalLayout.scss @@ -45,6 +45,16 @@ font-weight: 300; } + .addPersonBlock { + display: flex; + flex-direction: column; + justify-content: space-between; + + button { + margin: 0 auto; + } + } + .invitePersonBlock { display: flex; flex-direction: column; @@ -64,7 +74,7 @@ } &__btn { - margin: 0 auto 0 0; + margin: 0 auto; max-width: 242px; width: 100%; } diff --git a/src/components/Modal/ModalSelect/modalSelect.scss b/src/components/Modal/ModalSelect/modalSelect.scss index 23fcb08a..5a1f6aa3 100644 --- a/src/components/Modal/ModalSelect/modalSelect.scss +++ b/src/components/Modal/ModalSelect/modalSelect.scss @@ -5,7 +5,7 @@ background: #e1fccf; border-radius: 12px; transform: scale(0); - bottom: -90px; + bottom: -40px; right: -120px; @media (max-width: 1050px) { diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index 88977841..e21dbf7e 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -379,7 +379,7 @@ export const ModalTiсket = ({ const data = await res.json(); // setUploadedFile(data); - attachFile(data[0].id) + attachFile(data[0].id); } // function deleteLoadedFile() { diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index 9bf8ea8b..f020516b 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -29,13 +29,13 @@ 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"; +import FileTracker from "@components/FileTracker/FileTracker"; import AcceptModal from "@components/Modal/AcceptModal/AcceptModal"; import TrackerModal from "@components/Modal/Tracker/TrackerModal/TrackerModal"; import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import TrackerTaskComment from "@components/TrackerTaskComment/TrackerTaskComment"; -import FileTracker from "@components/FileTracker/FileTracker"; import arrow from "assets/icons/arrows/arrowCalendar.png"; import arrowStart from "assets/icons/arrows/arrowStart.png"; @@ -502,7 +502,7 @@ export const TicketFullScreen = () => { function deleteFile(file) { setTaskFiles((prevValue) => - prevValue.filter((item) => item.id !== file.id) + prevValue.filter((item) => item.id !== file.id) ); } @@ -807,12 +807,12 @@ export const TicketFullScreen = () => {
{taskFiles.map((file) => { return ( - + ); })}
diff --git a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx index 0b893a2f..15544867 100644 --- a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx +++ b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx @@ -321,6 +321,7 @@ export const TrackerModal = ({ } else { setCorrectProjectUsers(projectUsers); } + initListeners() }, [active]); useEffect(() => { @@ -335,6 +336,38 @@ export const TrackerModal = ({ } }, [taskTags, projectMarks]); + const initListeners = () => { + document.addEventListener("click", closeByClickingOut); + }; + + const closeByClickingOut = (event) => { + const path = event.path || (event.composedPath && event.composedPath()); + + if ( + event && + !path.find( + (div) => + div.classList && + (div.classList.contains("tags__selected__name") || + div.classList.contains("tags__dropDown")) + ) + ) { + setSelectTagsOpen(false) + } + + if ( + event && + !path.find( + (div) => + div.classList && + (div.classList.contains("select__executor") || + div.classList.contains("select__executor__dropDown")) + ) + ) { + setSelectExecutorTaskOpen(false) + } + } + return ( { if ( event && - !path.find((item) => item.classList && item.classList.contains("project")) + !path.find((div) => div.classList && div.classList.contains(`project-${project.id}`)) ) { setModalSelect(false); } @@ -73,7 +73,7 @@ export const ProjectTiket = ({ project, index }) => { function linkProject() {} return ( -
+
{
- setModalSelect(true)}> + { + setModalSelect(!modalSelect) + }}> ... diff --git a/src/components/ProjectTiket/projectTiket.scss b/src/components/ProjectTiket/projectTiket.scss index eed4819c..470c5562 100644 --- a/src/components/ProjectTiket/projectTiket.scss +++ b/src/components/ProjectTiket/projectTiket.scss @@ -87,7 +87,7 @@ font-size: 21px; color: #6f6f6f; right: 26px; - top: 59px; + top: 10px; } &__avatar { @@ -104,10 +104,10 @@ position: absolute; bottom: 18px; left: 26px; - color: #678eda; + color: #0042b4; text-decoration: underline; - font-size: 12px; - font-weight: 300; + font-size: 14px; + font-weight: 400; line-height: 17px; } } diff --git a/src/pages/Summary/Summary.js b/src/pages/Summary/Summary.js index 8027eedb..fab12a29 100644 --- a/src/pages/Summary/Summary.js +++ b/src/pages/Summary/Summary.js @@ -151,6 +151,9 @@ export const Summary = () => { ); })} + {!Boolean(gitInfo.length) && +

Нет актуальных проектов

+ }
)} diff --git a/src/pages/Summary/summary.scss b/src/pages/Summary/summary.scss index c474aaad..9c950c92 100644 --- a/src/pages/Summary/summary.scss +++ b/src/pages/Summary/summary.scss @@ -298,6 +298,16 @@ column-gap: 25px; justify-content: space-between; + .noGitItems { + width: 100%; + font-size: 20px; + background: #FFFFFF; + border-radius: 12px; + padding: 35px 30px 30px 45px; + color: #000000; + font-weight: 600; + } + .gitItem { width: 48%; display: flex; diff --git a/src/pages/Tracker/tracker.scss b/src/pages/Tracker/tracker.scss index 55f344c2..92942a87 100644 --- a/src/pages/Tracker/tracker.scss +++ b/src/pages/Tracker/tracker.scss @@ -391,9 +391,9 @@ flex-direction: column; background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%); border-radius: 40px; - padding: 31px 128px 41px 49px; + padding: 15px 30px; cursor: default; - width: 650px; + width: 800px; &__close { cursor: pointer; @@ -410,7 +410,6 @@ align-items: end; color: #1458dd; font-size: 22px; - margin-top: 10px; span { font-size: 44px; font-weight: 700; @@ -462,7 +461,7 @@ display: flex; justify-content: space-between; align-items: center; - max-width: 190px; + max-width: 300px; width: 100%; .avatar { @@ -479,7 +478,7 @@ color: #807777; width: auto; height: auto; - max-width: 130px; + max-width: 215px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;