@@ -26,6 +26,13 @@ const actions: Record<string, string> = {
|
||||
'requisition.automatically_created':
|
||||
'Rascunho de reposição criado automaticamente',
|
||||
'requisition.updated': 'Rascunho actualizado',
|
||||
'requisition.allocations_prepared': 'Distribuição preparada',
|
||||
'budget.distribution_reserve': 'Reserva distribuída registada',
|
||||
'budget.distribution_award': 'Distribuição da adjudicação confirmada',
|
||||
'budget.distribution_commit': 'Compromisso distribuído registado',
|
||||
'budget.distribution_release': 'Reserva distribuída libertada',
|
||||
'budget.distribution_cancel': 'Compromisso distribuído cancelado',
|
||||
'budget.distribution_amended': 'Compromisso reafectado por Finanças',
|
||||
'requisition.submitted': 'Pedido submetido',
|
||||
'approval.approved': 'Etapa aprovada',
|
||||
'approval.rejected': 'Pedido rejeitado',
|
||||
@@ -44,10 +51,13 @@ export default function Show({
|
||||
automaticSource,
|
||||
approvalRouting,
|
||||
canRefreshRouting = false,
|
||||
canPrepareDistributions = false,
|
||||
}: {
|
||||
canPrepareDistributions?: boolean;
|
||||
requisition: Requisition;
|
||||
canRefreshRouting?: boolean;
|
||||
approvalRouting?: {
|
||||
label?: string | null;
|
||||
status: string;
|
||||
step_id: number | null;
|
||||
role: string | null;
|
||||
@@ -150,6 +160,13 @@ export default function Show({
|
||||
}
|
||||
/>
|
||||
<FormErrors errors={submission.errors} />
|
||||
{canPrepareDistributions && (
|
||||
<Button asChild variant="outline">
|
||||
<Link href={`/requisicoes/${r.id}/distribuicoes`}>
|
||||
Distribuir por centros de custo
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
{automaticSource && (
|
||||
<Panel title="Origem na reposição automática">
|
||||
<p>
|
||||
@@ -584,9 +601,11 @@ export default function Show({
|
||||
>
|
||||
<p className="text-sm">
|
||||
Etapa:{' '}
|
||||
{roleLabels[
|
||||
approvalRouting.role ?? ''
|
||||
] ?? approvalRouting.role}
|
||||
{approvalRouting.label ??
|
||||
roleLabels[
|
||||
approvalRouting.role ?? ''
|
||||
] ??
|
||||
approvalRouting.role}
|
||||
.
|
||||
</p>
|
||||
{canRefreshRouting && (
|
||||
@@ -702,7 +721,9 @@ export default function Show({
|
||||
</span>
|
||||
<div>
|
||||
<p className="text-sm font-medium">
|
||||
{roleLabels[s.role]}
|
||||
{s.routing?.name ??
|
||||
roleLabels[s.role] ??
|
||||
s.role}
|
||||
</p>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
{s.decision === 'pending'
|
||||
|
||||
Reference in New Issue
Block a user