From 4f71ba7d2055495615f58fd3429d35b97ccd0748 Mon Sep 17 00:00:00 2001
From: Claude
Date: Fri, 4 Dec 2026 15:10:13 +0200
Subject: [PATCH] =?UTF-8?q?Mapa=20de=20erros=204.1=20e=204.5:=20diferen?=
=?UTF-8?q?=C3=A7as=20em=20tabela=20e=20pr=C3=B3ximos=20passos=20agrupados?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Diferenças entre localizações em tabela por ano, população inteira com
separador de milhares e a advertência uma só vez (legenda da tabela).
- Componente NextActions: opções seguintes agrupadas numa lista com título,
separadas do texto; aplicado às alternativas de exploração da carteira.
Co-Authored-By: Claude Opus 5.5
Claude-Session: https://claude.ai/code/session_01MzJmxFy3izprXr5dSq91jm
---
.../js/components/demographic-evidence.tsx | 80 +++++++-----
resources/js/components/next-actions.tsx | 39 ++++++
resources/js/pages/portfolio/index.tsx | 41 +++---
tests/frontend/demographic-reading.test.mjs | 2 +-
.../portfolio-embedded-opportunities.test.mjs | 19 +++
.../frontend/presentation-error-map.test.mjs | 119 ++++++++++++++++++
6 files changed, 251 insertions(+), 49 deletions(-)
create mode 100644 resources/js/components/next-actions.tsx
create mode 100644 tests/frontend/presentation-error-map.test.mjs
diff --git a/resources/js/components/demographic-evidence.tsx b/resources/js/components/demographic-evidence.tsx
index 3082722b..a75d1cc2 100644
--- a/resources/js/components/demographic-evidence.tsx
+++ b/resources/js/components/demographic-evidence.tsx
@@ -280,17 +280,35 @@ export default function DemographicEvidence({
Diferenças entre localizações
- {Array.from(
- new Set(evidence.comparisons.map((c) => c.year)),
- )
- .sort((a, b) => a - b)
- .map((year) => (
-
-
)}
{evidence.differences.some(
diff --git a/resources/js/components/next-actions.tsx b/resources/js/components/next-actions.tsx
new file mode 100644
index 00000000..e4cd7a84
--- /dev/null
+++ b/resources/js/components/next-actions.tsx
@@ -0,0 +1,39 @@
+import { Link } from '@inertiajs/react';
+
+export type NextAction = { label: string; href: string; description?: string };
+
+/**
+ * Next steps grouped in one place, one per line, apart from the surrounding text
+ * (mapa de erros 4.5: options mixed into a line of text are hard to find).
+ */
+export default function NextActions({
+ title = 'Próximos passos',
+ actions,
+}: {
+ title?: string;
+ actions: NextAction[];
+}) {
+ if (!actions.length) return null;
+ return (
+
+ );
+}
diff --git a/resources/js/pages/portfolio/index.tsx b/resources/js/pages/portfolio/index.tsx
index daabe751..fb282201 100644
--- a/resources/js/pages/portfolio/index.tsx
+++ b/resources/js/pages/portfolio/index.tsx
@@ -1,4 +1,5 @@
import { Link, useForm, usePage } from '@inertiajs/react';
+import NextActions from '@/components/next-actions';
import { publicPortfolioText } from '@/lib/public-presentation';
import { searchTerritoryHref } from '@/lib/search-territory';
import { catalogueDetailHref } from '@/lib/catalogue-context';
@@ -221,26 +222,26 @@ export default function Index({
não representa concursos abertos nem confirma
disponibilidade de infra-estruturas ou incentivos.
-
+
)}
diff --git a/tests/frontend/demographic-reading.test.mjs b/tests/frontend/demographic-reading.test.mjs
index ed30ea20..b720c8c2 100644
--- a/tests/frontend/demographic-reading.test.mjs
+++ b/tests/frontend/demographic-reading.test.mjs
@@ -276,7 +276,7 @@ test('annual comparisons format all populations and do not repeat technical expl
assert.match(html, /157\s983/);
assert.match(html, /46\s657/);
assert.match(html, /111\s326/);
- assert.match(html, /