commit de armazens
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-04 09:40:26 +02:00
parent e753f7a0a4
commit 63d20b10fc
245 changed files with 10847 additions and 230 deletions
+21 -6
View File
@@ -6,6 +6,9 @@ import { PageTitle, Panel } from '@/components/procurement';
import { Button } from '@/components/ui/button';
import { date, money, roleLabels } from '@/types/procurement';
import type { PurchaseOrder } from '@/types/purchase';
import OrderCancellationRequest, {
type OrderCancellationState,
} from '@/components/order-cancellation-request';
type History = {
id: number;
@@ -22,20 +25,32 @@ const actions: Record<string, string> = {
export default function OrderShow({
order,
history,
orderCancellation,
}: {
order: PurchaseOrder;
history: History[];
orderCancellation?: OrderCancellationState;
}) {
const snapshot = order.snapshot;
return (
<>
<Head title={order.number} />
<Link
href={`/ordens/${order.id}/recepcoes`}
className="mx-auto mt-4 w-full max-w-6xl px-5 text-sm font-medium text-teal-700 dark:text-teal-400"
>
Recepções, qualidade e quantidades pendentes
</Link>
{orderCancellation && (
<div className="mx-auto mt-4 w-full max-w-6xl px-5">
<OrderCancellationRequest
orderId={order.id}
state={orderCancellation}
/>
</div>
)}
{(!orderCancellation || orderCancellation.state === 'issued') && (
<Link
href={`/ordens/${order.id}/recepcoes`}
className="mx-auto mt-4 w-full max-w-6xl px-5 text-sm font-medium text-teal-700 dark:text-teal-400"
>
Recepções, qualidade e quantidades pendentes
</Link>
)}
<div className="mx-auto flex w-full max-w-6xl flex-col gap-7 p-5 lg:p-8">
<PageTitle
eyebrow={snapshot.company.name}