diff --git a/src/components/ManagerSelect.tsx b/src/components/ManagerSelect.tsx index 71eff34..8e1ffe1 100644 --- a/src/components/ManagerSelect.tsx +++ b/src/components/ManagerSelect.tsx @@ -78,8 +78,8 @@ function ManagerSelect({ className={clsx( "absolute left-0 w-full z-10", position === "top" - ? "top-[calc(-11.389vw-0.278vw)]" - : "top-[calc(100%+0.278vw)]" + ? "bottom-[calc(100%+4px)]" + : "top-[calc(100%+4px)]" )} >
({ - {isOpen && ( -
-
- -

Смена проекта

-
+ + + + + {isOpen && ( + +
- - - - -
-
-
{projects.map((project) => ( - + +
+
{project.name}
+ {activeProject && project.name === activeProject.name && ( + + )} +
+
))}
-
- - -
-
-
- )} - + + )} + + ); } diff --git a/src/components/modals/CreateSessionModal.tsx b/src/components/modals/CreateSessionModal.tsx index 0c59ce5..79ded1b 100644 --- a/src/components/modals/CreateSessionModal.tsx +++ b/src/components/modals/CreateSessionModal.tsx @@ -14,6 +14,7 @@ import { useQueryClient, useMutation, useQuery } from "@tanstack/react-query"; import { AnimatePresence, motion } from "motion/react"; import useClientSearch from "../../hooks/useClientSearch.tsx"; import ManagerSelect from "../ManagerSelect.tsx"; +import { Manager } from "../../types/Manager.ts"; interface Props { targetServerId: string | null; @@ -36,6 +37,11 @@ export default function CreateSessionModal({ targetServerId, client }: Props) { refetchInterval: 1000, }); + const { data: managers } = useQuery({ + queryKey: ["managers"], + queryFn: () => api.get("managers").json(), + }); + const targetServer = targetServerId ? servers?.find((server) => server.id === targetServerId) || null : null; @@ -170,10 +176,6 @@ export default function CreateSessionModal({ targetServerId, client }: Props) { selectedServer, ]); - useEffect(() => { - console.log(selectedServer); - }, [selectedServer]); - const ref = useRef(null); return ( @@ -208,65 +210,6 @@ export default function CreateSessionModal({ targetServerId, client }: Props) { required isLoading={isLoading} /> - {isFullPhone && ( <> @@ -303,6 +246,7 @@ export default function CreateSessionModal({ targetServerId, client }: Props) {

Выберите параметры сеанса

+ {selectedServer && selectedServer?.appsToServers && selectedServer.appsToServers?.length > 0 && (