@@ -1,4 +1,8 @@
|
||||
import { Head, Link } from '@inertiajs/react';
|
||||
import {
|
||||
OrderDocumentLinks,
|
||||
type RelatedProcess,
|
||||
} from '@/components/order-document-links';
|
||||
import { AgreementOrderLimitSummary } from '@/components/agreement-order-bindings';
|
||||
import { Printer } from 'lucide-react';
|
||||
import { ComparisonPolicySummary } from '@/components/comparison-policy-summary';
|
||||
@@ -40,6 +44,8 @@ export default function OrderShow({
|
||||
snapshotComplete = true,
|
||||
orderPartsSources = [],
|
||||
canAmendOrderParts = false,
|
||||
financialDocumentsHref = null,
|
||||
relatedProcesses = [],
|
||||
}: {
|
||||
order: PurchaseOrder;
|
||||
history: History[];
|
||||
@@ -47,6 +53,8 @@ export default function OrderShow({
|
||||
snapshotComplete?: boolean;
|
||||
orderPartsSources?: OrderPartFrame[];
|
||||
canAmendOrderParts?: boolean;
|
||||
financialDocumentsHref?: string | null;
|
||||
relatedProcesses?: RelatedProcess[];
|
||||
}) {
|
||||
const snapshot = order.snapshot;
|
||||
if (!snapshotComplete) {
|
||||
@@ -59,6 +67,16 @@ export default function OrderShow({
|
||||
title={order.number}
|
||||
description="Consulta dos dados preservados na emissão."
|
||||
/>
|
||||
{orderCancellation && (
|
||||
<OrderCancellationRequest
|
||||
orderId={order.id}
|
||||
state={orderCancellation}
|
||||
/>
|
||||
)}
|
||||
<OrderDocumentLinks
|
||||
financialDocumentsHref={financialDocumentsHref}
|
||||
relatedProcesses={relatedProcesses}
|
||||
/>
|
||||
<Panel title="Documento original incompleto">
|
||||
<p>
|
||||
Este documento não conserva todos os elementos da
|
||||
@@ -127,14 +145,6 @@ export default function OrderShow({
|
||||
/>
|
||||
</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}
|
||||
@@ -159,12 +169,22 @@ export default function OrderShow({
|
||||
reais.
|
||||
</strong>{' '}
|
||||
{snapshot.budget_checked === true
|
||||
? 'Controlo orçamental confirmado para as parcelas emitidas. '
|
||||
: 'Orçamento não verificado. '}{' '}
|
||||
? 'Controlo orçamental registado na emissão. '
|
||||
: 'Este documento não preserva confirmação do controlo orçamental. '}{' '}
|
||||
Os dados apresentados foram congelados na emissão.
|
||||
{snapshot.approval_rules.rules_provisional &&
|
||||
' Regras de aprovação provisórias.'}
|
||||
</div>
|
||||
<OrderDocumentLinks
|
||||
receiptsHref={
|
||||
!orderCancellation ||
|
||||
orderCancellation.state === 'issued'
|
||||
? `/ordens/${order.id}/recepcoes`
|
||||
: null
|
||||
}
|
||||
financialDocumentsHref={financialDocumentsHref}
|
||||
relatedProcesses={relatedProcesses}
|
||||
/>
|
||||
<OrderPartsSummary sources={orderPartsSources} />
|
||||
{canAmendOrderParts && (
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user