'use client'; import { useCustomerQuery } from '@/hooks/api/customers'; import { usePushWithData } from '@/hooks/url'; import { Button } from '@repo/ui/components/ui/button'; import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from '@repo/ui/components/ui/drawer'; type QuickAppointmentProps = { readonly telegramId: number; }; export function QuickAppointment({ telegramId }: Readonly) { const push = usePushWithData(); const { data: { customer: profile } = {} } = useCustomerQuery({ telegramId }); const { data: { customer: currentUser } = {} } = useCustomerQuery(); const handleBookAsClient = () => { push('/orders/add', { client: currentUser, slot: { master: profile }, }); }; const handleBookAsMaster = () => { push('/orders/add', { client: profile, slot: { master: currentUser }, }); }; if (!telegramId) return null; return (
Быстрая запись Выберите действие
); }