move OrderCard types close to component

This commit is contained in:
vchikalkin 2025-06-24 10:52:25 +03:00
parent efebc9d8ef
commit 25f6e26901
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,3 @@
import type * as GQL from '@repo/graphql/types';
export type OrderClient = NonNullable<GQL.GetOrderQuery['order']>['client'];
export type OrderComponentProps = GQL.OrderFieldsFragment;
export type SlotComponentProps = GQL.SlotFieldsFragment;

View File

@ -1,14 +1,17 @@
/* eslint-disable canonical/id-match */
'use client';
import { type OrderClient, type OrderComponentProps } from '../schedule/types';
import { ReadonlyTimeRange } from './time-range/readonly';
import { Enum_Order_State } from '@repo/graphql/types';
import type * as GQL from '@repo/graphql/types';
import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/ui/avatar';
import { Badge } from '@repo/ui/components/ui/badge';
import { cn } from '@repo/ui/lib/utils';
import Link from 'next/link';
type OrderClient = NonNullable<OrderComponentProps>['client'];
type OrderComponentProps = GQL.OrderFieldsFragment;
export function OrderCard({ documentId, ...order }: Readonly<OrderComponentProps>) {
const isCompleted = order?.state === Enum_Order_State.Completed;
const isCancelled = order?.state === Enum_Order_State.Cancelled;