refactor components/schedule
This commit is contained in:
parent
8bac33ef79
commit
4a4701c20e
@ -1,7 +1,7 @@
|
||||
/* eslint-disable canonical/id-match */
|
||||
'use client';
|
||||
|
||||
import { EditableTimeRangeForm } from './components/time-range';
|
||||
import { EditableTimeRangeForm } from '@/components/shared/time-range';
|
||||
import { useSlotCreate } from '@/hooks/api/slots';
|
||||
import { ScheduleStoreProvider, useScheduleStore } from '@/stores/schedule';
|
||||
import { withContext } from '@/utils/context';
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { SlotCard } from './components/slot-card';
|
||||
import { DaySlotAddForm } from './day-slot-add-form';
|
||||
import { SlotCard } from './slot-card';
|
||||
import { LoadingSpinner } from '@/components/common/spinner';
|
||||
import { DateContext } from '@/context/date';
|
||||
import { useSlotsQuery } from '@/hooks/api/slots';
|
||||
@ -1,5 +1,4 @@
|
||||
export * from './calendar';
|
||||
export * from './day-slot-add-form';
|
||||
export * from './day-slots-list';
|
||||
export * from './slot-buttons';
|
||||
export * from './slot-datetime';
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { SlotDate } from './components/slot-date';
|
||||
import { SlotTime } from './components/slot-time';
|
||||
import { type SlotComponentProps } from './types';
|
||||
import { type SlotComponentProps } from '../types';
|
||||
import { SlotDate } from './slot-date';
|
||||
import { SlotTime } from './slot-time';
|
||||
import { ScheduleStoreProvider } from '@/stores/schedule';
|
||||
import { withContext } from '@/utils/context';
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
'use client';
|
||||
|
||||
import { type SlotComponentProps } from '../types';
|
||||
import { EditableTimeRangeForm } from './time-range';
|
||||
import { ReadonlyTimeRange } from '@/components/shared/time-range';
|
||||
import { EditableTimeRangeForm, ReadonlyTimeRange } from '@/components/shared/time-range';
|
||||
import { useSlotMutation, useSlotQuery } from '@/hooks/api/slots';
|
||||
import { useZustandStore } from '@/stores/schedule';
|
||||
import { Button } from '@repo/ui/components/ui/button';
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { OrderCard } from '../shared/order-card';
|
||||
import { type SlotComponentProps } from './types';
|
||||
import { OrderCard } from '@/components/shared/order-card';
|
||||
import { useSlotQuery } from '@/hooks/api/slots';
|
||||
|
||||
export function SlotOrdersList({ documentId }: Readonly<SlotComponentProps>) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
'use client';
|
||||
|
||||
import { type OrderClient, type OrderComponentProps } from '../schedule/types';
|
||||
import { ReadonlyTimeRange } from './time-range';
|
||||
import { ReadonlyTimeRange } from './time-range/readonly';
|
||||
import { useOrderQuery } from '@/hooks/api/orders';
|
||||
import { Enum_Order_State } from '@repo/graphql/types';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/ui/avatar';
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
'use client';
|
||||
|
||||
import { useScheduleStore } from '@/stores/schedule';
|
||||
import { Input } from '@repo/ui/components/ui/input';
|
||||
import { type FormEvent, type PropsWithChildren } from 'react';
|
||||
2
apps/web/components/shared/time-range/index.ts
Normal file
2
apps/web/components/shared/time-range/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './editable';
|
||||
export * from './readonly';
|
||||
Loading…
x
Reference in New Issue
Block a user