feat: add ManagerSelect component and integrate it into CreateSessionModal, replacing the deprecated Selector component

This commit is contained in:
2025-06-27 13:38:32 +05:00
parent c82f1dfbb5
commit fc7d55b10f
5 changed files with 192 additions and 3 deletions
@@ -13,6 +13,7 @@ import ProjectSelector from "../ProjectSelector.tsx";
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";
interface Props {
targetServerId: string | null;
@@ -207,6 +208,65 @@ export default function CreateSessionModal({ targetServerId, client }: Props) {
required
isLoading={isLoading}
/>
<ManagerSelect
placeholder="Менеджер сеанса"
data={[
{
id: "1",
email: "2@2",
fullname: "СЕМЁН Лобанов",
companyId: "1",
},
{
id: "2",
email: "2@2",
fullname: "ВОВА Лобанов",
companyId: "1",
},
{
id: "3",
email: "2@2",
fullname: "САНЯ Лобанов",
companyId: "1",
},
{
id: "4",
email: "2@2",
fullname: "АНТОН Лобанов",
companyId: "1",
},
{
id: "5",
email: "2@2",
fullname: "БОЛЬШОЙ АНТОН",
companyId: "1",
},
{
id: "6",
email: "2@2",
fullname: "Константин Лобанов",
companyId: "1",
},
{
id: "7",
email: "2@2",
fullname: "Константин Лобанов",
companyId: "1",
},
{
id: "8",
email: "2@2",
fullname: "Константин Лобанов",
companyId: "1",
},
{
id: "9",
email: "2@2",
fullname: "Константин Лобанов",
companyId: "1",
},
]}
/>
<AnimatePresence>
{isFullPhone && (
<>
@@ -258,6 +318,7 @@ export default function CreateSessionModal({ targetServerId, client }: Props) {
/>
)}
</div>
{isSessionExists && (
<div className="absolute inset-0 top-[11.806vw] bg-[#FFFFFF] flex flex-col gap-[1.111vw] items-center justify-center h-[31.458vw]">
<img