This commit is contained in:
Mikola 2023-11-19 20:01:50 +03:00
parent 9697c375e7
commit e61cb35f8e
4 changed files with 33 additions and 27 deletions

View File

@ -14,8 +14,8 @@ export const ModalLayout = ({
<div <div
className={active ? `modal-layout active` : "modal-layout"} className={active ? `modal-layout active` : "modal-layout"}
onClick={(event) => { onClick={(event) => {
if (event.target.className === 'modal-layout active') { if (event.target.className === "modal-layout active") {
setActive(false) setActive(false);
} }
}} }}
{...props} {...props}

View File

@ -321,7 +321,7 @@ export const TrackerModal = ({
} else { } else {
setCorrectProjectUsers(projectUsers); setCorrectProjectUsers(projectUsers);
} }
initListeners() initListeners();
}, [active]); }, [active]);
useEffect(() => { useEffect(() => {
@ -344,29 +344,29 @@ export const TrackerModal = ({
const path = event.path || (event.composedPath && event.composedPath()); const path = event.path || (event.composedPath && event.composedPath());
if ( if (
event && event &&
!path.find( !path.find(
(div) => (div) =>
div.classList && div.classList &&
(div.classList.contains("tags__selected__name") || (div.classList.contains("tags__selected__name") ||
div.classList.contains("tags__dropDown")) div.classList.contains("tags__dropDown"))
) )
) { ) {
setSelectTagsOpen(false) setSelectTagsOpen(false);
} }
if ( if (
event && event &&
!path.find( !path.find(
(div) => (div) =>
div.classList && div.classList &&
(div.classList.contains("select__executor") || (div.classList.contains("select__executor") ||
div.classList.contains("select__executor__dropDown")) div.classList.contains("select__executor__dropDown"))
) )
) { ) {
setSelectExecutorTaskOpen(false) setSelectExecutorTaskOpen(false);
} }
} };
return ( return (
<ModalLayout <ModalLayout

View File

@ -43,7 +43,10 @@ export const ProjectTiket = ({ project, index }) => {
if ( if (
event && event &&
!path.find((div) => div.classList && div.classList.contains(`project-${project.id}`)) !path.find(
(div) =>
div.classList && div.classList.contains(`project-${project.id}`)
)
) { ) {
setModalSelect(false); setModalSelect(false);
} }
@ -93,9 +96,12 @@ export const ProjectTiket = ({ project, index }) => {
</div> </div>
</Link> </Link>
<span className="menu-settings" onClick={() => { <span
setModalSelect(!modalSelect) className="menu-settings"
}}> onClick={() => {
setModalSelect(!modalSelect);
}}
>
... ...
</span> </span>

View File

@ -151,9 +151,9 @@ export const Summary = () => {
</a> </a>
); );
})} })}
{!Boolean(gitInfo.length) && {!Boolean(gitInfo.length) && (
<p className="noGitItems">Нет актуальных проектов</p> <p className="noGitItems">Нет актуальных проектов</p>
} )}
</div> </div>
</div> </div>
)} )}