This commit is contained in:
2026-11-02 20:27:11 +02:00
parent b44378b899
commit badaada043
300 changed files with 17458 additions and 1056 deletions
@@ -52,6 +52,7 @@ type Attempt = {
reviews: Review[];
};
type Props = {
focusAttemptId?: number | null;
requisition: { id: number; number: string };
policy: { id: number; revision: number; enabled: boolean } | null;
adoption: Adoption | null;
@@ -310,6 +311,7 @@ export default function Recommendation(props: Props) {
canPropose,
closed,
hasAdmission,
focusAttemptId = null,
} = props;
const base = `/requisicoes/${requisition.id}`;
return (
@@ -346,7 +348,7 @@ export default function Recommendation(props: Props) {
alterada exige o circuito de revisão autorizado.
</p>
)}
{canAdopt && (
{focusAttemptId === null && canAdopt && (
<Adopt
key={`${policy?.id}-${adoption?.id}`}
requisition={requisition}
@@ -399,7 +401,7 @@ export default function Recommendation(props: Props) {
</p>
</Panel>
)}
{canPropose && (
{focusAttemptId === null && canPropose && (
<Panel title="Proposta manual por Compras">
<Propose
key={`${selected?.id}-${previousId}-${basis.hash}`}
@@ -410,12 +412,21 @@ export default function Recommendation(props: Props) {
</Panel>
)}
<Panel title="Tentativas e conferências">
{focusAttemptId !== null && (
<Link
className="mb-4 inline-block underline"
href={`${base}/recomendacao${selected ? `?version=${selected.id}` : ''}`}
>
Ver todas as tentativas desta versão
</Link>
)}
<div className="space-y-5">
{history.data.length === 0 && (
<p>Sem tentativas nesta adopção.</p>
)}
{history.data.map((attempt) => (
<article
id={`recommendation-${attempt.id}`}
className="rounded-lg border p-4"
key={attempt.id}
>