diff --git a/apps/web/app/(main)/orders/add/page.tsx b/apps/web/app/(main)/orders/add/page.tsx index bf5b793..a917e2d 100644 --- a/apps/web/app/(main)/orders/add/page.tsx +++ b/apps/web/app/(main)/orders/add/page.tsx @@ -1,3 +1,14 @@ -export default function AddOrdersPage() { - return 'Add Orders'; +import { Container } from '@/components/layout'; +import { PageHeader } from '@/components/navigation'; +import { OrderForm } from '@/components/orders'; + +export default async function AddOrdersPage() { + return ( + <> + + + + + + ); } diff --git a/apps/web/components/orders/components/contacts-scroller.tsx b/apps/web/components/orders/components/contacts-scroller.tsx new file mode 100644 index 0000000..cd21a4a --- /dev/null +++ b/apps/web/components/orders/components/contacts-scroller.tsx @@ -0,0 +1,64 @@ +'use client'; +import { LoadingSpinner } from '../../common/spinner'; +import { useCustomerContacts } from '@/hooks/contacts'; +// eslint-disable-next-line import/extensions +import AvatarPlaceholder from '@/public/avatar/avatar_placeholder.png'; +import { Label } from '@repo/ui/components/ui/label'; +import { cn } from '@repo/ui/lib/utils'; +import Image from 'next/image'; +import { useState } from 'react'; + +export function ContactsScroller() { + const [selected, setSelected] = useState(null); + const { contacts, isLoading } = useCustomerContacts(); + + if (isLoading) return ; + + return ( +
+
+
+ {contacts.map((contact) => { + if (!contact) return null; + + return ( + + ); + })} +
+
+
+ ); +} diff --git a/apps/web/components/orders/components/index.ts b/apps/web/components/orders/components/index.ts new file mode 100644 index 0000000..50c9fb1 --- /dev/null +++ b/apps/web/components/orders/components/index.ts @@ -0,0 +1 @@ +export * from './contacts-scroller'; diff --git a/apps/web/components/orders/index.ts b/apps/web/components/orders/index.ts new file mode 100644 index 0000000..180a379 --- /dev/null +++ b/apps/web/components/orders/index.ts @@ -0,0 +1 @@ +export * from './order-form'; diff --git a/apps/web/components/orders/order-form.tsx b/apps/web/components/orders/order-form.tsx new file mode 100644 index 0000000..95656cb --- /dev/null +++ b/apps/web/components/orders/order-form.tsx @@ -0,0 +1,9 @@ +import { ContactsScroller } from './components'; + +export function OrderForm() { + return ( +
+ +
+ ); +} diff --git a/apps/web/public/avatar/avatar_placeholder.png b/apps/web/public/avatar/avatar_placeholder.png new file mode 100644 index 0000000..0989209 Binary files /dev/null and b/apps/web/public/avatar/avatar_placeholder.png differ