import { Link } from '@inertiajs/react'; import { ArrowUpRight, ClipboardList } from 'lucide-react'; import type { ReactNode } from 'react'; import { Badge } from '@/components/ui/badge'; import { date, money, statusLabels } from '@/types/procurement'; import type { Requisition } from '@/types/procurement'; export const controlClass = 'h-10 w-full rounded-lg border border-input bg-background px-3 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring'; export function PageTitle({ eyebrow, title, description, action, }: { eyebrow: string; title: string; description: string; action?: ReactNode; }) { return (

{eyebrow}

{title}

{description}

{action}
); } export function Panel({ id, title, description, children, }: { id?: string; title: string; description?: string; children: ReactNode; }) { return (

{title}

{description && (

{description}

)}
{children}
); } export function Status({ value }: { value: string }) { return ( {statusLabels[value] ?? value} ); } export function RequisitionTable({ rows }: { rows: Requisition[] }) { if (!rows.length) return (

Sem requisições para apresentar

Os pedidos de compra aparecem aqui depois de criados.

); return (
{rows.map((r) => ( ))}
Requisição Departamento Data Estado Total com IVA Abrir
{r.number}
{r.requester?.name}
{r.department?.name ?? '—'} {date(r.created_at)} {money(Number(r.total_minor))}
); } export function FormErrors({ errors }: { errors: Record }) { if (!Object.keys(errors).length) return null; return (

Verifique os dados:

); }