@@ -8,9 +8,14 @@ import { Button } from '@/components/ui/button';
|
||||
import { date, money, roleLabels } from '@/types/procurement';
|
||||
import { ExchangeSummary } from '@/components/quotation-exchange-panel';
|
||||
import type { PurchaseOrder } from '@/types/purchase';
|
||||
import ImportTariffSummary from '@/components/import-tariff-summary';
|
||||
import OrderCancellationRequest, {
|
||||
type OrderCancellationState,
|
||||
} from '@/components/order-cancellation-request';
|
||||
import {
|
||||
OrderPartsSummary,
|
||||
type OrderPartFrame,
|
||||
} from '@/components/order-parts-summary';
|
||||
|
||||
type History = {
|
||||
id: number;
|
||||
@@ -29,11 +34,13 @@ export default function OrderShow({
|
||||
history,
|
||||
orderCancellation,
|
||||
snapshotComplete = true,
|
||||
orderPartsSources = [],
|
||||
}: {
|
||||
order: PurchaseOrder;
|
||||
history: History[];
|
||||
orderCancellation?: OrderCancellationState;
|
||||
snapshotComplete?: boolean;
|
||||
orderPartsSources?: OrderPartFrame[];
|
||||
}) {
|
||||
const snapshot = order.snapshot;
|
||||
if (!snapshotComplete) {
|
||||
@@ -145,11 +152,15 @@ export default function OrderShow({
|
||||
Documento de desenvolvimento. Não autoriza compras
|
||||
reais.
|
||||
</strong>{' '}
|
||||
Orçamento não verificado. Os dados apresentados foram
|
||||
congelados na emissão.
|
||||
{snapshot.budget_checked === true
|
||||
? 'Controlo orçamental confirmado para as parcelas emitidas. '
|
||||
: 'Orçamento não verificado. '}{' '}
|
||||
Os dados apresentados foram congelados na emissão.
|
||||
{snapshot.approval_rules.rules_provisional &&
|
||||
' Regras de aprovação provisórias.'}
|
||||
</div>
|
||||
<OrderPartsSummary sources={orderPartsSources} />
|
||||
<ImportTariffSummary records={snapshot.import_tariffs} />
|
||||
<div className="grid gap-6 md:grid-cols-2">
|
||||
{snapshot.investment_rules && (
|
||||
<Panel title="Regra de investimento congelada">
|
||||
@@ -315,7 +326,13 @@ export default function OrderShow({
|
||||
<AgreementOrderLimitSummary
|
||||
bindings={snapshot.agreement_bindings}
|
||||
/>
|
||||
<Panel title="Fundamento e matriz congelada">
|
||||
<Panel
|
||||
title={
|
||||
orderPartsSources.length > 1
|
||||
? 'Fundamento e matriz da referência principal'
|
||||
: 'Fundamento e matriz congelada'
|
||||
}
|
||||
>
|
||||
{snapshot.comparison_policy && (
|
||||
<ComparisonPolicySummary
|
||||
policy={snapshot.comparison_policy}
|
||||
@@ -359,7 +376,13 @@ export default function OrderShow({
|
||||
))}
|
||||
</div>
|
||||
</Panel>
|
||||
<Panel title="Aprovações do valor final">
|
||||
<Panel
|
||||
title={
|
||||
orderPartsSources.length > 1
|
||||
? 'Aprovações da referência principal'
|
||||
: 'Aprovações do valor final'
|
||||
}
|
||||
>
|
||||
<ol className="space-y-3">
|
||||
{snapshot.final_approvals.map((step) => (
|
||||
<li key={step.id} className="text-sm">
|
||||
@@ -382,7 +405,13 @@ export default function OrderShow({
|
||||
separadamente.
|
||||
</p>
|
||||
</Panel>
|
||||
<Panel title="Histórico do processo">
|
||||
<Panel
|
||||
title={
|
||||
orderPartsSources.length > 1
|
||||
? 'Histórico das origens'
|
||||
: 'Histórico do processo'
|
||||
}
|
||||
>
|
||||
<ol className="space-y-3">
|
||||
{history.map((event) => (
|
||||
<li key={event.id} className="text-sm">
|
||||
|
||||
Reference in New Issue
Block a user