+
+
Проект
-

-
-
-
+

+
{selectedProject?.name}
-
- {isOpen && (
-
-
-
-
Смена проекта
-
+
+
+
+
+ {isOpen && (
+
+
-
-
-
-
-
-
-
{projects.map((project) => (
-
-
-
-
-
-
-
- )}
- >
+
+ )}
+
+
);
}
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 && (