Compare commits

...
90 changed files with 4902 additions and 454 deletions
+19 -19
View File
@@ -231,16 +231,25 @@ class InvestmentCatalogue
} elseif (in_array($relation, ['clusters', 'corridors'], true)) { } elseif (in_array($relation, ['clusters', 'corridors'], true)) {
$query->whereIn('id', $this->publicStructureIds($relation, $foreign)); $query->whereIn('id', $this->publicStructureIds($relation, $foreign));
} else { } else {
$query->whereIn('id', InvestmentPortfolioController::visible()->whereNotNull($foreign)->pluck($foreign)); $query->whereIn('id', app(OpportunityClassification::class)->targets('project')->select('id'));
} }
} }
if (! $management && $path !== [] && $relation !== 'locations') { if (! $management && $path !== [] && $relation !== 'locations') {
$dossiers = InvestmentPortfolioController::visible(); $dossiers = InvestmentPortfolioController::visible();
app(InvestmentGeography::class)->constrainDossiersToTerritories($dossiers, app(InvestmentGeography::class)->constrainDossiersToTerritories($dossiers,
app(InvestmentGeography::class)->descendants($path[array_key_last($path)]->id)); app(InvestmentGeography::class)->descendants($path[array_key_last($path)]->id));
$query->whereIn('id', $dossiers->whereNotNull($foreign)->select($foreign)); $territories = app(InvestmentGeography::class)->descendants($path[array_key_last($path)]->id);
$query->where(fn ($area) => $area->whereIn('primary_territory_id', $territories)
->orWhereIn('id', $dossiers->whereNotNull($foreign)->select($foreign)));
} }
$result[$relation] = $query->orderBy('name')->get(['id', 'name']); $result[$relation] = $query->orderBy('name')->get(['id', 'name']);
if (! $management && $relation !== 'locations') {
$dossiers = InvestmentPortfolioController::visible()->whereIn($foreign, $result[$relation]->pluck('id'))
->orderBy('id')->get(['id', $foreign])->unique($foreign)->keyBy($foreign);
$result[$relation]->each(function ($record) use ($dossiers): void {
$record->url = isset($dossiers[$record->id]) ? '/carteira/'.$dossiers[$record->id]->id : null;
});
}
} }
$zones = app(InvestmentZones::class)->visible(); $zones = app(InvestmentZones::class)->visible();
@@ -250,24 +259,15 @@ class InvestmentCatalogue
['province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'geo_location_id'])); ['province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'geo_location_id']));
} }
$result['zones'] = $zones->orderBy('name')->get(['id', 'name', 'category']); $result['zones'] = $zones->orderBy('name')->get(['id', 'name', 'category']);
if (! $management && ($path !== [] || ! empty($territoryFilters['sector']))) { if (! $management && $path !== []) {
$scope = \Illuminate\Support\Arr::only($territoryFilters, ['sector','province_id','district_id','admin_post_id','locality_id','include_national']); // A chain's documented scope comes from its public cluster, never
$available = ['chain' => [], 'activity' => []]; // from the opportunities surviving the current search.
$this->query($scope)->reorder()->chunkById(200, function ($records) use (&$available) { $ids = app(OpportunityClassification::class)->targets('chain')
foreach ($records as $record) { ->whereIn('cluster_id', $result['clusters']->pluck('id'))->pluck('id');
foreach (app(OpportunityClassification::class)->publicRows($record) as $row) { $result['classification']['targets']['chain'] = collect($result['classification']['targets']['chain'])->whereIn('id', $ids)->values();
if (isset($available[$row['target_type']])) $available[$row['target_type']][] = $row['target_id'];
}
foreach (['subsector_id','economic_activity_id'] as $key) {
$id = $record->workflow_context['publication']['taxonomy'][$key] ?? null;
if ($id) $available['activity'][] = $id;
}
}
}, 'opportunities.id', 'id');
foreach ($available as $kind => $ids) {
$result['classification']['targets'][$kind] = collect($result['classification']['targets'][$kind])->whereIn('id', $ids)->values();
}
} }
// Activities are a public classification catalogue, not evidence of
// investment availability in a territory or sector.
return $result; return $result;
} }
+1 -1
View File
@@ -23,7 +23,7 @@ return [
'opportunity_other_qa_subtypes' => [], 'opportunity_other_qa_subtypes' => [],
'operator_name' => env('PORTAL_OPERATOR_NAME'), 'operator_name' => env('PORTAL_OPERATOR_NAME'),
// Tempo, 19/10/2026: institutional contact; commercial department remains separate. // Tempo, 19/10/2026: institutional contact; commercial department remains separate.
'institutional_contact_email' => env('PORTAL_INSTITUTIONAL_CONTACT_EMAIL', 'info@tempo.co.mz'), 'institutional_contact_email' => env('PORTAL_INSTITUTIONAL_CONTACT_EMAIL', 'comercial@tempo.co.mz'),
'support' => [ 'support' => [
'email' => env('PORTAL_SUPPORT_EMAIL'), 'email' => env('PORTAL_SUPPORT_EMAIL'),
'phone' => env('PORTAL_SUPPORT_PHONE'), 'phone' => env('PORTAL_SUPPORT_PHONE'),
@@ -0,0 +1,710 @@
{
"date": "2026-10-23",
"decision": "Pedido expresso da Tempo: aplicar o anexo de identidade visual aos cinco cartões de Encontre o contexto do seu investimento.",
"instructionSource": {
"path": "C:\\Users\\jorge\\.codex\\attachments\\637b878f-1f58-490d-bd07-d5cd10ae2377\\Pasted text.txt",
"sha256": "fcc24dcce4b5df3f10e29add48052808d48ddcf674d052287854e11910e01d69"
},
"source": {
"type": "AI-generated photorealistic illustrative images",
"tool": "image_gen, built-in mode",
"skill": "C:/Users/jorge/.codex/skills/.system/imagegen/SKILL.md",
"externalPhotographsUsed": false,
"namedRealLocationsDepicted": false,
"note": "Cenas ilustrativas plausíveis, sem atribuição a instalações, pessoas, instituições ou projectos reais."
},
"analysisAndPlan": "docs/investmoz/public-portal-sections.md#fotografias-nos-cartões-de-contexto-do-investimento--23102026",
"filesChanged": [
"resources/js/pages/PortalInvestidor.tsx",
"resources/js/components/investment-context-cards.tsx",
"tools/portal-context-cards-qa.mjs",
"docs/investmoz/public-portal-sections.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"docs/investmoz/public-portal-context-images.json"
],
"images": [
{
"key": "clusters-agroindustria",
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a modest, well maintained agro-processing packing facility linking commercial agriculture to local industry. Wide three-quarter view into an airy open-sided processing shed with pale walls and a few orderly wooden or reusable produce crates, stainless processing/sorting benches and an unobtrusive commercial agricultural field visible beyond. Two Black southern African workers in clean practical workwear sorting harvested vegetables naturally, faces not prominent. Show production and transformation together in ONE genuine-looking continuous scene, no montage. Clear simple geometry, warm-neutral sunlight, subtle vegetation.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-f72e66b0-d788-4476-8b20-c39b22d5d6dc.png",
"original": "outputs/investment-context-20261023/originals/clusters-agroindustria.png",
"originalSha256": "75e04a694081ab757831fc9b37323949d09806e622c83d07588fc47c423c9033",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-context/clusters-agroindustria.webp",
"width": 960,
"height": 540,
"bytes": 116796,
"sha256": "12494b31ab551cffb79f81c7d1519c0c4a2d4236e7f129bec1ce32251b39d847"
},
{
"file": "public/images/investment-context/clusters-agroindustria-480.webp",
"width": 480,
"height": 270,
"bytes": 42060,
"sha256": "76e3152c99ed188f748542dcf0464787307dbdc1c6299e7264dfd1bd86ad75e3"
},
{
"file": "public/images/investment-context/clusters-agroindustria-fallback.webp",
"width": 240,
"height": 135,
"bytes": 9596,
"sha256": "9f668da50f7d64955b31940d239b420ac18dbb76a8120c8bedab3f2c04710288"
}
]
},
{
"key": "corredores-logisticos",
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a commercial freight terminal serving a southern African logistics corridor. Elevated medium-wide viewpoint showing an orderly short line of unbranded freight containers, one realistic container-handling crane and a freight truck on a paved lane, with a calm strip of water and low coastal industrial vegetation in the distance. Infrastructure of credible modest contemporary scale, generic and unidentifiable; do not reproduce or name Maputo, Beira, Nacala or any real port. Spatially coherent containers, road and handling equipment; clean clear subject with no excessive machinery.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-0363da23-f9cb-413b-bb64-024539085c4b.png",
"original": "outputs/investment-context-20261023/originals/corredores-logisticos-v2.png",
"originalSha256": "2151d1a59265c6f7151d18af6ef6ad78f9fc6e0cd58ac9cc5c64b50a25c5058e",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-context/corredores-logisticos-v2.webp",
"width": 960,
"height": 540,
"bytes": 85184,
"sha256": "1939c26df297588b6c3e5ea08b700d4cda5d1183cf3e5faed06a1ca060d2475e"
},
{
"file": "public/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 480,
"height": 270,
"bytes": 26222,
"sha256": "06dc0e7126cb2c13eb3f9a98f6ee58f5d64f9d07c28620975f744f263744fe15"
},
{
"file": "public/images/investment-context/corredores-logisticos-v2-fallback.webp",
"width": 240,
"height": 135,
"bytes": 5334,
"sha256": "f9fd6e6c3a2d4654df1a8fdb287e122f1889b5d318c104c4816ee393c793e242"
}
],
"selectedSource": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-c2cff7da-d602-4191-9aca-380918a09619.png",
"editPrompt": "Edit the provided photograph: REMOVE THE ENTIRE FOREGROUND TRUCK, including cab, wheels, long trailer and the red freight container on that trailer. The big truck at lower left/centre must be completely gone. Replace the removed truck's area with a continuous empty realistic paved road surface matching the surrounding pavement and road markings. Leave the stacked stationary freight containers along the quay, the water, the large port crane, the lifted container and workers. All remaining equipment and containers should have plain surfaces without readable lettering, logos, numbers or brands. No new truck, vehicle, symbol, text or overlay. Keep a single clean editorial photograph, natural lighting and horizontal 16:9 framing. Generic commercial port scene, not a named real facility."
},
{
"key": "projectos-ancora",
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a small team of two Black southern African engineering professionals, one woman and one man, in realistic hard hats and restrained protective workwear, seen candidly from a three-quarter rear angle reviewing an unmarked folded technical plan at a utility-scale solar installation. Low rows of realistic blue solar panels and a simple low service building recede into a dry green southern African landscape. No readable drawing or numbers on the plan. Focus on credible engineering and investment project scale; clean composition, quiet professional atmosphere, no landmark or company identifiers.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-19fcd882-542b-43c9-81e7-593fd75083f6.png",
"original": "outputs/investment-context-20261023/originals/projectos-ancora.png",
"originalSha256": "f23cf6e64307a280f3aa58741454a23480ac28fcae01a0810adf134b783a3a74",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-context/projectos-ancora.webp",
"width": 960,
"height": 540,
"bytes": 77114,
"sha256": "de0b59774246fee982761de59618b3e7707c3fe30f2b1bcbb6017d4dce53c4dc"
},
{
"file": "public/images/investment-context/projectos-ancora-480.webp",
"width": 480,
"height": 270,
"bytes": 29484,
"sha256": "268e405112ed341fce3c9792c3caa47053984100cd4a204453e31bbe5db6e890"
},
{
"file": "public/images/investment-context/projectos-ancora-fallback.webp",
"width": 240,
"height": 135,
"bytes": 6750,
"sha256": "db7e4b4382e09eb6b4f9f2a4603ccac4b4eacc53ba0f6776429e33dbf5131954"
}
]
},
{
"key": "educacao-formacao",
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a candid technical training classroom with three Black southern African young adult students of different genders and one instructor working together at a practical electronics and computing workbench. Bright modest well maintained vocational classroom, natural window light, simple laboratory equipment and unbranded closed or angled laptops whose screens have no visible interface or text. Focus on two students engaged in a realistic small hands-on electronics exercise with normal anatomy and correct equipment proportions. Dignified contemporary clothing, natural concentration, professional skills and human capital investment, no posed smiles or stereotypes.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-d21314d7-c726-41ad-862c-3c8b64df6b53.png",
"original": "outputs/investment-context-20261023/originals/educacao-formacao.png",
"originalSha256": "e59ec599e8c64ab84195d0cb37871d3102df178a13275806ca3b7f98e6bfa895",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-context/educacao-formacao.webp",
"width": 960,
"height": 540,
"bytes": 68224,
"sha256": "e3e5dbd292cac555a45bcbd94a0fa6b60e6b710debc0c827c68603f40bfb8a28"
},
{
"file": "public/images/investment-context/educacao-formacao-480.webp",
"width": 480,
"height": 270,
"bytes": 27384,
"sha256": "d3b743fbba7a8cb40e45999ee8c345cbfc0332cf85f5c5c2d6a5cf1240a395e4"
},
{
"file": "public/images/investment-context/educacao-formacao-fallback.webp",
"width": 240,
"height": 135,
"bytes": 7156,
"sha256": "0b2a12898043c57cf4354b54ebcba8adec8d41b3886bc574584ccc12af7b1e4c"
}
]
},
{
"key": "documentos-formularios",
"prompt": "Use case: photorealistic-natural. Asset type: an individual navigation card photograph for a professional investment portal. Generate ONE clean, realistic editorial photograph in horizontal 16:9 composition. Natural daylight, realistic restrained colours, excellent photographic detail, balanced uncluttered framing, one clear subject readable at a small thumbnail size. Contemporary setting plausible in Mozambique in southern Africa. This is a generic illustrative scene, NOT a depiction or claim about any named real facility, project, landmark or institution. No text, lettering, titles, captions, logos, brands, watermarks, flags, official emblems, maps, diagrams, graphical overlays, UI elements, collages, artificial colour filters, futuristic architecture or advertising poster treatment. Realistic people, hands, equipment and perspective; dignified candid activity instead of posed stock photography. Subject: a close-medium editorial photograph of a tidy modern administrative office desk where a Black southern African professional in a plain light blue shirt is naturally reviewing organised business documentation. Frame hands, desk and partial torso, no prominent portrait. Neat neutral folders, a few sheets with only faint out-of-focus non-readable printing, a pen and an unbranded laptop angled away with no visible UI. Soft window light, white and pale neutral surfaces with subtle blue accents. Absolutely no readable personal data, invented official seals or highlighted fake text; realistic fingers and documents, calm minimal composition.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-f1c8e22e-6885-4578-ac7d-02692c5cc071.png",
"original": "outputs/investment-context-20261023/originals/documentos-formularios.png",
"originalSha256": "cfbd38a9cc9b9acf35f38220f5bd9c1ab1feafe411bc1d4bbdb3658de557e052",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-context/documentos-formularios.webp",
"width": 960,
"height": 540,
"bytes": 43002,
"sha256": "70ddea3256e6a8d981b1fae5ee7b4de6c910d757137b79a59306c268c278402f"
},
{
"file": "public/images/investment-context/documentos-formularios-480.webp",
"width": 480,
"height": 270,
"bytes": 17996,
"sha256": "436865c948acbb7b6e9e482bef8f5bd626c6960f2f155608e40dfcd0e76b84cb"
},
{
"file": "public/images/investment-context/documentos-formularios-fallback.webp",
"width": 240,
"height": 135,
"bytes": 4958,
"sha256": "fad6a6ab825a82ec2541d2e0c6de9d85486e4bbca159b912f87bec9cc0aeeba5"
}
]
}
],
"primaryImagesBytesTotal": 390320,
"responsive480ImagesBytesTotal": 143146,
"implementation": {
"gridColumns": [
1,
2,
4
],
"aspectRatio": "16:9",
"responsiveImages": true,
"lazyLoading": true,
"altLanguage": "pt",
"fallback": "Derivado pequeno da própria imagem; se também falhar, estado acessível Imagem indisponível, com dimensão reservada e link mantido.",
"globalCSSChanged": false,
"businessLogicChanged": false,
"databaseChanged": false,
"heroChanged": false
},
"visualReview": "Cinco composições individuais distintas, cores naturais e luz editorial; sem títulos/colagens ou mapas. A composição de Corredores foi revista para remover o camião com marca. Capturas em computador e telemóvel inspeccionadas.",
"verification": {
"browser": {
"results": [
{
"width": 320,
"dpr": 1,
"columns": 1,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 320,
"height": 180
}
],
"status": "passed"
},
{
"width": 390,
"dpr": 2,
"columns": 1,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
"width": 389,
"height": 219
}
],
"status": "passed"
},
{
"width": 768,
"dpr": 1,
"columns": 2,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 384,
"height": 216
}
],
"status": "passed"
},
{
"width": 1024,
"dpr": 1,
"columns": 4,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 256,
"height": 144
}
],
"status": "passed"
},
{
"width": 1440,
"dpr": 2,
"columns": 4,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
"width": 266,
"height": 149
}
],
"status": "passed"
},
{
"width": 1920,
"dpr": 1,
"columns": 4,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 266,
"height": 149
}
],
"status": "passed"
},
{
"fail": "primary",
"status": "passed"
},
{
"fail": "all",
"status": "passed"
}
],
"errors": [],
"navigation": [
"/clusters",
"/corredores",
"/projectos-ancora",
"/educacao",
"/documentos"
],
"databaseAccess": false
},
"script": "tools/portal-context-cards-qa.mjs",
"screenshots": [
"outputs/investment-context-20261023/cards-1024-dpr1.png",
"outputs/investment-context-20261023/cards-1440-dpr2.png",
"outputs/investment-context-20261023/cards-1920-dpr1.png",
"outputs/investment-context-20261023/cards-320-dpr1.png",
"outputs/investment-context-20261023/cards-390-dpr2.png",
"outputs/investment-context-20261023/cards-768-dpr1.png",
"outputs/investment-context-20261023/fallback-all.png",
"outputs/investment-context-20261023/fallback-primary.png"
],
"types": {
"command": "npm run types:check",
"exitCode": 0
},
"lint": {
"files": [
"resources/js/components/investment-context-cards.tsx",
"resources/js/pages/PortalInvestidor.tsx",
"tools/portal-context-cards-qa.mjs"
],
"exitCode": 0
},
"build": {
"command": "npm run build",
"exitCode": 0,
"pageAsset": "assets/PortalInvestidor-fh5VZanx.js",
"log": "outputs/investment-context-20261023/build-local.log"
}
},
"scope": "Aplicado no código e pacote locais. API e navegação simuladas na verificação visual; sem dados activos ou publicação externa.",
"matrixReferences": [
"MASTER-efd550fd-0104",
"MASTER-55050f60-0001"
],
"acceptanceLimit": "Prova restrita à apresentação e navegação dos cinco cartões; não encerra critérios funcionais mais amplos da matriz.",
"layoutRevision": {
"date": "2026-10-23",
"decision": "Pedido expresso da Tempo: título a vermelho e menos espaço em branco dentro dos cartões.",
"changes": "Título no vermelho #ed1c24; removidas alturas mínimas de título e descrição; preenchimento 20→16 px, intervalo 8→6 px e entrelinhas 28/24→24/20 px. Mantidos imagens, conteúdos, links e alinhamento por linha da grelha.",
"browser": {
"results": [
{
"width": 320,
"dpr": 1,
"columns": 1,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 320,
"height": 180
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 320,
"height": 180
}
],
"status": "passed"
},
{
"width": 390,
"dpr": 2,
"columns": 1,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
"width": 389,
"height": 219
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
"width": 389,
"height": 219
}
],
"status": "passed"
},
{
"width": 768,
"dpr": 1,
"columns": 2,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 384,
"height": 216
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 384,
"height": 216
}
],
"status": "passed"
},
{
"width": 1024,
"dpr": 1,
"columns": 4,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 256,
"height": 144
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 256,
"height": 144
}
],
"status": "passed"
},
{
"width": 1440,
"dpr": 2,
"columns": 4,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios.webp",
"width": 266,
"height": 149
}
],
"status": "passed"
},
{
"width": 1920,
"dpr": 1,
"columns": 4,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-context/clusters-agroindustria-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/corredores-logisticos-v2-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/projectos-ancora-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/educacao-formacao-480.webp",
"width": 266,
"height": 149
},
{
"src": "http://127.0.0.1:5174/images/investment-context/documentos-formularios-480.webp",
"width": 266,
"height": 149
}
],
"status": "passed"
},
{
"fail": "primary",
"status": "passed"
},
{
"fail": "all",
"status": "passed"
}
],
"errors": [],
"navigation": [
"/clusters",
"/corredores",
"/projectos-ancora",
"/educacao",
"/documentos"
],
"databaseAccess": false
},
"lintExitCode": 0,
"buildExitCode": 0,
"pageAsset": "assets/PortalInvestidor-CYCMhSzW.js",
"screenshots": [
"outputs/investment-context-compact-20261023/cards-1024-dpr1.png",
"outputs/investment-context-compact-20261023/cards-1440-dpr2.png",
"outputs/investment-context-compact-20261023/cards-1920-dpr1.png",
"outputs/investment-context-compact-20261023/cards-320-dpr1.png",
"outputs/investment-context-compact-20261023/cards-390-dpr2.png",
"outputs/investment-context-compact-20261023/cards-768-dpr1.png"
],
"databaseChanged": false
}
}
@@ -0,0 +1,355 @@
{
"date": "2026-10-23",
"decision": "Pedido expresso da Tempo: adaptar hero, imagens e pesquisa da referência, preservando a informação e os comportamentos equivalentes do V2.",
"sourceProject": "D:/Projects/Tempo_Investidor/investidor",
"targetProject": "D:/Projects/Tempo_Investidor/Investidor-V2",
"planAndAnalysis": "docs/investmoz/public-portal-sections.md#adequação-do-hero--23102026",
"implementation": [
"resources/js/components/portal-hero.tsx",
"resources/js/pages/PortalInvestidor.tsx"
],
"assets": [
{
"source": "D:\\Projects\\Tempo_Investidor\\investidor\\public\\images\\hero\\hero-1.png",
"original": "public\\images\\hero\\hero-1.png",
"sha256": "3c9246169025b9b1b4d1d10fb51c1f644123984bde56c6c2d9bf869d851024fc",
"bytes": 2315768,
"webpBytes": 94012,
"mobileBytes": 38804
},
{
"source": "D:\\Projects\\Tempo_Investidor\\investidor\\public\\images\\hero\\hero-3.jpg",
"original": "public\\images\\hero\\hero-3.jpg",
"sha256": "91377213b6286aca7ee4af90860a7dc7a75fa08a165ef7b3192081db43f92dff",
"bytes": 9875137,
"webpBytes": 140342,
"mobileBytes": 32998
}
],
"desktopBytesTotal": 234354,
"mobileBytesTotal": 71802,
"originalBytesTotal": 12190905,
"verification": {
"browser": {
"results": [
{
"width": 320,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 390,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 768,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 1440,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 1920,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 1440,
"reducedMotion": "no-preference",
"status": "passed"
}
],
"errors": [],
"requests": [
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=",
"/oportunidades",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique"
],
"databaseAccess": false
},
"browserScript": "tools/portal-hero-qa.mjs",
"screenshots": [
"outputs/portal-hero-20261023/after-1440-no-preference.png",
"outputs/portal-hero-20261023/after-1440-reduce.png",
"outputs/portal-hero-20261023/after-1440-second-image.png",
"outputs/portal-hero-20261023/after-1920-reduce.png",
"outputs/portal-hero-20261023/after-320-reduce.png",
"outputs/portal-hero-20261023/after-390-reduce.png",
"outputs/portal-hero-20261023/after-768-reduce.png",
"outputs/portal-hero-20261023/before-1440-reduce.png",
"outputs/portal-hero-20261023/before-390-reduce.png"
],
"additionalCases": [
"pesquisa por Enter e botão",
"ordem do teclado: campo → botão",
"query acentuada e pontuação preservadas",
"remoção de espaços exteriores",
"pesquisa vazia abre catálogo",
"CTA abre oportunidades",
"API indisponível mantém indicadores indeterminados",
"contagens zero preservadas",
"duas imagens carregadas",
"selecção manual",
"pausa e retoma explícitas",
"foco pausa rotação",
"rotação automática após perda de foco",
"movimento reduzido",
"entrada documental e cabeçalho preservados"
],
"existingFrontendTests": {
"command": "node --test tests/frontend/portal-api.test.mjs tests/frontend/portal-navigation.test.mjs",
"passed": 20
},
"typecheck": {
"command": "npm run types:check",
"exitCode": 0
},
"lint": {
"files": [
"resources/js/components/portal-hero.tsx",
"resources/js/pages/PortalInvestidor.tsx",
"tools/portal-hero-qa.mjs"
],
"exitCode": 0
},
"qaBuild": {
"command": "INVESTMOZ_QA_BUILD=1 npm run build",
"exitCode": 0
},
"localBuild": {
"command": "npm run build",
"exitCode": 0,
"pageAsset": "assets/PortalInvestidor-MsUeKoJQ.js"
}
},
"matrix": {
"file": "docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv",
"referencesAdded": [
"MASTER-9dee08d0-0016",
"MASTER-efd550fd-0104",
"MASTER-55050f60-0001"
],
"rowCount": 3422,
"criteriaAndStatesPreserved": true
},
"scope": {
"appliedToLocalCodeAndBuild": true,
"activeDatabaseChanged": false,
"migrationsRun": false,
"externalDeploymentPerformed": false,
"backendSearchReimplemented": false
},
"limits": "Verificação visual com dados sintéticos; pesquisa continua limitada ao catálogo de oportunidades. Os critérios mais amplos da matriz permanecem no estado anterior.",
"latestRevision": {
"id": "hero-no-controls-20261023",
"date": "2026-10-23",
"decision": "Pedido expresso da Tempo: remover do hero as duas bolinhas e o botão de pausa das imagens.",
"implementation": "Removidos grupo de controlos, ícones Pause/Play e estado de pausa manual. Preservadas troca automática, escrita dinâmica, pesquisa e preferência de movimento reduzido.",
"browser": {
"results": [
{
"width": 320,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 390,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 768,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 1440,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 1920,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 390,
"reducedMotion": "no-preference",
"status": "passed"
},
{
"width": 1440,
"reducedMotion": "no-preference",
"status": "passed"
}
],
"errors": [],
"requests": [
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=",
"/oportunidades",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=",
"/oportunidades",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique"
],
"databaseAccess": false
},
"screenshots": [
"outputs/portal-hero-no-controls-20261023/after-1440-no-preference.png",
"outputs/portal-hero-no-controls-20261023/after-1440-reduce.png",
"outputs/portal-hero-no-controls-20261023/after-1920-reduce.png",
"outputs/portal-hero-no-controls-20261023/after-320-reduce.png",
"outputs/portal-hero-no-controls-20261023/after-390-no-preference.png",
"outputs/portal-hero-no-controls-20261023/after-390-reduce.png",
"outputs/portal-hero-no-controls-20261023/after-768-reduce.png",
"outputs/portal-hero-no-controls-20261023/second-image-1440.png",
"outputs/portal-hero-no-controls-20261023/second-image-390.png",
"outputs/portal-hero-no-controls-20261023/typed-1440.png",
"outputs/portal-hero-no-controls-20261023/typed-390.png"
],
"checks": {
"lintExitCode": 0,
"buildExitCode": 0,
"pageAsset": "assets/PortalInvestidor-T0B6aoV_.js"
},
"scope": {
"appliedLocally": true,
"databaseAccess": false,
"externalDeployment": false
}
},
"revisionHistory": [
{
"id": "hero-typing-20261023",
"date": "2026-10-23",
"decision": "Pedido expresso da Tempo: título e frase dinâmicos como na referência; remover Termos de uso do hero.",
"plan": [
"Analisar a sequência de escrita da referência.",
"Animar o título e depois a frase, mantendo os textos do V2 e reservando a dimensão final.",
"Reiniciar a escrita na troca de imagem e integrar pausa/retoma e preferência de movimento reduzido.",
"Remover o link e o ícone jurídico do hero.",
"Demonstrar comportamento em computador e telemóvel e compilar o pacote local."
],
"files": [
"resources/js/components/portal-hero.tsx",
"resources/css/app.css",
"tools/portal-hero-qa.mjs"
],
"browser": {
"results": [
{
"width": 320,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 390,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 768,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 1440,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 1920,
"reducedMotion": "reduce",
"status": "passed"
},
{
"width": 390,
"reducedMotion": "no-preference",
"status": "passed"
},
{
"width": 1440,
"reducedMotion": "no-preference",
"status": "passed"
}
],
"errors": [],
"requests": [
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=",
"/oportunidades",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique",
"/oportunidades?q=",
"/oportunidades",
"/oportunidades?q=energia%20%26%20Nampula%20%2F%20Mo%C3%A7ambique"
],
"databaseAccess": false
},
"screenshots": [
"outputs/portal-hero-typing-20261023/after-1440-no-preference.png",
"outputs/portal-hero-typing-20261023/after-1440-reduce.png",
"outputs/portal-hero-typing-20261023/after-1440-second-image.png",
"outputs/portal-hero-typing-20261023/after-1920-reduce.png",
"outputs/portal-hero-typing-20261023/after-320-reduce.png",
"outputs/portal-hero-typing-20261023/after-390-no-preference.png",
"outputs/portal-hero-typing-20261023/after-390-reduce.png",
"outputs/portal-hero-typing-20261023/after-768-reduce.png",
"outputs/portal-hero-typing-20261023/typed-1440.png",
"outputs/portal-hero-typing-20261023/typed-390.png",
"outputs/portal-hero-typing-20261023/typing-1440.png",
"outputs/portal-hero-typing-20261023/typing-390.png"
],
"demonstrated": [
"escrita progressiva",
"título antes da frase",
"texto completo no modo de movimento reduzido",
"nome acessível completo durante a escrita",
"pesquisa sem deslocamento durante a escrita",
"reinício na selecção manual e automática de imagem",
"pausa e retoma da escrita",
"cursor com pausa",
"Termos de uso ausente do hero",
"pesquisa, teclado, CTA, API indisponível e contagens zero preservados"
],
"checks": {
"types": {
"command": "npm run types:check",
"exitCode": 0
},
"lint": {
"command": "vp lint resources/js/components/portal-hero.tsx tools/portal-hero-qa.mjs",
"exitCode": 0
},
"build": {
"command": "npm run build",
"exitCode": 0,
"pageAsset": "assets/PortalInvestidor-BbVHeTeI.js",
"log": "outputs/portal-hero-typing-20261023/build-local.log"
}
},
"scope": {
"appliedLocally": true,
"databaseAccess": false,
"externalDeployment": false
}
}
]
}
+88
View File
@@ -48,3 +48,91 @@ Edge headless: 11 páginas públicas/autenticação verificadas a 390×844, com
Página inicial também verificada a 1440×1000. Cenário fiscal exercitado no navegador: base 1.000 × taxa 10% × (1 − redução 50%) = 50. Resultados em `public-portal-browser-validation.json`. Página inicial também verificada a 1440×1000. Cenário fiscal exercitado no navegador: base 1.000 × taxa 10% × (1 − redução 50%) = 50. Resultados em `public-portal-browser-validation.json`.
Antes da migration local foi criado e restaurado o backup de 74 tabelas em `storage/app/private/portal-services-backup-20260927-090641/`. O backup completo anterior permanece em `C:/laragon/backups/portal-investidor-20260927-101224/` e representa o estado anterior a esta entrega. Antes da migration local foi criado e restaurado o backup de 74 tabelas em `storage/app/private/portal-services-backup-20260927-090641/`. O backup completo anterior permanece em `C:/laragon/backups/portal-investidor-20260927-101224/` e representa o estado anterior a esta entrega.
## Adequação do hero — 23/10/2026
Origem: pedido expresso da Tempo nesta sessão para aproveitar o hero, as imagens e a barra de pesquisa de `D:/Projects/Tempo_Investidor/investidor`, usando a informação existente no V2. Aplicam-se as orientações permanentes do `AGENTS.md`, incluindo a distinção entre decisão da Tempo e escolha técnica, a preservação de dados e a separação de QA e activo.
Análise prévia: a página de entrada real do V2 é `PortalInvestidor.tsx`, servida por `PortalServicesController::home`. A referência é `domains/investor-portal/components/homepage/homepage-hero.tsx`, montada em `InstitutionalHomepage`. A referência usa Inertia 2, Framer Motion, tradução e navegação diferentes; o V2 usa Inertia 3 e pesquisa de oportunidades. Copiar essas dependências e `/pesquisa` ou `/aviso-legal` directamente criaria incompatibilidades e destinos inexistentes.
Plano executado:
1. Registar a apresentação anterior em computador e telemóvel, com os componentes reais e dados sintéticos.
2. Copiar os dois originais efectivamente usados pela referência (`hero-1.png` e `hero-3.jpg`), conferir SHA-256 e gerar derivados WebP para computador e telemóvel. `hero-2.png` não faz parte da rotação da referência.
3. Extrair `components/portal-hero.tsx` e aplicar fotografias em rotação, texto centrado e pesquisa branca com botão vermelho. Preservar os textos do V2, contagens da API, sectores, documentos, apoio, cabeçalho e rodapé.
4. Manter a pesquisa de oportunidades em `/oportunidades?q=`, incluindo pesquisa vazia e caracteres acentuados. Conservar “Consultar oportunidades” e “Planear finanças”. A primeira iteração acrescentou o acesso jurídico `/termos-de-uso` ao hero; foi removido na revisão expressamente pedida pela Tempo abaixo.
5. Verificar apresentação, teclado, imagens, rotação, pausa, movimento reduzido, falha da API, contagens zero, TypeScript, lint e compilação. Compilar primeiro o pacote QA e depois os assets locais em `public/build`.
Escolhas técnicas desta adaptação: React e transições CSS existentes, sem novas dependências; rotação de oito segundos, pausa por controlo explícito, foco, ponteiro ou separador oculto; apresentação estática quando o utilizador pede movimento reduzido. A primeira iteração apresentou o texto estático; a revisão abaixo introduz a escrita dinâmica pedida pela Tempo. O campo indica pesquisa de oportunidades e conserva exemplos que o catálogo suporta; esta alteração não implementa uma pesquisa global de legislação/licenciamento.
Evidência reproduzível: `tools/portal-hero-qa.mjs`, com Vite local e Playwright configurável por `HERO_QA_PLAYWRIGHT`/`HERO_QA_CHROMIUM`. Fixtures e capturas em `outputs/portal-hero-20261023/`; síntese persistente em `public-portal-hero-validation.json`. Os testes de interface interceptam a API e a navegação Inertia, sem acesso a Laravel, base de dados ou serviços externos. A compilação local aplica os assets desta pasta; não representa publicação noutro servidor.
Referências na matriz existente: `MASTER-efd550fd-0104` (composição da página), `MASTER-9dee08d0-0016` (contexto da pesquisa) e `MASTER-55050f60-0001` (entrada documental preservada). Esta prova cobre a adaptação visual e os percursos exercitados; não encerra os critérios funcionais mais amplos dessas linhas.
### Revisão: escrita dinâmica e remoção do acesso jurídico no hero
Decisão expressa da Tempo na continuação da sessão de 23/10/2026: animar “INVISTA EM MOÇAMBIQUE” e “Transforme informação em decisões e ideias em negócios reais.” como na página de referência, e remover “Termos de uso” do hero. A anterior apresentação estática e a inclusão desse link eram escolhas de implementação, agora substituídas pelo pedido do proprietário.
Análise e plano executado: reproduzir a sequência da referência (espera inicial de 250 ms, título a 50 ms por carácter, intervalo de 150 ms e frase a 28 ms por carácter); reiniciar ao trocar de imagem; acrescentar o cursor intermitente; reservar a dimensão final de ambas as linhas para manter a pesquisa imóvel; remover o link e o ícone jurídico do hero; verificar em computador e telemóvel e compilar o pacote local.
Implementação em `portal-hero.tsx`, com React existente e CSS do cursor em `app.css`, sem dependências novas. A pausa explícita suspende também a escrita, retomando do mesmo ponto. Quando o separador fica oculto a escrita pára; a preferência de movimento reduzido apresenta os dois textos completos. Leitores de ecrã recebem o texto completo uma única vez, independentemente do número de caracteres visíveis. Os temporizadores são limpos ao mudar de imagem ou desmontar o componente.
O script `tools/portal-hero-qa.mjs` demonstra a escrita progressiva, a ordem título→frase, o reinício manual/automático, a pausa/retoma, a posição estável da pesquisa, o modo sem movimento e a ausência de “Termos de uso” no hero. As capturas e resultados desta revisão ficam em `outputs/portal-hero-typing-20261023/`, preservando a evidência anterior. Síntese e compilação final registadas na revisão de `public-portal-hero-validation.json`; referência acrescentada à linha existente `MASTER-efd550fd-0104`, sem encerrar o seu critério mais amplo.
### Revisão: remoção dos controlos visíveis das imagens
Pedido expresso da Tempo na continuação de 23/10/2026: remover do hero o grupo com o botão de pausa e as duas bolinhas de selecção de imagem. Removidos o grupo, os ícones e o estado de pausa manual. A troca automática de imagens e a escrita dinâmica permanecem; conservam-se a pausa da rotação por foco/ponteiro, a suspensão em separador oculto e a preferência de movimento reduzido. Esta decisão substitui os controlos visíveis introduzidos como escolha de implementação nas revisões anteriores.
O script existente de interface foi adaptado para demonstrar a ausência dos controlos e a continuação da rotação automática, escrita e pesquisa, com capturas em `outputs/portal-hero-no-controls-20261023/`. Evidência e pacote local registados em `public-portal-hero-validation.json`, mantendo o histórico das revisões e os estados dos requisitos da matriz.
## Fotografias nas etapas de Como Investir — 23/10/2026
Origem: pedido expresso da Tempo para analisar e ilustrar exclusivamente os cartões “1. Explorar”, “2. Preparar” e “3. Acompanhar”. Aplicam-se as orientações permanentes de `AGENTS.md` de 12/10 e 22/10/2026; componentes e optimização de recursos são escolhas técnicas, sem novas regras operacionais.
Análise e plano: os cartões existentes são âncoras estáticas na home React/Inertia, numa grelha de três colunas a partir de 768 px. Explorar liga a `/oportunidades` e representa a identificação de sector, território e oportunidade; Preparar liga a `/como-investir` e representa percurso/documentação; Acompanhar liga a `/balcao-virtual` e representa envio/consulta de pedido e protocolo. Os recursos locais existentes ilustram outras secções; preparar três fotografias distintas para evitar repetição. Gerar cenas editoriais plausíveis com `imagegen`, rever composição, guardar originais e versões WebP locais, integrar imagens 16:9 com dimensões reservadas e carregamento diferido, manter textos/destinos/título vermelho, verificar comportamento responsivo, navegação e falhas de imagem, compilar. Âmbito exclusivamente visual, sem alterações em dados, autenticação, apoio ou rodapé. Referência documental na linha existente `MASTER-efd550fd-0104`, sem criar outra matriz nem encerrar o critério mais amplo.
Implementação: `components/investment-steps.tsx` reúne os três cartões, preservando títulos, descrições e âncoras. Fotografias individuais geradas com a ferramenta integrada `image_gen`, sem local ou projecto real atribuído: avaliação de oportunidade num parque empresarial genérico, preparação documental numa reunião e consulta de pedido no computador. Originais em `outputs/investment-steps-20261023/originals/`; recursos locais em `public/images/investment-steps/` com WebP 960×540, 480×270 e alternativa própria 240×135. Os cartões usam `srcset`, `sizes`, `loading="lazy"`, dimensões reservadas, corte 16:9, alt em português, foco visível e texto compacto com 16 px de preenchimento. Se também falhar a alternativa pequena, o cartão mantém a área reservada, descrição acessível e destino utilizável.
Verificação desta secção: componentes reais com API sintética e sem base de dados, seis larguras de 320 a 1920 px, duas densidades de ecrã, três imagens distintas, texto/destinos conservados, navegação por teclado, ausência de transbordo e deslocamento no carregamento, falhas dos recursos principais e de todos os recursos. Oito cenários sem erros JavaScript. Fotografias, prompts, hashes, capturas, relatório de browser e compilação documentados em `public-portal-steps-images.json` e `outputs/investment-steps-20261023/`. Ajuste restrito a esta secção; apoio, acesso à gestão e rodapé mantidos.
## Fotografias nos cartões de contexto do investimento — 23/10/2026
Origem: pedido expresso da Tempo para aplicar o anexo “Melhorar as imagens e a identidade visual do Portal do Investidor de Moçambique” exclusivamente à secção “Encontre o contexto do seu investimento”. O anexo define estética fotográfica editorial, imagens individuais contextualizadas, recursos locais, acessibilidade, desempenho e preservação dos cinco destinos e conteúdos. Aplicam-se as orientações permanentes de `AGENTS.md` de 12/10 e 22/10/2026; os pormenores de implementação abaixo são escolhas técnicas.
Análise prévia: Laravel/Inertia 3 e React, com Tailwind existente; os cinco cartões estavam embutidos em `pages/PortalInvestidor.tsx`. `EducationalArticleCard` destina-se a artigos com acções e metadados diferentes, pelo que não foi alterado. A secção foi extraída para `components/investment-context-cards.tsx`, mantendo o título, descrições, âncoras e grelha de uma/duas/quatro colunas. Não foram alteradas as páginas de destino, dados, APIs ou estilos globais.
Foram geradas cinco imagens distintas com a ferramenta integrada `image_gen`, segundo a skill `imagegen`: agro-indústria, terminal logístico, acompanhamento de instalação solar, formação técnica e análise documental. São imagens fotográficas ilustrativas geradas, sem localização ou instituição real atribuída, e não fotografias documentais de projectos cadastrados. A imagem do terminal foi revista para remover o camião com marca visível. Não foram usadas fotografias externas nem URLs de serviços de imagens. Originais seleccionados, prompts e hashes estão registados no manifesto `public-portal-context-images.json`; os originais foram preservados dentro do workspace.
Recursos finais em `public/images/investment-context/`: `clusters-agroindustria`, `corredores-logisticos-v2`, `projectos-ancora`, `educacao-formacao` e `documentos-formularios`, em WebP 960×540, com variantes 480×270 e alternativas 240×135. As imagens mantêm 16:9, `object-cover`, textos alternativos em português, dimensões reservadas, `srcset`, `sizes`, `loading="lazy"` e descodificação assíncrona. Cada cartão conserva o seu título e descrição; o foco usa o azul e os tons neutros pedidos no anexo.
Se um recurso principal falhar, o cartão usa a sua própria variante pequena, evitando repetir a fotografia de outra secção. Se também essa falhar, apresenta “Imagem indisponível” no mesmo espaço reservado, com descrição acessível e link operacional. Este é apenas um estado de erro; os cinco cartões usam imagens fotográficas na apresentação normal.
Verificação reproduzível: `tools/portal-context-cards-qa.mjs`, com o portal e cabeçalho reais, API sintética e acesso exclusivo aos recursos locais. Exercita seis larguras de ecrã, ecrãs de alta densidade, os cinco destinos por teclado, imagens carregadas e distintas, alinhamento, dimensões, ausência de deslocamento no carregamento e dois cenários de falha. Capturas e resultados em `outputs/investment-context-20261023/`; síntese, fontes/prompts e compilação em `public-portal-context-images.json`. Referências acrescentadas às linhas existentes `MASTER-efd550fd-0104` e `MASTER-55050f60-0001`, sem encerrar os respectivos critérios mais amplos.
Revisão expressa da Tempo de 23/10/2026: título da secção no vermelho da identidade existente (`#ed1c24`) e cartões mais compactos. Removidas as alturas mínimas de 56 e 72 px do título/descrição; reduzidos o preenchimento de 20 para 16 px, o intervalo de 8 para 6 px e as entrelinhas. As alturas passam a acompanhar o conteúdo, com alinhamento por linha da grelha, conservando imagens, textos e destinos. A reserva das dimensões das imagens mantém-se. Evidência desta revisão em `outputs/investment-context-compact-20261023/` e no campo `layoutRevision` do manifesto existente.
## Sectores da home e catálogo completo — 23/10/2026
Origem: pedido expresso da Tempo para adaptar a estrutura de “Áreas de Investimento” do projecto `D:/Projects/Tempo_Investidor/tempo-dashboard`, incluindo cartões, botão para mais sectores e respectiva página, e uniformizar a vermelho os títulos das secções da home. Aplicadas as orientações permanentes `AGENTS.md` de 12/10 e 22/10/2026: as decisões de produto são da Tempo; as escolhas técnicas abaixo não criam requisitos organizacionais.
Análise prévia: a referência usa `components/investor-portal/homepage/homepage-sectors.tsx` e `pages/investor-portal/sectors/index.tsx`. Mostra cinco cartões com fotografia e título sobreposto, resumo, “Saiba mais” e ligação central arredondada para o catálogo. O V2 já dispunha de `/sectores`, fichas `/sectores/{slug}`, especialização Fintech e dados de `SectorOrganization`. Foram reutilizados esses contratos e percursos, sem importar Framer Motion, traduções ou rotas exclusivas da referência.
Implementação: `components/public-sector-cards.tsx` partilha os cartões entre a home e o catálogo. A home mostra os primeiros cinco sectores, na ordem recebida da API, com “Ler mais” para a ficha existente e “Ver mais sectores” para `/sectores`. A página existente apresenta todos os sectores publicados, na mesma estrutura visual, e “Voltar ao início”. Mantêm-se nomes, descrições, contagens, valores zero, especializações e URLs canónicos recebidos. Descrições ausentes não são preenchidas com dados da referência. Fintech permanece ligado à ficha própria, sem âncoras HTML aninhadas.
Foram inventariados os onze JPG disponíveis em `storage/app/public/investor-portal/sectors` na referência, copiados os originais para evidência e preparados derivados locais WebP 960×540/480×270 em `public/images/sectors/`. O mapeamento visual por slug é de apresentação e não altera a taxonomia. Para Imobiliário e sectores sem imagem específica usa-se a vista empresarial genérica disponível na referência; para Bens de Consumo e Franquias usa-se a imagem de actividade industrial. A variante genérica também serve como alternativa em caso de erro; se ambas falharem, o título e as ligações continuam visíveis num fundo neutro. Não se atribui aos ficheiros uma origem oficial, licença externa ou localização documental não comprovada.
Os seis títulos de secção da home — contexto do investimento, sectores, Como Investir, oportunidades em destaque, documentos essenciais e apoio — usam `HOME_SECTION_HEADING` em `lib/portal-presentation.ts`: vermelho `#ed1c24`, 24 px, entrelinha de 32 px e peso 700. O cartão de Apoio passou a superfície clara para manter contraste com o título vermelho. O título principal animado do hero mantém a sua hierarquia própria. `PORTAL_MORE_LINK` centraliza o botão arredondado, contorno vermelho e estado de foco, seguindo a referência.
Verificação: `tools/portal-home-sectors-qa.mjs` carrega os componentes reais com dez sectores sintéticos, descrições nulas e especialização Fintech, sem base de dados. Exercita seis larguras, prévia de cinco/cartálogo de dez, estilos dos seis títulos, percurso por teclado, dez fichas, Fintech, regresso à home, catálogo vazio e dois cenários de indisponibilidade de imagens. Capturas, inventário, hashes e resultados em `outputs/home-sectors-20261023/`; resumo persistente em `public-portal-sectors-validation.json`. Referências na matriz existente: `MASTER-efd550fd-0104` e `MASTER-9f5719c8-0077`. Esta adaptação não encerra critérios mais amplos nem altera dados, permissões, regras operacionais ou publicação noutro servidor.
Pedido expresso da Tempo, 23/10/2026 — botão “Contactar Apoio ao Investidor”: em `layouts/portal-navigation.tsx`, a faixa de largura total foi substituída por um botão centrado, com largura ajustada ao texto, altura mínima de 44 px, preenchimento reduzido, sombra discreta e vermelho `#ed1c24`, conservando `/apoio` e o foco visível. Verificado a 320, 390 e 1440 px: cerca de 223×44 px, sem transbordo ou erros JavaScript. Evidência em `outputs/support-button-20261023/qa-results.json` e capturas; compilação local no mesmo directório. Ajuste de apresentação por decisão do proprietário, sem nova regra operacional nem alteração de dados.
Revisão anterior de 23/10/2026, superada pela correcção de âmbito abaixo: o Codex interpretou o pedido de abreviação como aplicável à zona inferior inteira e alterou indevidamente o botão de apoio e o rodapé partilhado. Essa interpretação não foi uma decisão da Tempo. A revisão removeu o bloco interno, abreviou o botão para “Apoio” e recolheu contactos/ligações em “Informações” num rodapé claro; estas alterações fora do bloco indicado foram revertidas após a clarificação expressa do proprietário. O registo desta revisão é histórico e não descreve a apresentação actual.
Evidência histórica da revisão superada: `outputs/footer-compact-20261023/qa-results.json`, capturas e `check.mjs`. Não constitui aceitação do âmbito pelo proprietário.
Correcção expressa da Tempo, 23/10/2026: o pedido abrange exclusivamente o bloco “INVESTE Moçambique / Portal do Investidor — conheça as oportunidades… / Acesso à gestão”. Em `pages/PortalInvestidor.tsx`, esse bloco fica abreviado num ícone de acesso à gestão, com nome acessível e descrição “Acesso à gestão”, destino `/acesso-gestao`, área de interacção de 44 px e fundo branco, sem o título e parágrafo anteriores. O botão de apoio foi restaurado exactamente à apresentação anterior à abreviação: “Contactar Apoio ao Investidor”, compacto, vermelho e sem ícone. `components/tempo-footer.tsx` e os estilos `.tempo-footer` foram integralmente restaurados ao estado anterior, incluindo contactos e ligações visíveis e o fundo original do rodapé geral. Não se altera autenticação nem dados. Esta correcção substitui a interpretação indevida acima e mantém as restantes alterações previamente pedidas.
Evidência da correcção: `outputs/footer-scope-correction-20261023/check.mjs`, `qa-results.json`, capturas e `build-local.log`; componentes reais com API sintética a 320, 390 e 1440 px, ícone de gestão focável, bloco específico claro sem parágrafo, botão de apoio completo/vermelho, rodapé geral restaurado, contactos e ligações legais visíveis, sem transbordo ou erros JavaScript. Lint dos componentes alterados e compilação local. Referência na linha existente `MASTER-efd550fd-0104`, sem encerramento do critério amplo nem alteração dos seus estados.
Continuação expressa da Tempo, 23/10/2026: acrescentado o título visível “Acesso à gestão” ao lado do ícone nesse mesmo bloco, para tornar o destino compreensível. O acesso mantém-se compacto, vermelho e com fundo claro, conservando `/acesso-gestao`. Ajuste restrito a essa ligação; apoio e rodapé geral conservam a apresentação restaurada. Referência: `MASTER-efd550fd-0104` e a evidência da revisão anterior acima. Verificado a 320, 390 e 1440 px, sem transbordo ou erros JavaScript; lint e compilação aprovados. Evidência em `outputs/management-label-20261023/qa-results.json`, capturas e `build-local.log`. No pedido seguinte, a Tempo determinou o alinhamento desse acesso à esquerda; aplicado `justify-start` apenas no seu contentor.
@@ -0,0 +1,748 @@
{
"date": "2026-10-23",
"decision": "Pedido expresso da Tempo: adaptar Áreas de Investimento do tempo-dashboard aos sectores da home e ao catálogo completo, copiar a estrutura dos botões e uniformizar a vermelho os títulos de secção da home.",
"reference": {
"project": "D:/Projects/Tempo_Investidor/tempo-dashboard",
"files": [
"resources/js/components/investor-portal/homepage/homepage-sectors.tsx",
"resources/js/pages/investor-portal/sectors/index.tsx"
],
"structure": "Cinco cartões com fotografia, título sobreposto, resumo e acção de leitura; botão central arredondado/contorno vermelho para o catálogo."
},
"analysisAndPlan": "docs/investmoz/public-portal-sections.md#sectores-da-home-e-catálogo-completo--23102026",
"filesChanged": [
"resources/js/components/public-sector-cards.tsx",
"resources/js/lib/portal-presentation.ts",
"resources/js/components/investment-context-cards.tsx",
"resources/js/lib/portal-api.ts",
"resources/js/pages/PortalInvestidor.tsx",
"resources/js/pages/portal/services.tsx",
"tools/portal-home-sectors-qa.mjs",
"docs/investmoz/public-portal-sections.md",
"docs/investmoz/v2/auditoria-portal/matriz-requisitos.csv"
],
"behaviour": {
"homePreview": 5,
"previewOrder": "Ordem recebida da API, sem novos filtros de publicação.",
"readMore": "Ler mais, para a URL recebida ou ficha existente /sectores/{slug}.",
"moreSectors": "Ver mais sectores, botão arredondado para /sectores.",
"catalogue": "Todos os sectores publicados devolvidos pelo cadastro existente; Voltar ao início para /.",
"specializations": "Fintech conservado como ligação própria; sem âncoras aninhadas.",
"countsAndDescriptions": "Preservados dados recebidos, incluindo zero e descrições ausentes; não importados textos ou registos do outro projecto.",
"headings": [
{
"title": "Encontre o contexto do seu investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Sectores de investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Como Investir",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Oportunidades em destaque",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Documentos essenciais",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Apoio ao Investidor",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
}
],
"supportCard": "Superfície clara para contraste com o título vermelho."
},
"assets": [
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\agronegocio.jpg",
"sourceBytes": 444057,
"original": "outputs/home-sectors-20261023/originals/agronegocio.jpg",
"sha256": "7337b689a6ad8b0b4c8d716ea356db14e22bd2982089825bb2382121ed3482f6",
"derivatives": [
{
"file": "public/images/sectors/agronegocio.webp",
"width": 960,
"height": 540,
"bytes": 110310,
"sha256": "3e9d3be22556300f880be39837f86e764e3d05433beff1da6694ef6cee1d5c34"
},
{
"file": "public/images/sectors/agronegocio-480.webp",
"width": 480,
"height": 270,
"bytes": 31592,
"sha256": "fd1f7624f7fd9224fc1c7bd11746806e419c645ba43c257b1edd9ba250cd47f1"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\economia-azul.jpg",
"sourceBytes": 456892,
"original": "outputs/home-sectors-20261023/originals/economia-azul.jpg",
"sha256": "1a2c04d0d9ed4a26129553daefd2ee18f6d820026ab1203acf3bcf91b0550f69",
"derivatives": [
{
"file": "public/images/sectors/economia-azul.webp",
"width": 960,
"height": 540,
"bytes": 107626,
"sha256": "bf3751e66839c1b3c585c91ffe65d32b9ee79ebd7d08e5e2c95c6cd581b04f8f"
},
{
"file": "public/images/sectors/economia-azul-480.webp",
"width": 480,
"height": 270,
"bytes": 29350,
"sha256": "aaf8ee66709d8e15c4304690dd03830b4368d14468a597d5617ccdb71d614331"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\energia.jpg",
"sourceBytes": 386678,
"original": "outputs/home-sectors-20261023/originals/energia.jpg",
"sha256": "a164e2c8ef155a6a198ae400feca132e79ba75e022473893ec48ebfa0557f679",
"derivatives": [
{
"file": "public/images/sectors/energia.webp",
"width": 960,
"height": 540,
"bytes": 81236,
"sha256": "b5605d9bb8645c5042baa511aaf39fcb187080a48d8e067b130fc974c4c9196d"
},
{
"file": "public/images/sectors/energia-480.webp",
"width": 480,
"height": 270,
"bytes": 21926,
"sha256": "7e53977fc6ce11755455f8092ac3f8c7126f54d909a3935e522f8dae0ab834be"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\industria.jpg",
"sourceBytes": 357131,
"original": "outputs/home-sectors-20261023/originals/industria.jpg",
"sha256": "d70c4257ac58a4b5e9f8b8b1a4cf6d98c0514043442c3ce46f5c98399038527f",
"derivatives": [
{
"file": "public/images/sectors/industria.webp",
"width": 960,
"height": 540,
"bytes": 80422,
"sha256": "ca8ddd2d65647f1ed7a9906271fa2ea3d027f310b89434fd7781a37a3d18322d"
},
{
"file": "public/images/sectors/industria-480.webp",
"width": 480,
"height": 270,
"bytes": 25194,
"sha256": "8bd695231209c0042b94e68b0e2095fa7202297708dabff0f78b337500b8c9b7"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\infraestruturas.jpg",
"sourceBytes": 395383,
"original": "outputs/home-sectors-20261023/originals/infraestruturas.jpg",
"sha256": "ac6cde89507af68991faebee19540f955146724d3be901839b85a4098fe1674b",
"derivatives": [
{
"file": "public/images/sectors/infraestruturas.webp",
"width": 960,
"height": 540,
"bytes": 86654,
"sha256": "14754a59477e5c62a62c190be812c89d9616608b3c98acb6100ad70d94d34df0"
},
{
"file": "public/images/sectors/infraestruturas-480.webp",
"width": 480,
"height": 270,
"bytes": 25772,
"sha256": "eca58096087d05dae3eea2b4d063c103f9fc85b0ea20fc5051313cf9bfa1020f"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\logistica-transportes.jpg",
"sourceBytes": 413702,
"original": "outputs/home-sectors-20261023/originals/logistica-transportes.jpg",
"sha256": "5976ead23da0d4e7d5debf875262f0229d389826aaeb7e7be4ebbac3f5129a9e",
"derivatives": [
{
"file": "public/images/sectors/logistica-transportes.webp",
"width": 960,
"height": 540,
"bytes": 96254,
"sha256": "0d235e7bbd160cccd3f97daa3337d6b27fde49db9782ad2ba0599c6a83022b6c"
},
{
"file": "public/images/sectors/logistica-transportes-480.webp",
"width": 480,
"height": 270,
"bytes": 28816,
"sha256": "32f5137e0a7f6a7894b186edb2ca38f12cdfdca04dda3588de3969fb3d2e333a"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\mineracao.jpg",
"sourceBytes": 415161,
"original": "outputs/home-sectors-20261023/originals/mineracao.jpg",
"sha256": "7e6d1e5a17d434456ad937680a6c5501bd33bd624d2cc7ebf4b643185a9440aa",
"derivatives": [
{
"file": "public/images/sectors/mineracao.webp",
"width": 960,
"height": 540,
"bytes": 96642,
"sha256": "12c93df378f54108b13260c10d29789564af7844cc84bcd9281d2be917d83354"
},
{
"file": "public/images/sectors/mineracao-480.webp",
"width": 480,
"height": 270,
"bytes": 26034,
"sha256": "be3e7763fb8cd2e02f576204269821c40d93a7c155d8088a5084064b7269e4d6"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\outros-sectores.jpg",
"sourceBytes": 328152,
"original": "outputs/home-sectors-20261023/originals/outros-sectores.jpg",
"sha256": "4aaac0869dc7e61c4c7a87e1af95beb108aa9be0da082702f6f70722e62b1e7a",
"derivatives": [
{
"file": "public/images/sectors/outros-sectores.webp",
"width": 960,
"height": 540,
"bytes": 75414,
"sha256": "f47b3d0da5b0cd5153d393c6f779484ba89043e50195e968338108e893a88077"
},
{
"file": "public/images/sectors/outros-sectores-480.webp",
"width": 480,
"height": 270,
"bytes": 24936,
"sha256": "a4fc00551d75c96a1648ad4f81d759d4d6ecd7e6fc5689689216a96934bd1ea2"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\servicos-financeiros.jpg",
"sourceBytes": 348386,
"original": "outputs/home-sectors-20261023/originals/servicos-financeiros.jpg",
"sha256": "f932a56248d5544bff92aa30f4af3a5a63044c311969d4370d06f157b097d570",
"derivatives": [
{
"file": "public/images/sectors/servicos-financeiros.webp",
"width": 960,
"height": 540,
"bytes": 72144,
"sha256": "15379485db7de7b2efebe8bdbd4cbd8e911eb34ab8a23b3dd114c849bb4ae65c"
},
{
"file": "public/images/sectors/servicos-financeiros-480.webp",
"width": 480,
"height": 270,
"bytes": 20698,
"sha256": "c21949201e35e63625d3d2e7520e10912fe65be1186954142b2784f6efca51ed"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\tic-economia-digital.jpg",
"sourceBytes": 417398,
"original": "outputs/home-sectors-20261023/originals/tic-economia-digital.jpg",
"sha256": "b09703bd079f55fb5a8ec3167ce96e1fdb1e5090813a81c817b9a33909427d94",
"derivatives": [
{
"file": "public/images/sectors/tic-economia-digital.webp",
"width": 960,
"height": 540,
"bytes": 97892,
"sha256": "b1d79c1a941085582d6a72799140bafed1bf38ec0201a4dfe5f6faf54ea55ae8"
},
{
"file": "public/images/sectors/tic-economia-digital-480.webp",
"width": 480,
"height": 270,
"bytes": 28242,
"sha256": "c4279a27ed402ca2feb62f11a8a954cbcae993912d3c8c27a2d9644fdf922114"
}
]
},
{
"source": "D:\\Projects\\Tempo_Investidor\\tempo-dashboard\\storage\\app\\public\\investor-portal\\sectors\\turismo.jpg",
"sourceBytes": 393339,
"original": "outputs/home-sectors-20261023/originals/turismo.jpg",
"sha256": "1a76db252bc8c1a9dc1f3c650bd95e55337c36a6f604753d61cad96c19b1875f",
"derivatives": [
{
"file": "public/images/sectors/turismo.webp",
"width": 960,
"height": 540,
"bytes": 93234,
"sha256": "de46707dfdd8b98c48ec88d19f3df0b1d6c130adfcbd97d5a7c2e6fa2db62bef"
},
{
"file": "public/images/sectors/turismo-480.webp",
"width": 480,
"height": 270,
"bytes": 27012,
"sha256": "4d3d9a04b9426474dca9ba8895021b48fffbe7e4d4a4551272b8c832cf83488e"
}
]
}
],
"assetMapping": {
"agronegocio": "agronegocio",
"turismo": "turismo",
"infraestruturas": "infraestruturas",
"economia-azul": "economia-azul",
"mercado-financeiro": "servicos-financeiros",
"mineracao": "mineracao",
"energia-especifica": "energia",
"imobiliario": "outros-sectores",
"bens-de-consumo-e-franquias": "industria",
"tecnologias-de-informacao": "tic-economia-digital"
},
"assetSource": "JPG locais do projecto de referência indicado pelo proprietário, inventariados e copiados sem alteração; WebP derivados para apresentação. Sem alegação adicional de licença externa, origem oficial ou localização documental. Imagem genérica reutilizada como alternativa funcional e para sectores sem imagem específica.",
"assetBytes960": 997828,
"assetBytes480": 289572,
"verification": {
"browser": {
"results": [
{
"width": 320,
"homeSectors": 5,
"catalogueSectors": 10,
"homeColumns": 2,
"headings": [
{
"title": "Encontre o contexto do seu investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Sectores de investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Como Investir",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Oportunidades em destaque",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Documentos essenciais",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Apoio ao Investidor",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
}
],
"status": "passed"
},
{
"width": 390,
"homeSectors": 5,
"catalogueSectors": 10,
"homeColumns": 2,
"headings": [
{
"title": "Encontre o contexto do seu investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Sectores de investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Como Investir",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Oportunidades em destaque",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Documentos essenciais",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Apoio ao Investidor",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
}
],
"status": "passed"
},
{
"width": 768,
"homeSectors": 5,
"catalogueSectors": 10,
"homeColumns": 3,
"headings": [
{
"title": "Encontre o contexto do seu investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Sectores de investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Como Investir",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Oportunidades em destaque",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Documentos essenciais",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Apoio ao Investidor",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
}
],
"status": "passed"
},
{
"width": 1024,
"homeSectors": 5,
"catalogueSectors": 10,
"homeColumns": 5,
"headings": [
{
"title": "Encontre o contexto do seu investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Sectores de investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Como Investir",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Oportunidades em destaque",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Documentos essenciais",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Apoio ao Investidor",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
}
],
"status": "passed"
},
{
"width": 1440,
"homeSectors": 5,
"catalogueSectors": 10,
"homeColumns": 5,
"headings": [
{
"title": "Encontre o contexto do seu investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Sectores de investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Como Investir",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Oportunidades em destaque",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Documentos essenciais",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Apoio ao Investidor",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
}
],
"status": "passed"
},
{
"width": 1920,
"homeSectors": 5,
"catalogueSectors": 10,
"homeColumns": 5,
"headings": [
{
"title": "Encontre o contexto do seu investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Sectores de investimento",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Como Investir",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Oportunidades em destaque",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Documentos essenciais",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
},
{
"title": "Apoio ao Investidor",
"size": "24px",
"weight": "700",
"color": "rgb(237, 28, 36)",
"lineHeight": "32px"
}
],
"status": "passed"
},
{
"fail": "primary",
"status": "passed"
},
{
"fail": "all",
"status": "passed"
},
{
"emptyCatalogue": true,
"status": "passed"
}
],
"errors": [],
"navigation": [
"/sectores",
"/sectores",
"/sectores",
"/sectores",
"/sectores",
"/sectores/agronegocio",
"/sectores",
"/sectores/turismo",
"/sectores",
"/sectores/infraestruturas",
"/sectores",
"/sectores/economia-azul",
"/sectores",
"/sectores/mercado-financeiro",
"/sectores",
"/sectores/mineracao",
"/sectores",
"/sectores/energia-especifica",
"/sectores",
"/sectores/imobiliario",
"/sectores",
"/sectores/bens-de-consumo-e-franquias",
"/sectores",
"/sectores/tecnologias-de-informacao",
"/sectores",
"/sectores/mercado-financeiro/fintech",
"/sectores",
"/",
"/sectores",
"/sectores"
],
"databaseAccess": false
},
"script": "tools/portal-home-sectors-qa.mjs",
"screenshots": [
"outputs/home-sectors-20261023/catalogue-1024.png",
"outputs/home-sectors-20261023/catalogue-1440.png",
"outputs/home-sectors-20261023/catalogue-1920.png",
"outputs/home-sectors-20261023/catalogue-320.png",
"outputs/home-sectors-20261023/catalogue-390.png",
"outputs/home-sectors-20261023/catalogue-768.png",
"outputs/home-sectors-20261023/fallback-all.png",
"outputs/home-sectors-20261023/fallback-primary.png",
"outputs/home-sectors-20261023/home-sectors-1024.png",
"outputs/home-sectors-20261023/home-sectors-1440.png",
"outputs/home-sectors-20261023/home-sectors-1920.png",
"outputs/home-sectors-20261023/home-sectors-320.png",
"outputs/home-sectors-20261023/home-sectors-390.png",
"outputs/home-sectors-20261023/home-sectors-768.png",
"outputs/home-sectors-20261023/homepage-1440.png"
],
"existingFrontendTests": {
"command": "node --test tests/frontend/portal-api.test.mjs tests/frontend/portal-navigation.test.mjs",
"passed": 20
},
"types": {
"command": "npm run types:check",
"exitCode": 0
},
"lint": {
"exitCode": 0
},
"build": {
"command": "npm run build",
"exitCode": 0,
"assets": {
"resources/js/pages/PortalInvestidor.tsx": "assets/PortalInvestidor-Q1OJxvfZ.js",
"resources/js/pages/portal/services.tsx": "assets/services-DiuG4Zkv.js"
},
"log": "outputs/home-sectors-20261023/build-local.log"
}
},
"scope": {
"appliedLocally": true,
"databaseChanged": false,
"migrationsRun": false,
"businessRulesChanged": false,
"routesChanged": false,
"sourceProjectChanged": false,
"newDependencies": false,
"externalDeployment": false
},
"limits": "Interface e navegação exercitadas com API e páginas públicas em fixtures; não equivale a demonstração integral dos workflows operacionais ou de critérios mais amplos da matriz.",
"matrixReferences": [
"MASTER-efd550fd-0104",
"MASTER-9f5719c8-0077"
]
}
@@ -0,0 +1,406 @@
{
"date": "2026-10-23",
"decision": "Pedido expresso da Tempo: analisar e acrescentar imagens adequadas exclusivamente aos três cartões de Como Investir.",
"analysisAndPlan": "docs/investmoz/public-portal-sections.md#fotografias-nas-etapas-de-como-investir--23102026",
"source": {
"type": "Fotografias ilustrativas geradas por IA, sem atribuição a pessoas, instituições, locais ou projectos reais.",
"tool": "image_gen, modo integrado",
"skill": "C:/Users/jorge/.codex/skills/.system/imagegen/SKILL.md",
"externalPhotographsUsed": false
},
"images": [
{
"key": "explorar",
"prompt": "Use case: photorealistic-natural. Asset for a small navigation card on a Mozambique investor portal. Create one individual photorealistic editorial photograph, horizontal 16:9, professional restrained style, natural soft daylight, realistic skin and materials, neutral colors, documentary composition readable at 350px wide. Illustration of a plausible setting, no identifiable named project or official building. No text, lettering, logos, watermarks, flags, maps, diagrams, graphic overlays, montage, or advertisement styling. Keep main subject inside the central 80% for responsive crop. Stage 1 EXPLORE opportunities, sector and territory: two Mozambican business professionals, a woman and man in smart casual clothing, standing outdoors by a quiet access road at a modest business park, naturally discussing a tablet held by the woman. Generic unbranded low warehouse buildings and green productive land visible in background, credible southern African environment. Eye-level medium-wide candid composition, both people three-quarter view, looking at tablet and surroundings rather than camera. Business evaluation and discovery, no construction work or hard hats.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-42eb9338-4350-40bf-9098-858c12994189.png",
"original": "outputs/investment-steps-20261023/originals/explorar.png",
"originalSha256": "a3c4ec1a0d2deaf87e0c8e765616c74ab70067eade9a862effce9e6befbbccb6",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-steps/explorar.webp",
"width": 960,
"height": 540,
"bytes": 52266,
"sha256": "c3e151ae649ce3cb66f5babc39978fa5803d320cacc95a27e798db4ec2d45a4c"
},
{
"file": "public/images/investment-steps/explorar-480.webp",
"width": 480,
"height": 270,
"bytes": 19312,
"sha256": "d3f383d9a58b23fada37472ea853f985aca8c3146123747d777b27704d32c7e0"
},
{
"file": "public/images/investment-steps/explorar-fallback.webp",
"width": 240,
"height": 135,
"bytes": 5300,
"sha256": "ba12ac4d2e81ac8a2c2e681667ccb08a3abfdba24de39e6e942d6378b700f2a9"
}
]
},
{
"key": "preparar",
"prompt": "Use case: photorealistic-natural. Asset for a small navigation card on a Mozambique investor portal. Create one individual photorealistic editorial photograph, horizontal 16:9, professional restrained style, natural soft daylight, realistic skin and materials, neutral colors, documentary composition readable at 350px wide. Illustration of a plausible setting, no identifiable named project or official building. No text, lettering, logos, watermarks, flags, maps, diagrams, graphic overlays, montage, or advertisement styling. Keep main subject inside the central 80% for responsive crop. Stage 2 PREPARE investment and organize documents: a Mozambican woman entrepreneur and a male business adviser seated at a light wood office desk, calmly reviewing and sorting a small tidy set of document folders and loose sheets beside a closed laptop. One points to a page while the other organizes a folder. No visible readable writing or personal data; papers at an angle. Bright modest professional meeting room, view from slightly above table height, hands and folders clear in foreground, natural candid interaction, realistic anatomy.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-5f07618a-1e86-42d9-aaf8-3acd0abf2164.png",
"original": "outputs/investment-steps-20261023/originals/preparar.png",
"originalSha256": "679a6875bb3ec79a9b71c27c9d785334376746be2bb305f461db9e19b0a0b7ea",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-steps/preparar.webp",
"width": 960,
"height": 540,
"bytes": 57942,
"sha256": "6de28042d3abce238a3680fb878779682f3672c3feb97b7e42b72e9a0a0ffbac"
},
{
"file": "public/images/investment-steps/preparar-480.webp",
"width": 480,
"height": 270,
"bytes": 19950,
"sha256": "671ba0fc207f85833b91027d3f6dad91599e95702cfea439e558906f92a2bfac"
},
{
"file": "public/images/investment-steps/preparar-fallback.webp",
"width": 240,
"height": 135,
"bytes": 6008,
"sha256": "645b34cd60b31fdc8e6586dedb71061c08add9ff985ce90909333b0bd1e0aa3e"
}
]
},
{
"key": "acompanhar",
"prompt": "Use case: photorealistic-natural. Asset for a small navigation card on a Mozambique investor portal. Create one individual photorealistic editorial photograph, horizontal 16:9, professional restrained style, natural soft daylight, realistic skin and materials, neutral colors, documentary composition readable at 350px wide. Illustration of a plausible setting, no identifiable named project or official building. No text, lettering, logos, watermarks, flags, maps, diagrams, graphic overlays, montage, or advertisement styling. Keep main subject inside the central 80% for responsive crop. Stage 3 FOLLOW UP submitted request and protocol: a Mozambican male entrepreneur seated at a tidy desk using a laptop to check an online application, one hand naturally on trackpad, a small closed document folder nearby. Three-quarter side view showing focused face and laptop, warm daylight from side window, modest contemporary office with soft greenery out of focus. Laptop screen is oblique and softly out of focus with only indistinct neutral interface rows, no readable text, official seal, logo or invented dashboard details. Convey calm digital self-service and progress checking, not a call centre or signing documents.",
"source": "C:\\Users\\jorge\\.codex\\generated_images\\01a167bd-3f26-71a0-8ec3-3f17519d2bfd\\exec-f896c5f8-19a0-49b0-af8e-0d12bfe4c7aa.png",
"original": "outputs/investment-steps-20261023/originals/acompanhar.png",
"originalSha256": "17d453445f2afb4c7641909950d2ecfb8276c433a4e28eeee94d0a57d1bdad46",
"originalDimensions": {
"width": 1672,
"height": 941
},
"derivatives": [
{
"file": "public/images/investment-steps/acompanhar.webp",
"width": 960,
"height": 540,
"bytes": 43722,
"sha256": "fe764c8161de36ee597f856face5341260670d1a28ab482bd01a0f5120ad0588"
},
{
"file": "public/images/investment-steps/acompanhar-480.webp",
"width": 480,
"height": 270,
"bytes": 16176,
"sha256": "79ceaecb0ef23c6729e43d04b7e91493d6784ea9f658d540dda3550702dc3623"
},
{
"file": "public/images/investment-steps/acompanhar-fallback.webp",
"width": 240,
"height": 135,
"bytes": 5298,
"sha256": "cd4530cfef4f19f23f640ceae59cfd73d0ee269643118b458f2a4748f5845fc6"
}
]
}
],
"cards": [
{
"title": "1. Explorar",
"description": "Identifique o sector, território e oportunidade.",
"href": "/oportunidades",
"image": "explorar"
},
{
"title": "2. Preparar",
"description": "Conheça o percurso e organize os documentos.",
"href": "/como-investir",
"image": "preparar"
},
{
"title": "3. Acompanhar",
"description": "Envie o pedido e acompanhe o protocolo.",
"href": "/balcao-virtual",
"image": "acompanhar"
}
],
"presentation": {
"component": "resources/js/components/investment-steps.tsx",
"homeIntegration": "resources/js/pages/PortalInvestidor.tsx",
"aspectRatio": "16:9",
"responsiveImages": [
960,
480
],
"fallback": "Variante própria de 240 px; se também falhar, espaço reservado com descrição acessível e Imagem indisponível.",
"columns": "Uma coluna abaixo de 768 px, três a partir de 768 px.",
"compactText": "16 px de preenchimento, sem altura mínima de texto.",
"accessibility": "Alt em português, nomes e descrições das âncoras, foco visível, dimensões reservadas e loading lazy.",
"headings": "Título vermelho partilhado da home preservado."
},
"verification": {
"browser": {
"results": [
{
"width": 320,
"dpr": 1,
"fail": "none",
"columns": 1,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
"lazy": "lazy",
"ratio": 1.7820512820512822
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
"lazy": "lazy",
"ratio": 1.7820512820512822
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
"lazy": "lazy",
"ratio": 1.7820512820512822
}
],
"layoutShift": false,
"overflow": false
},
{
"width": 390,
"dpr": 2,
"fail": "none",
"columns": 1,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-steps/explorar.webp",
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
"lazy": "lazy",
"ratio": 1.7755102040816326
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/preparar.webp",
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
"lazy": "lazy",
"ratio": 1.7755102040816326
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar.webp",
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
"lazy": "lazy",
"ratio": 1.7755102040816326
}
],
"layoutShift": false,
"overflow": false
},
{
"width": 768,
"dpr": 1,
"fail": "none",
"columns": 3,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
"lazy": "lazy",
"ratio": 1.7734375
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
"lazy": "lazy",
"ratio": 1.7734375
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
"lazy": "lazy",
"ratio": 1.7734375
}
],
"layoutShift": false,
"overflow": false
},
{
"width": 1024,
"dpr": 1,
"fail": "none",
"columns": 3,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
"lazy": "lazy",
"ratio": 1.7784090909090908
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
"lazy": "lazy",
"ratio": 1.7784090909090908
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
"lazy": "lazy",
"ratio": 1.7784090909090908
}
],
"layoutShift": false,
"overflow": false
},
{
"width": 1440,
"dpr": 2,
"fail": "none",
"columns": 3,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-steps/explorar.webp",
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
"lazy": "lazy",
"ratio": 1.775
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/preparar.webp",
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
"lazy": "lazy",
"ratio": 1.775
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar.webp",
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
"lazy": "lazy",
"ratio": 1.775
}
],
"layoutShift": false,
"overflow": false
},
{
"width": 1920,
"dpr": 1,
"fail": "none",
"columns": 3,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-480.webp",
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
"lazy": "lazy",
"ratio": 1.775
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-480.webp",
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
"lazy": "lazy",
"ratio": 1.775
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-480.webp",
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
"lazy": "lazy",
"ratio": 1.775
}
],
"layoutShift": false,
"overflow": false
},
{
"width": 390,
"dpr": 2,
"fail": "primary",
"columns": 1,
"photos": [
{
"src": "http://127.0.0.1:5174/images/investment-steps/explorar-fallback.webp",
"alt": "Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.",
"lazy": "lazy",
"ratio": 1.7755102040816326
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/preparar-fallback.webp",
"alt": "Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.",
"lazy": "lazy",
"ratio": 1.7755102040816326
},
{
"src": "http://127.0.0.1:5174/images/investment-steps/acompanhar-fallback.webp",
"alt": "Empreendedor consulta um pedido no computador portátil numa secretária de escritório.",
"lazy": "lazy",
"ratio": 1.7755102040816326
}
],
"layoutShift": false,
"overflow": false
},
{
"width": 390,
"dpr": 2,
"fail": "all",
"columns": 1,
"photos": [],
"layoutShift": false,
"overflow": false
}
],
"errors": [],
"navigation": [
"/oportunidades",
"/como-investir",
"/balcao-virtual"
],
"databaseAccess": false
},
"script": "outputs/investment-steps-20261023/check.mjs",
"screenshots": [
"outputs/investment-steps-20261023/cards-1024-none.png",
"outputs/investment-steps-20261023/cards-1440-none.png",
"outputs/investment-steps-20261023/cards-1920-none.png",
"outputs/investment-steps-20261023/cards-320-none.png",
"outputs/investment-steps-20261023/cards-390-all.png",
"outputs/investment-steps-20261023/cards-390-none.png",
"outputs/investment-steps-20261023/cards-390-primary.png",
"outputs/investment-steps-20261023/cards-768-none.png"
],
"lint": {
"exitCode": 0
},
"types": {
"command": "npm run types:check",
"exitCode": 0,
"log": "outputs/investment-steps-20261023/types.log"
},
"build": {
"command": "npm run build",
"exitCode": 0,
"homeAsset": "assets/PortalInvestidor-C1QTZ3-t.js",
"log": "outputs/investment-steps-20261023/build-local.log"
}
},
"scope": {
"appliedLocally": true,
"otherSectionsChanged": false,
"supportAndFooterChanged": false,
"databaseAccess": false,
"businessRulesChanged": false,
"routesChanged": false,
"newDependencies": false,
"externalDeployment": false
},
"matrixReferences": [
"MASTER-efd550fd-0104"
],
"limits": "Componentes reais com API sintética e destinos interceptados para verificar a navegação; não demonstra os workflows operacionais completos nem encerra o critério mais amplo da matriz."
}
@@ -2151,3 +2151,79 @@ Autorização expressa da Tempo executada. Main passou de `57fc9148` por avanço
**Estado fiscal preservado:** nenhuma publicação/activação de nova regra e nenhuma operação na base activa. O consumidor IVA geral previamente autorizado manteve a mesma disponibilidade, cobertura2026 e mensagem antes/depois. As exclusões sectoriais, forma indirecta/dimensão monetária não determinada, benefícios territoriais e apuramento fiscal completo continuam explícitos e não bloqueiam o lote procedimental concluído. **Estado fiscal preservado:** nenhuma publicação/activação de nova regra e nenhuma operação na base activa. O consumidor IVA geral previamente autorizado manteve a mesma disponibilidade, cobertura2026 e mensagem antes/depois. As exclusões sectoriais, forma indirecta/dimensão monetária não determinada, benefícios territoriais e apuramento fiscal completo continuam explícitos e não bloqueiam o lote procedimental concluído.
**Suspensão/recuperação:** desligar somente a chave do novo percurso e reconstruir cache/reiniciar graciosamente os workers mantém dossiers, documentos, respostas, versões, relatórios e históricos. Para reverter configuração, usar o valor anterior apenas depois de conferir o hash actual e preservar alterações posteriores; não substituir todo o .env sem conferir concorrência. A reversão de código/build segue o procedimento de releases já existente, sem restaurar dados antigos. A release anterior foi efectivamente conservada na primeira tentativa recusada. Recibo completo local em `outputs/investmoz-adaptive-path-delivery-20261022/delivery-receipt.json`; a presente actualização documental fica na branch de registo, sem novo push main ou nova disponibilização desnecessária. **Suspensão/recuperação:** desligar somente a chave do novo percurso e reconstruir cache/reiniciar graciosamente os workers mantém dossiers, documentos, respostas, versões, relatórios e históricos. Para reverter configuração, usar o valor anterior apenas depois de conferir o hash actual e preservar alterações posteriores; não substituir todo o .env sem conferir concorrência. A reversão de código/build segue o procedimento de releases já existente, sem restaurar dados antigos. A release anterior foi efectivamente conservada na primeira tentativa recusada. Recibo completo local em `outputs/investmoz-adaptive-path-delivery-20261022/delivery-receipt.json`; a presente actualização documental fica na branch de registo, sem novo push main ou nova disponibilização desnecessária.
## Revis?o das 30 fichas de Inhambane e cat?logo vazio ? 22/10/2026
Leitura remota autenticada, transac??o READ ONLY, base teste_investidor: 30 oportunidades em draft; zero publicadas em toda a base. As consultas independentes de Cabo Delgado e Inhambane e a consulta exacta Inhambane/Vilankulo devolveram zero sem falha de consulta. A alega??o de oportunidades publicadas de Cabo Delgado n?o se confirma neste destino; n?o inventar associa??es para preencher a lista.
As 30 localiza??es permanecem nos recursos privados opportunity_location_drafts, referidos no cadastro can?nico; os campos e v?nculos p?blicos ainda n?o s?o a projec??o dessas fichas. A inexist?ncia desses v?nculos p?blicos em rascunhos n?o prova perda da localiza??o. Na publica??o, projectar somente a abrang?ncia documentada e conferir a pesquisa territorial.
Decis?o Tempo nesta conversa: incompletude e autoriza??es necess?rias ? execu??o n?o s?o impedimentos autom?ticos ? divulga??o como oportunidade em prepara??o. Proposta: divulgar resumos das 30 fichas em prepara??o com fonte, edi??o, data-base e lacunas vis?veis; n?o declarar financiamento, terreno, licen?as, promotor autorizado ou execu??o confirmados. Valores hist?ricos, agregados e divergentes devem ser identificados sem somas indevidas. Nenhum impedimento concreto de divulga??o do resumo foi demonstrado nesta leitura. Isto n?o declara o conte?do privado integral public?vel: originais, contactos e evid?ncias continuam separados. N?o houve publica??o, altera??o de pap?is ou escrita remota.
Prepara??o por ficha: outputs/investmoz-territory-recovery-20261022/publication-review.json (30 identidades reais, localiza??o privada, lacunas e valores). Evid?ncia: read-catalogue-remote.py e remote-read.log no mesmo direct?rio. A tabela hist?rica de lacunas de prepara??o ? reutilizada, sem a converter em bloqueios legais. A prepara??o t?cnica do fluxo de publica??o ainda deve reconciliar essas condi??es com o contrato existente; n?o marcar publica??o como pronta ou executada.
O URL recebido ? do cat?logo/iniciar por territ?rio, n?o do dossier afectado. N?o permite ler o contexto inicial, a altera??o e a ?ltima ac??o desse processo. A falha da pr?via territorial e do t?rmino sem resposta continua aberta e ainda n?o foi reproduzida no dossier real; n?o encerrar pela disponibiliza??o anterior ou por esta leitura de cat?logo.
<!-- search-territory-recovery-20261022 -->
## Continuidade territorial da pesquisa — correcção em QA, 22/10/2026
Esclarecimento da Tempo: o percurso reportado foi navegação pública entre carteira e catálogo, sem clicar em iniciar/continuar ideia. Não existe evidência de alteração de um dossier pessoal neste caso. Retira-se a exigência de URL do dossier e de confirmação de impacto; a alteração é de filtros de pesquisa.
Causa verificada: ligações da carteira para oportunidades e zonas e ligações dos menus públicos usavam destinos sem província/distrito. O contexto transportado para detalhes por `catalogue_query` também não acompanhava as ligações cruzadas. No ecrã de zonas, os parâmetros de exportação/detalhe omitiam a hierarquia territorial.
Correcção: `searchTerritoryHref` transporta exclusivamente os quatro níveis territoriais na URL entre carteira, oportunidades, zonas e educação, incluindo os respectivos detalhes. Reutiliza o `catalogue_query` existente e preserva os filtros próprios do destino. Uma selecção explícita de outro ascendente não herda descendentes incompatíveis. Sem armazenamento global, mistura de contas ou alteração de dossiers. Menus, navegação relacionada, breadcrumbs e ligações cruzadas usam a mesma função. O selector partilhado mantém a limpeza dos descendentes; não há confirmação adicional para pesquisar.
Verificação dirigida: seis testes Node (incluindo o selector partilhado), TypeScript e build isolado. No navegador QA: carteira Cabo Delgado → selecção Inhambane/Vilankulo → pesquisar → catálogo com ambos os campos preenchidos; recarregamento e regresso preservam a selecção; zonas herdam os dois níveis; mudar para Cabo Delgado limpa Vilankulo. Contagem zero, filtros activos e mensagem de ausência coerentes na base QA consultada. Não foram repetidos cálculos ou exportadores fiscais nem publicados registos para produzir resultados artificiais.
Provas: `outputs/investmoz-territory-recovery-20261022/before-carteira.png` e `after-catalogue.png` no workspace de entrega; testes em `tests/frontend/search-territory.test.mjs` e `territory-path.test.mjs`; logs QA `outputs/territory-types.log` e `territory-build.log`. O router privado QA selecciona o build isolado; não integra a candidata.
Entrega limitada a branch/QA. A homologação não foi alterada por esta correcção. Publicação das 30 fichas de Inhambane permanece separada: revisão por ficha preparada, nenhuma publicação executada; ainda por reconciliar a preparação técnica da divulgação em preparação com o fluxo existente. A correcção da pesquisa não depende dessa publicação.
## Inhambane — divulgação dos 30 resumos executada, 22/10/2026
Decisão expressa da Tempo na conversa: «publicar» os 30 resumos como oportunidades em preparação; responsável confirmado `nala@tempo.co.mz`. A conta concluiu autenticação normal com MFA. A primeira ligação abriu indevidamente `/management/opportunities`, que exige administração geral; `/minhas-oportunidades` estava acessível e foi confirmado no navegador. A ligação SSH estava pronta; não foi necessário pedir outra autenticação.
Executada uma operação privada de dados, limitada às 30 identidades e aos hashes das versões autorizadas, sob a decisão de divulgação da Tempo e a sessão real de Nala. Não se atribuiu papel geral de Publicador, administração, revisões técnicas, aprovação jurídica ou autorização de execução. O fluxo genérico de aprovação de projectos completos permaneceu intacto. A publicação promocional tem finalidade própria registada em `workflow_context.publication.purpose=promotional_preparation`; não equivale à conclusão desse fluxo. Cada operação registou responsável, conteúdo anterior, hash do lote e finalidade no histórico restrito.
O executor preserva o cadastro canónico privado, proprietário e organização, originais e contactos. A projecção pública contém título, resumo, limitações, fonte/edição e indicação «Em preparação». Montantes não confirmados não são apresentados como investimento disponível; os dados técnicos/financeiros históricos são assinalados como tal. A conferência editorial retirou instruções internas dos resumos, usando as limitações da tabela aprovada na conversa.
Detectado e resolvido o vínculo territorial em falta: as localizações privadas mencionavam Vilankulos, mas só tinham província estruturada. O cadastro público confirma MUNICÍPIO DE VILANKULO → posto VILANKULO → distrito VILANKULO → Inhambane. Foram associados ao distrito apenas 15 registos cuja localização documental menciona expressamente Vilankulos, incluindo programas de abrangência múltipla. Não se inferiu implantação, coordenadas ou relação por proximidade. As restantes fichas conservam a abrangência documentada; não foram associadas indiscriminadamente ao distrito.
Verificação pública sem sessão da aplicação: **30 resultados em Inhambane, 15 em Vilankulo**, todos com indicação «Em preparação», limitações e sem `management_draft`/`workflow_context` na resposta pública. No navegador foram conferidos catálogo, contagem e a ficha do Hotel Boutique no Terreno INATUR, incluindo a ausência de confirmação da disponibilidade do terreno/concessão. Foram reutilizadas as provas anteriores; o ensaio novo em base QA isolada conferiu publicação, alteração editorial, repetição sem duplicados, preservação do cadastro privado, recusa de alteração concorrente e associação exacta das 15 referências. Todos os dados sintéticos foram revertidos por rollback em QA; nenhum actor QA foi transportado.
Backup fresco em formato PostgreSQL custom antes de cada revisão de dados, protegido fora da raiz pública; catálogo de restauro verificado e provas anteriores de restauro reutilizadas. A leitura final confirmou as mesmas 30 identidades, cadastro privado/proprietários preservados, zero novos papéis Publicador e administração geral de Nala mantida desligada. A reversão deve partir do backup e do `before_data` restrito, comparar a versão actual e restaurar apenas as projecções/vínculos afectados, preservando edições posteriores; não restaurar toda a base sobre alterações concorrentes. Uma suspensão deve retirar os resumos do público, mantendo cadastro, relações e histórico, como operação expressamente registada; não apagar as fichas.
Recibos no workspace de entrega: `outputs/investmoz-territory-recovery-20261022/public-verification.json`, `integrity-receipt.log`, `publication-final-result.log`, `published-vilankulo-results.png`; executores privados e manifestos no mesmo directório, arquivados fora da raiz pública no destino. Hash final do lote: `d0a1146a7113aabafc3c2d08c0bdc17d12fc8a51606ba9ff7e79b154556d6e08`.
Revisão efectivamente servida: `042ffbde44cac27704d6f8b7ec25b525a42e3575`. Nenhuma instalação Git, migration ou activação fiscal foi executada nesta publicação. A candidata `9ac623a4` de continuidade dos filtros permanece separada de `main` e pronta para revisão de integração. A divulgação das 30 fichas deixa de estar pendente; os estudos, financiamento e autorizações de execução continuam como limitações explícitas das oportunidades.
## Integração territorial e contacto comercial — 22/10/2026
Tempo autorizou integrar `9ac623a4` e pediu conferir a revisão servida. `57fc9148` é antepassado de `042ffbde`, e não uma revisão posterior: os hashes não têm ordem cronológica. A conferência remota comparou 685 ficheiros de aplicação/configuração com `042ffbde`, sem diferenças; o manifesto de build também coincide com o identificador publicado. O histórico de instalação confirma a passagem de `57fc9148` para `042ffbde`. Não se identificou reposição de código/build ou desaparecimento da entrega do simulador.
Integração Git por avanço directo até `1ec31856`, incluindo `9ac623a4` e recibos documentais. A primeira tentativa automática preservou a revisão anterior por falha Node: importação sem extensão em `catalogue-context.ts`. Corrigida a referência explícita `.ts`; passaram os dez testes dirigidos do módulo afectado e da continuidade territorial. Não se repetiram os percursos aceites nem a publicação de oportunidades.
Decisão expressa da Tempo: o rodapé deve apresentar **comercial@tempo.co.mz**, porque o contacto comercial com a instituição é feito por esse endereço. Actualizado o valor por omissão de `portal.institutional_contact_email`. Na homologação existia uma sobreposição explícita `PORTAL_INSTITUTIONAL_CONTACT_EMAIL=info@tempo.co.mz`: alterada exclusivamente essa chave para `comercial@tempo.co.mz`, com backup privado íntegro, propriedade/permissões preservadas e reconstrução da cache de configuração. A apresentação e o `mailto:` utilizam a mesma configuração existente; não houve envio de email.
Recibos de destino e integração: `outputs/investmoz-territory-recovery-20261022/revision-before-integration.log`, `footer-email-receipt.log` e recibo final de instalação no mesmo directório do workspace de entrega. A confirmação final deve identificar a revisão efectivamente instalada pelo processo automático, mantendo os 30 resumos e as regras fiscais existentes.
## Selectores especializados do catálogo — QA, 22/10/2026
Pedido da Tempo: explorar estruturas públicas independentemente da existência de oportunidades, sem inventar associações nem divulgar registos privados. A homologação em `7b1c3579` já devolve e apresenta **Parque Industrial de Balama** e **Parque Industrial de Montepuez** no selector de Cabo Delgado; “Todos” é o valor inicial, não uma prova de ausência das opções. A API devolve duas zonas nessa província e oito no âmbito nacional. A base QA local tem outro conjunto de dados: não continha parques públicos ligados a essa província. Esta diferença de dados não é uma regressão demonstrada do selector da homologação.
Falhas verificadas no código: actividades e cadeias eram reduzidas às oportunidades publicadas encontradas no território/sector; estruturas públicas podiam depender da existência adicional de uma ficha publicada da carteira; os selectores vazios só apresentavam “Todos”; a consulta da ficha de um parque sem oportunidades não era apresentada no resultado vazio da grelha.
Correcção na branch `codex/catalogue-specialised-selectors-QA`: opções provenientes dos cadastros públicos existentes, preservando os critérios de consulta e os vínculos territoriais. Estruturas com território principal documentado não dependem de uma oportunidade nem de uma ficha adicional da carteira. Mantêm-se os vínculos territoriais já resolvidos pelas fichas publicadas. Cadeias acompanham os clusters públicos do âmbito seleccionado. Actividades são o catálogo público de classificação, explicitamente separado da disponibilidade local de investimentos; não se inventa uma associação territorial ou sectorial. Os oito selectores apresentam contagem ou explicação de ausência. Uma selecção indisponível permanece identificada, com possibilidade de remoção, em vez de parecer “Todos”.
Quando a estrutura seleccionada não tem correspondências, o resultado informa “Sem oportunidades publicadas associadas com estes filtros” e mantém ligação à ficha pública existente, em qualquer vista. Um registo mestre sem ficha pública detalhada é identificado como tal; não se cria uma ficha ou publicação automaticamente. A pesquisa continua a combinar todos os filtros, sem alargamento automático ou atribuição de benefícios. A alteração territorial mantém a limpeza dos níveis e selecções incompatíveis já implementada.
Provas novas, sem repetir os percursos anteriormente aceites: Cabo Delgado com dois parques sintéticos identificados; selecção de Balama, zero oportunidades, abertura da ficha, regresso e recarregamento com selecção conservada; limpeza; Nampula com parque sintético Topuito; ausência de restrição territorial com ambos os conjuntos disponíveis e selecção anterior limpa. Fixtures limitadas à base `simulator_fiscal_delta_20261021_test`, porta 55441, excluídas do Git e da disponibilização. Testes `CatalogueSelectorReferencesTest`: três testes, 27 verificações, transacções revertidas, incluindo exclusão de privados/outro território, catálogo de actividades independente dos resultados, estruturas/cadeia sem oportunidades ou fichas adicionais. `npm run types:check` e build QA passaram. Provas locais: `outputs/catalogue-selectors-20261022/audit.json`, `qa-balama.png`, `qa-nampula.png`, `qa-national.png` e logs de build/tipos no mesmo directório.
Diagnóstico separado do mapa: API pública de Cabo Delgado devolve território cadastrado, zero limites e nenhuma geometria acessível. Leitura SSH em transacção **READ ONLY** confirmou zero linhas em `geo_geometries` para essa província; neste caso não é uma camada existente ocultada pelo perfil. Não foram criadas coordenadas, geometrias, vínculos ou permissões. Este diagnóstico não equivale à implementação dos limites administrativos.
Integração pendente da revisão prevista: comparar com `origin/main`, preservar alterações concorrentes e integrar pelo processo Git automático existente. Não há migrations, publicação de oportunidades, activação fiscal ou transporte das fixtures. Conferir apenas o delta e a revisão servida depois de autorizada a integração; não repetir as provas já aceites.
### Revisão dirigida da interacção do selector — 22/10/2026
Na candidata `1d921c9d`, ensaio pelo navegador Edge em QA, sem usar `selectOption` como prova desta interacção: clique no campo/seta deu foco; teclado `Alt+Down`, seta para cima e Enter mudou a selecção de Montepuez para Balama, actualizando o filtro e a ligação à ficha. Prova local `outputs/catalogue-selectors-20261022/qa-keyboard-balama.png`. Dados sintéticos explicitamente identificados como QA.
A ferramenta não observou o menu nativo aberto pelo rato; a tentativa de clicar na opção nativa devolveu opção não visível. Assim, a escolha completa **apenas pelo rato permanece não demonstrada** nesta revisão. Trata-se de limitação de observação/interacção da ferramenta, sem evidência suficiente para atribuir falha ao portal. A presença das opções na API/DOM e o uso anterior de `selectOption` não encerram esse ponto. Sem alteração funcional, repetição dos restantes testes ou integração em `main`; geometrias continuam como pendência distinta.
### Decisão de integração — 22/10/2026
A Tempo encerrou a revisão de `1d921c9d` com as provas existentes e autorizou integrar a candidata e o registo documental `916819eb`. A interacção exclusivamente pelo rato permanece não observada pela ferramenta, **sem carácter bloqueante**; não constitui falha comprovada do portal, não exige substituir o selector nem repetir ensaios. A ausência de geometrias administrativas de Cabo Delgado permanece independente. Executar o processo Git automático existente, preservando alterações concorrentes; não transportar fixtures QA, publicar dados ou activar regras fiscais.
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

+16
View File
@@ -9,6 +9,22 @@
@import './tempo-header.css'; @import './tempo-header.css';
@keyframes portal-hero-caret {
50% {
opacity: 0;
}
}
.portal-hero-caret {
animation: portal-hero-caret 0.8s step-end infinite;
}
@media (prefers-reduced-motion: reduce) {
.portal-hero-caret {
animation: none;
}
}
.tempo-dropdown { .tempo-dropdown {
z-index: 60; z-index: 60;
border: 1px solid #e2e8f0; border: 1px solid #e2e8f0;
@@ -1,4 +1,5 @@
import { Link, usePage } from '@inertiajs/react'; import { Link, usePage } from '@inertiajs/react';
import { searchTerritoryHref } from '@/lib/search-territory';
export default function CatalogueNavigation({ export default function CatalogueNavigation({
dimensionUrl, dimensionUrl,
}: { }: {
@@ -21,7 +22,7 @@ export default function CatalogueNavigation({
) )
return dimensionUrl(u.searchParams.get('dimension')!); return dimensionUrl(u.searchParams.get('dimension')!);
if (context) u.searchParams.set('context', context); if (context) u.searchParams.set('context', context);
return u.pathname + u.search; return searchTerritoryHref(u.pathname + u.search, url);
}; };
const sections = { const sections = {
'Enquadramento e filtros': [ 'Enquadramento e filtros': [
@@ -0,0 +1,175 @@
import { useState } from 'react';
import { ArrowRight } from 'lucide-react';
import {
HOME_SECTION,
HOME_SECTION_HEADING,
PORTAL_MORE_LINK,
} from '@/lib/portal-presentation';
const contexts = [
{
key: 'clusters',
href: '/clusters',
title: 'Clusters',
description: 'Cadeias de valor e lacunas produtivas.',
image: 'clusters-agroindustria',
alt: 'Triagem de produtos agrícolas numa unidade de transformação com área de cultivo ao fundo.',
},
{
key: 'corredores',
href: '/corredores',
title: 'Corredores',
description: 'Territórios, logística e conexões.',
image: 'corredores-logisticos-v2',
alt: 'Terminal de mercadorias junto à água, com contentores, uma grua e vias de acesso.',
},
{
key: 'projectos',
href: '/projectos-ancora',
title: 'Projectos âncora',
description: 'Projectos estruturantes e relações.',
image: 'projectos-ancora',
alt: 'Equipa de engenharia acompanha o planeamento de uma instalação de energia solar.',
},
{
key: 'educacao',
href: '/educacao',
title: 'Educação',
description: 'Investimentos em competências e formação.',
image: 'educacao-formacao',
alt: 'Jovens desenvolvem competências de electrónica e informática numa aula de formação técnica.',
},
{
key: 'documentos',
href: '/documentos',
title: 'Documentos e Formulários',
description:
'Legislação, procedimentos, formulários e materiais de apoio.',
image: 'documentos-formularios',
alt: 'Profissional analisa documentação empresarial organizada numa secretária de escritório.',
},
];
function ContextImage({
image,
alt,
preview,
}: {
image: string;
alt: string;
preview: boolean;
}) {
const [fallback, setFallback] = useState(0);
const base = `/images/investment-context/${image}`;
return (
<div className="aspect-video w-full shrink-0 overflow-hidden bg-slate-100">
{fallback < 2 ? (
<img
src={`${base}${fallback ? '-fallback' : ''}.webp`}
srcSet={
fallback
? undefined
: `${base}-480.webp 480w, ${base}.webp 960w`
}
sizes={
preview
? '(min-width: 1152px) 266px, (min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw'
: '(min-width: 1152px) 357px, (min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw'
}
alt={alt}
width={960}
height={540}
loading="lazy"
decoding="async"
className="h-full w-full object-cover object-center"
onError={() =>
setFallback((current) => Math.min(current + 1, 2))
}
/>
) : (
<span
role="img"
aria-label={alt}
className="flex h-full items-center justify-center px-5 text-center text-sm text-slate-600"
>
Imagem indisponível
</span>
)}
</div>
);
}
export function InvestmentContextGrid({
preview = false,
}: {
preview?: boolean;
}) {
const visibleContexts = preview ? contexts.slice(0, 4) : contexts;
return (
<nav
aria-label="Contextos de investimento"
className={
preview
? 'grid gap-4 sm:grid-cols-2 lg:grid-cols-4'
: 'grid gap-5 sm:grid-cols-2 lg:grid-cols-3'
}
>
{visibleContexts.map((context) => (
<a
key={context.key}
href={context.href}
aria-labelledby={`context-${context.key}-title`}
aria-describedby={`context-${context.key}-description`}
className="flex h-full min-w-0 flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm transition-colors hover:border-blue-700 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-700"
>
<ContextImage
image={context.image}
alt={context.alt}
preview={preview}
/>
<div className="flex flex-1 flex-col gap-1.5 p-4">
<h3
id={`context-${context.key}-title`}
className="text-lg leading-6 font-bold text-slate-900"
>
{context.title}
</h3>
<p
id={`context-${context.key}-description`}
className="text-sm leading-5 text-slate-600"
>
{context.description}
</p>
</div>
</a>
))}
</nav>
);
}
export default function InvestmentContextCards() {
return (
<section
aria-labelledby="investment-context-heading"
className={`${HOME_SECTION} space-y-4`}
>
<h2
id="investment-context-heading"
className={HOME_SECTION_HEADING}
>
Encontre o contexto do seu investimento
</h2>
<InvestmentContextGrid preview />
<div className="flex justify-center">
<a
href="/contextos-de-investimento"
className={PORTAL_MORE_LINK}
>
Ver mais <ArrowRight size={14} aria-hidden="true" />
</a>
</div>
</section>
);
}
@@ -0,0 +1,104 @@
import { useState } from 'react';
import { HOME_SECTION, HOME_SECTION_HEADING } from '@/lib/portal-presentation';
const steps = [
{
key: 'explorar',
title: '1. Explorar',
description: 'Identifique o sector, território e oportunidade.',
href: '/oportunidades',
alt: 'Dois profissionais avaliam uma oportunidade de investimento no terreno com apoio de um tablet.',
},
{
key: 'preparar',
title: '2. Preparar',
description: 'Conheça o percurso e organize os documentos.',
href: '/como-investir',
alt: 'Empreendedora e consultor analisam documentos e organizam pastas numa reunião de preparação.',
},
{
key: 'acompanhar',
title: '3. Acompanhar',
description: 'Envie o pedido e acompanhe o protocolo.',
href: '/balcao-virtual',
alt: 'Empreendedor consulta um pedido no computador portátil numa secretária de escritório.',
},
];
function StepImage({ name, alt }: { name: string; alt: string }) {
const [fallback, setFallback] = useState(0);
const base = `/images/investment-steps/${name}`;
return (
<div className="aspect-video w-full shrink-0 overflow-hidden bg-slate-100">
{fallback < 2 ? (
<img
src={`${base}${fallback ? '-fallback' : ''}.webp`}
srcSet={
fallback
? undefined
: `${base}-480.webp 480w, ${base}.webp 960w`
}
sizes="(min-width: 1152px) 357px, (min-width: 768px) 33vw, 100vw"
alt={alt}
width={960}
height={540}
loading="lazy"
decoding="async"
className="h-full w-full object-cover object-center"
onError={() =>
setFallback((current) => Math.min(current + 1, 2))
}
/>
) : (
<span
role="img"
aria-label={alt}
className="flex h-full items-center justify-center px-4 text-center text-sm text-slate-600"
>
Imagem indisponível
</span>
)}
</div>
);
}
export default function InvestmentSteps() {
return (
<section
aria-labelledby="investment-steps-heading"
className={`${HOME_SECTION} space-y-4`}
>
<h2 id="investment-steps-heading" className={HOME_SECTION_HEADING}>
Como Investir
</h2>
<div className="grid gap-5 md:grid-cols-3">
{steps.map((step) => (
<a
key={step.key}
href={step.href}
aria-labelledby={`step-${step.key}-title`}
aria-describedby={`step-${step.key}-description`}
className="flex h-full min-w-0 flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm transition-colors hover:border-[#ed1c24] focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#ed1c24]"
>
<StepImage name={step.key} alt={step.alt} />
<div className="space-y-1.5 p-4">
<h3
id={`step-${step.key}-title`}
className="text-lg leading-6 font-bold text-slate-900"
>
{step.title}
</h3>
<p
id={`step-${step.key}-description`}
className="text-sm leading-5 text-slate-600"
>
{step.description}
</p>
</div>
</a>
))}
</div>
</section>
);
}
@@ -48,6 +48,16 @@ const labels: Record<string, string> = {
authority_id: 'Entidade', authority_id: 'Entidade',
publication_state: 'Critério herdado', publication_state: 'Critério herdado',
}; };
const specialisedEmpty: Record<string, string> = {
corridor_id: 'Não existem corredores públicos cadastrados para esta localização.',
cluster_id: 'Não existem clusters públicos cadastrados para esta localização.',
zee_id: 'Não existem ZEE públicas cadastradas para esta localização.',
zfi_id: 'Não existem ZFI públicas cadastradas para esta localização.',
park_id: 'Não existem parques industriais públicos cadastrados para esta localização.',
project_id: 'Não existem projectos âncora públicos cadastrados para esta localização.',
subsector_id: 'Não existem actividades disponíveis no catálogo público.',
chain_id: 'Não existem cadeias de valor públicas cadastradas para esta localização.',
};
export default function OpportunitySearchFilters({ export default function OpportunitySearchFilters({
data, data,
references, references,
@@ -75,6 +85,9 @@ export default function OpportunitySearchFilters({
<Field key={key} label={labels[key]}> <Field key={key} label={labels[key]}>
<select <select
className={input} className={input}
aria-label={labels[key]}
aria-describedby={specialisedEmpty[key] ? `filter-help-${key}` : undefined}
disabled={Boolean(specialisedEmpty[key]) && choices.length === 0 && !data[key]}
value={String(data[key] ?? '')} value={String(data[key] ?? '')}
onChange={(e) => onChange={(e) =>
change({ change({
@@ -86,12 +99,23 @@ export default function OpportunitySearchFilters({
} }
> >
<option value="">Todos</option> <option value="">Todos</option>
{data[key] && !choices.some((o) => o.value === String(data[key])) && (
<option value={String(data[key])}>Selecção indisponível neste contexto — remova o filtro</option>
)}
{choices.map((o) => ( {choices.map((o) => (
<option key={o.value} value={o.value}> <option key={o.value} value={o.value}>
{o.label} {o.label}
</option> </option>
))} ))}
</select> </select>
{specialisedEmpty[key] && (
<p id={`filter-help-${key}`} className="text-sm text-slate-600">
{choices.length === 0
? specialisedEmpty[key]
: `${choices.length} opções públicas disponíveis, mesmo sem oportunidades associadas.`}
{key === 'subsector_id' && choices.length > 0 && ' Classificação de actividades; não confirma a existência de investimentos nesta localização.'}
</p>
)}
{hint && <p className="text-sm text-slate-600">{hint}</p>} {hint && <p className="text-sm text-slate-600">{hint}</p>}
</Field> </Field>
); );
@@ -1,4 +1,5 @@
import PortalProductIdentity from '@/components/portal-product-identity'; import PortalProductIdentity from '@/components/portal-product-identity';
import { searchTerritoryHref } from '@/lib/search-territory';
import { Link, router, usePage } from '@inertiajs/react'; import { Link, router, usePage } from '@inertiajs/react';
import { import {
ChevronDown, ChevronDown,
@@ -110,7 +111,7 @@ export function PortalGroupedMenu() {
className="tempo-menu-item" className="tempo-menu-item"
> >
<Link <Link
href={item.href!} href={searchTerritoryHref(item.href!, url)}
aria-current={ aria-current={
currentItem === item.id ? 'page' : undefined currentItem === item.id ? 'page' : undefined
} }
+305
View File
@@ -0,0 +1,305 @@
import { ArrowRight, Search } from 'lucide-react';
import { useEffect, useState } from 'react';
import type { FormEvent } from 'react';
import type { HomeResponse } from '@/lib/portal-api';
const slides = [
{
image: '/images/hero/hero-1.webp',
mobile: '/images/hero/hero-1-mobile.webp',
},
{
image: '/images/hero/hero-3.webp',
mobile: '/images/hero/hero-3-mobile.webp',
},
];
const heroTitle = 'INVISTA EM MOÇAMBIQUE';
const heroSubtitle =
'Transforme informação em decisões e ideias em negócios reais.';
const typingStart = 250;
const titleStep = 50;
const subtitleStep = 28;
const subtitleStart = typingStart + heroTitle.length * titleStep + 150;
const typingDuration = subtitleStart + heroSubtitle.length * subtitleStep;
function TypewriterLine({
text,
visibleText,
caret = false,
running,
}: {
text: string;
visibleText: string;
caret?: boolean;
running: boolean;
}) {
return (
<span className="grid">
<span className="sr-only">{text}</span>
{/* Reserve the final wrapping before the first character appears. */}
<span
aria-hidden="true"
className="invisible col-start-1 row-start-1"
>
{text}
{caret && <span className="ml-1 inline-block w-0 border-l-2" />}
</span>
<span
aria-hidden="true"
data-hero-typed
className="col-start-1 row-start-1"
>
{visibleText}
{caret && (
<span
className="portal-hero-caret ml-1 inline-block h-[0.85em] w-0 border-l-2 border-white"
style={{
animationPlayState: running ? 'running' : 'paused',
}}
/>
)}
</span>
</span>
);
}
function HeroAnimatedCopy({
reducedMotion,
running,
}: {
reducedMotion: boolean;
running: boolean;
}) {
const [elapsed, setElapsed] = useState(0);
const complete = elapsed >= typingDuration;
useEffect(() => {
if (reducedMotion || !running || complete) return;
const timer = window.setInterval(() => {
setElapsed((current) => Math.min(current + 25, typingDuration));
}, 25);
return () => window.clearInterval(timer);
}, [reducedMotion, running, complete]);
const titleLength = Math.max(
0,
Math.floor((elapsed - typingStart) / titleStep),
);
const subtitleLength = Math.max(
0,
Math.floor((elapsed - subtitleStart) / subtitleStep),
);
return (
<>
<h1
id="portal-hero-title"
className="max-w-5xl text-3xl leading-tight font-semibold tracking-tight text-white sm:text-5xl lg:text-6xl"
>
<TypewriterLine
text={heroTitle}
visibleText={
reducedMotion
? heroTitle
: heroTitle.slice(0, titleLength)
}
caret={!reducedMotion}
running={running}
/>
</h1>
<p className="mt-5 max-w-3xl text-lg leading-relaxed font-medium text-white sm:text-2xl">
<TypewriterLine
text={heroSubtitle}
visibleText={
reducedMotion
? heroSubtitle
: heroSubtitle.slice(0, subtitleLength)
}
running={running}
/>
</p>
</>
);
}
type PortalHeroProps = {
query: string;
setQuery: (value: string) => void;
onSearch: (event: FormEvent<HTMLFormElement>) => void;
onNavigate: (view: 'opportunities') => void;
stats?: HomeResponse['data']['stats'];
};
/** Reference visuals adapted to the V2 data and navigation contracts. */
export default function PortalHero({
query,
setQuery,
onSearch,
onNavigate,
stats,
}: PortalHeroProps) {
const [currentSlide, setCurrentSlide] = useState(0);
const [interacting, setInteracting] = useState(false);
const [hovering, setHovering] = useState(false);
const [pageVisible, setPageVisible] = useState(true);
// Start static for SSR and until the browser's motion preference is known.
const [reducedMotion, setReducedMotion] = useState(true);
useEffect(() => {
const preference = window.matchMedia(
'(prefers-reduced-motion: reduce)',
);
const updateMotion = () => setReducedMotion(preference.matches);
const updateVisibility = () => setPageVisible(!document.hidden);
updateMotion();
updateVisibility();
preference.addEventListener('change', updateMotion);
document.addEventListener('visibilitychange', updateVisibility);
return () => {
preference.removeEventListener('change', updateMotion);
document.removeEventListener('visibilitychange', updateVisibility);
};
}, []);
useEffect(() => {
if (reducedMotion || interacting || hovering || !pageVisible) return;
const timer = window.setInterval(() => {
setCurrentSlide((current) => (current + 1) % slides.length);
}, 8000);
return () => window.clearInterval(timer);
}, [reducedMotion, interacting, hovering, pageVisible]);
return (
<section
aria-labelledby="portal-hero-title"
className="portal-hero relative isolate overflow-hidden bg-[#101820] text-white"
onMouseEnter={() => setHovering(true)}
onMouseLeave={() => setHovering(false)}
onFocusCapture={() => setInteracting(true)}
onBlurCapture={(event) => {
if (!event.currentTarget.contains(event.relatedTarget))
setInteracting(false);
}}
>
<div className="absolute inset-0 -z-20" aria-hidden="true">
{slides.map((slide, index) => (
<picture key={slide.image}>
<source
media="(max-width: 640px)"
srcSet={slide.mobile}
/>
<img
src={slide.image}
alt=""
width={1920}
height={1280}
fetchPriority={index === 0 ? 'high' : 'low'}
decoding="async"
className={`portal-hero-image absolute inset-0 h-full w-full object-cover transition-opacity duration-1500 motion-reduce:transition-none ${currentSlide === index ? 'opacity-100' : 'opacity-0'}`}
/>
</picture>
))}
</div>
<div
className="absolute inset-0 -z-10 bg-linear-to-r from-black/75 via-black/65 to-black/60"
aria-hidden="true"
/>
<div
className="absolute inset-x-0 bottom-0 -z-10 h-48 bg-linear-to-t from-black/65 to-transparent"
aria-hidden="true"
/>
<div className="mx-auto flex min-h-[88svh] max-w-6xl flex-col items-center justify-center px-5 py-12 text-center sm:px-6 sm:py-16 lg:py-20">
<HeroAnimatedCopy
key={currentSlide}
reducedMotion={reducedMotion}
running={pageVisible}
/>
<p className="mt-3 max-w-3xl text-sm leading-relaxed text-white/90 sm:text-base">
Oportunidades reais de investimento em Moçambique,
organizadas por sector.
</p>
<p
id="portal-hero-description"
className="mt-2 max-w-2xl text-sm leading-relaxed text-white/80 sm:text-base"
>
Consulte projectos por província e estágio de maturidade,
compreenda os requisitos legais e fiscais, e manifeste
interesse directamente junto da entidade promotora.
</p>
<form
onSubmit={onSearch}
role="search"
aria-label="Pesquisar oportunidades"
className="mt-7 w-full max-w-4xl"
>
<label
htmlFor="portal-opportunity-search"
className="mb-2 block text-left text-sm font-medium text-white/90"
>
Pesquisa rápida de oportunidades
</label>
<div className="flex min-w-0 flex-col gap-2 rounded-2xl border border-white/30 bg-white p-1.5 shadow-2xl shadow-black/20 focus-within:ring-2 focus-within:ring-white focus-within:ring-offset-4 focus-within:ring-offset-[#101820] min-[400px]:flex-row">
<input
id="portal-opportunity-search"
type="search"
name="q"
value={query}
onChange={(event) => setQuery(event.target.value)}
placeholder="Ex.: agronegócio, Nampula, energia..."
className="h-12 w-full min-w-0 flex-1 rounded-xl border-0 bg-white px-4 text-base text-slate-900 outline-none placeholder:text-slate-500"
/>
<button
type="submit"
className="inline-flex min-h-12 shrink-0 items-center justify-center gap-2 rounded-xl bg-[#ed1c24] px-5 text-sm font-semibold text-white transition-colors hover:bg-[#c9141b] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#ed1c24]"
>
<Search size={18} aria-hidden="true" />
Pesquisar
</button>
</div>
</form>
<div className="mt-6 flex flex-wrap items-center justify-center gap-3">
<button
onClick={() => onNavigate('opportunities')}
className="inline-flex min-h-11 items-center gap-2 rounded-xl bg-white px-5 py-3 text-sm font-semibold text-[#101820] transition-colors hover:bg-slate-100 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white"
>
Consultar oportunidades{' '}
<ArrowRight size={16} aria-hidden="true" />
</button>
<a
href="/simulador-fiscal"
className="inline-flex min-h-11 items-center rounded-xl border border-white/50 bg-black/15 px-5 py-3 text-sm font-semibold text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white"
>
Planear finanças
</a>
</div>
<dl
aria-label="Indicadores do portal"
className="mt-9 grid w-full max-w-lg grid-cols-3 gap-3 border-t border-white/25 pt-5"
>
{[
['oportunidades', stats?.opportunities],
['sectores', stats?.sectors],
['províncias', stats?.provinces],
].map(([label, value]) => (
<div
key={label}
className="flex flex-col-reverse gap-1"
>
<dt className="text-xs text-white/85 sm:text-sm">
{label}
</dt>
<dd className="text-2xl font-semibold text-white tabular-nums sm:text-3xl">
{value ?? '—'}
</dd>
</div>
))}
</dl>
</div>
</section>
);
}
@@ -0,0 +1,197 @@
import { ArrowRight } from 'lucide-react';
import { useState } from 'react';
import {
HOME_SECTION,
HOME_SECTION_HEADING,
PORTAL_MORE_LINK,
} from '@/lib/portal-presentation';
export type PublicSector = {
slug: string;
name: string;
description: string | null;
opportunitiesCount: number;
url?: string;
specializations?: { id: number; name: string; url: string }[];
};
const images: Record<string, string> = {
agronegocio: 'agronegocio',
turismo: 'turismo',
infraestruturas: 'infraestruturas',
'economia-azul': 'economia-azul',
'mercado-financeiro': 'servicos-financeiros',
'servicos-financeiros': 'servicos-financeiros',
fintech: 'tic-economia-digital',
mineracao: 'mineracao',
energia: 'energia',
'energia-especifica': 'energia',
imobiliario: 'outros-sectores',
'bens-de-consumo-e-franquias': 'industria',
'bens-de-consumo-franquias': 'industria',
'tecnologias-de-informacao': 'tic-economia-digital',
'tic-economia-digital': 'tic-economia-digital',
industria: 'industria',
'logistica-transportes': 'logistica-transportes',
};
const imageDescriptions: Record<string, string> = {
agronegocio: 'Campos agrícolas e instalações de transformação de produtos.',
turismo: 'Alojamento turístico junto à costa e à vegetação tropical.',
infraestruturas: 'Ponte rodoviária sobre um rio, ligando áreas urbanas.',
'economia-azul': 'Actividades de pesca e aquacultura numa zona costeira.',
'servicos-financeiros':
'Edifícios empresariais e serviços num espaço urbano.',
mineracao:
'Exploração mineira a céu aberto com instalações de processamento.',
energia:
'Painéis solares e infra-estruturas de transporte de electricidade.',
industria:
'Unidade industrial com área de armazenagem e movimentação de mercadorias.',
'tic-economia-digital':
'Infra-estruturas de telecomunicações num ambiente urbano.',
'logistica-transportes':
'Terminal portuário com contentores e transporte ferroviário.',
'outros-sectores': 'Espaço empresarial e edifícios urbanos ao fundo.',
};
function SectorImage({ slug, preview }: { slug: string; preview: boolean }) {
const [failed, setFailed] = useState(0);
const image = failed
? 'outros-sectores'
: (images[slug] ?? 'outros-sectores');
const base = `/images/sectors/${image}`;
if (failed > 1) return <span className="absolute inset-0 bg-slate-800" />;
return (
<img
src={`${base}.webp`}
srcSet={`${base}-480.webp 480w, ${base}.webp 960w`}
sizes={
preview
? '(min-width: 1152px) 266px, (min-width: 1024px) 25vw, 50vw'
: '(min-width: 1152px) 357px, (min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw'
}
width={960}
height={540}
alt={imageDescriptions[image]}
loading="lazy"
decoding="async"
className="h-full w-full object-cover transition-transform duration-500 motion-safe:group-hover:scale-105"
onError={() => setFailed((current) => Math.min(current + 1, 2))}
/>
);
}
export function PublicSectorCards({
sectors,
preview = false,
}: {
sectors: PublicSector[];
preview?: boolean;
}) {
return (
<div
className={
preview
? 'grid grid-cols-2 gap-4 lg:grid-cols-4'
: 'grid gap-5 sm:grid-cols-2 lg:grid-cols-3'
}
>
{sectors.map((sector) => {
const href =
sector.url ??
`/sectores/${sector.slug.split('/').map(encodeURIComponent).join('/')}`;
const titleId = `public-sector-${sector.slug.replaceAll('/', '-')}`;
return (
<article
key={sector.slug}
className="group flex min-w-0 flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm transition-colors hover:border-[#ed1c24]"
>
<a
href={href}
aria-labelledby={titleId}
className="relative block h-40 shrink-0 overflow-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-[#ed1c24] sm:h-44"
>
<SectorImage slug={sector.slug} preview={preview} />
<span
aria-hidden="true"
className="absolute inset-0 bg-linear-to-t from-black/85 via-black/20 to-transparent"
/>
<h3
id={titleId}
className="absolute right-3 bottom-3 left-3 text-sm leading-5 font-bold wrap-break-word text-white drop-shadow-lg min-[375px]:text-base sm:text-lg sm:leading-6"
>
{sector.name}
</h3>
</a>
<div className="flex flex-1 flex-col gap-2 p-3 sm:p-4">
{sector.description && (
<p className="line-clamp-3 text-sm leading-5 wrap-break-word text-slate-600">
{sector.description}
</p>
)}
{sector.specializations?.map((child) => (
<a
key={child.id}
href={child.url}
className="text-xs font-semibold text-slate-700 underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-[#ed1c24]"
>
Especialização:{' '}
{child.name.replace(
'Mercado Financeiro — ',
'',
)}
</a>
))}
<div className="mt-auto pt-1">
<p className="text-xs leading-5 text-slate-500">
{sector.opportunitiesCount} oportunidade
{sector.opportunitiesCount === 1 ? '' : 's'}
</p>
<a
href={href}
aria-label={`Ler mais sobre ${sector.name}`}
className="inline-flex min-h-11 items-center gap-1.5 text-xs font-bold text-[#ed1c24] hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#ed1c24]"
>
Ler mais{' '}
<ArrowRight size={14} aria-hidden="true" />
</a>
</div>
</div>
</article>
);
})}
</div>
);
}
export function HomepageSectors({ sectors }: { sectors: PublicSector[] }) {
return (
<section
aria-labelledby="home-sectors-heading"
className={HOME_SECTION}
>
<h2 id="home-sectors-heading" className={HOME_SECTION_HEADING}>
Sectores de investimento
</h2>
<p className="mt-2 max-w-2xl text-slate-600">
Explore as áreas prioritárias do programa de investimento
nacional.
</p>
<div className="mt-5">
<PublicSectorCards sectors={sectors.slice(0, 4)} preview />
{!sectors.length && (
<p className="text-slate-600">
Não existem sectores publicados.
</p>
)}
</div>
<div className="mt-5 flex justify-center">
<a href="/sectores" className={PORTAL_MORE_LINK}>
Ver mais sectores{' '}
<ArrowRight size={14} aria-hidden="true" />
</a>
</div>
</section>
);
}
+5 -3
View File
@@ -1,4 +1,5 @@
import SearchFeedback from '@/components/search-feedback'; import SearchFeedback from '@/components/search-feedback';
import { searchTerritoryHref } from '@/lib/search-territory';
import { Link, usePage } from '@inertiajs/react'; import { Link, usePage } from '@inertiajs/react';
import { createContext, useContext } from 'react'; import { createContext, useContext } from 'react';
import { PortalGroupedMenu } from '@/components/portal-grouped-menu'; import { PortalGroupedMenu } from '@/components/portal-grouped-menu';
@@ -24,6 +25,7 @@ export const portalLinks = [
['/apoio', 'Apoio ao Investidor'], ['/apoio', 'Apoio ao Investidor'],
] as const; ] as const;
const names: Record<string, string> = { const names: Record<string, string> = {
'/contextos-de-investimento': 'Contextos de investimento',
'/sobre': 'Sobre nós', '/sobre': 'Sobre nós',
'/contacto': 'Contacto', '/contacto': 'Contacto',
'/politica-de-privacidade': 'Política de Privacidade', '/politica-de-privacidade': 'Política de Privacidade',
@@ -148,7 +150,7 @@ export default function PortalNavigation({
{parent && ( {parent && (
<> <>
<Link <Link
href={parent} href={searchTerritoryHref(parent, url)}
className="underline" className="underline"
> >
{names[parent]} {names[parent]}
@@ -175,11 +177,11 @@ export default function PortalNavigation({
</div> </div>
<aside <aside
aria-label="Contacto de apoio ao investidor" aria-label="Contacto de apoio ao investidor"
className={printable ? 'print:hidden' : undefined} className={`mx-auto flex max-w-6xl justify-center px-5 pt-4 ${printable ? 'print:hidden' : ''}`}
> >
<a <a
href="/apoio" href="/apoio"
className="mx-3 mt-4 block max-w-[calc(100%-1.5rem)] rounded-xl bg-emerald-800 px-5 py-3 text-center text-sm font-semibold text-white shadow-xl focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-emerald-600" className="inline-flex min-h-11 max-w-full items-center justify-center rounded-lg bg-[#ed1c24] px-4 py-2 text-center text-sm font-semibold text-white shadow-sm transition-colors hover:bg-[#c9141b] focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#ed1c24]"
> >
Contactar Apoio ao Investidor Contactar Apoio ao Investidor
</a> </a>
+2 -1
View File
@@ -1,3 +1,4 @@
import { searchTerritoryHref } from './search-territory.ts';
/** Only a query string is carried; the return destination is always local. */ /** Only a query string is carried; the return destination is always local. */
export function catalogueDetailHref(path: string, query: string): string { export function catalogueDetailHref(path: string, query: string): string {
return query return query
@@ -8,5 +9,5 @@ export function catalogueReturnHref(base: string, pageUrl: string): string {
const query = new URL(pageUrl, 'https://portal.invalid').searchParams.get( const query = new URL(pageUrl, 'https://portal.invalid').searchParams.get(
'catalogue_query', 'catalogue_query',
); );
return base + (query ? `?${new URLSearchParams(query).toString()}` : ''); return searchTerritoryHref(base + (query ? `?${new URLSearchParams(query).toString()}` : ''), pageUrl);
} }
+1
View File
@@ -1,4 +1,5 @@
export type Sector = { export type Sector = {
url?: string;
slug: string; slug: string;
name: string; name: string;
specializations?: { id: number; name: string; slug: string; url: string }[]; specializations?: { id: number; name: string; slug: string; url: string }[];
+10
View File
@@ -0,0 +1,10 @@
export const HOME_SECTION_HEADING =
'text-2xl leading-8 font-bold text-slate-900';
export const HOME_SECTION = 'mx-auto max-w-6xl px-5 py-5 sm:py-6';
export const HOME_SECTION_BAND =
'border-t border-slate-200 bg-white py-5 sm:py-6';
export const PORTAL_MORE_LINK =
'inline-flex min-h-11 items-center justify-center gap-1.5 rounded-full border border-[#ed1c24] bg-white px-5 py-2 text-xs font-bold text-[#ed1c24] transition-colors hover:bg-[#ed1c24] hover:text-white focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#ed1c24]';
+24
View File
@@ -0,0 +1,24 @@
const levels = ['province_id', 'district_id', 'admin_post_id', 'locality_id'];
const searchRoutes = ['/carteira', '/oportunidades', '/zonas', '/educacao'];
/** URL-scoped search context, never a saved investment or another browser tab. */
export function searchTerritoryHref(href: string, pageUrl: string): string {
const base = 'https://portal.invalid';
const source = new URL(pageUrl, base);
const target = new URL(href, base);
const supported = (path: string) => searchRoutes.some((route) => path === route || path.startsWith(`${route}/`));
if (target.origin !== base || !supported(source.pathname) || !supported(target.pathname)) return href;
const inherited = source.searchParams.has('catalogue_query')
? new URLSearchParams(source.searchParams.get('catalogue_query')!)
: source.searchParams;
// An explicit ancestor, including an explicit empty value, overrides its descendants.
let changed = false;
for (const field of levels) {
if (target.searchParams.has(field)) {
changed ||= target.searchParams.get(field) !== inherited.get(field);
} else if (!changed && inherited.get(field)) {
target.searchParams.set(field, inherited.get(field)!);
}
}
return target.pathname + target.search + target.hash;
}
+226 -369
View File
@@ -1,3 +1,12 @@
import { HomepageSectors } from '@/components/public-sector-cards';
import {
HOME_SECTION,
HOME_SECTION_BAND,
HOME_SECTION_HEADING,
} from '@/lib/portal-presentation';
import InvestmentContextCards from '@/components/investment-context-cards';
import InvestmentSteps from '@/components/investment-steps';
import PortalHero from '@/components/portal-hero';
import SearchState from '@/components/search-state'; import SearchState from '@/components/search-state';
import { useInterestDraft } from '@/hooks/use-interest-draft'; import { useInterestDraft } from '@/hooks/use-interest-draft';
import { createContext, useContext, useRef, useState } from 'react'; import { createContext, useContext, useRef, useState } from 'react';
@@ -7,7 +16,6 @@ import { ProvinceSelect } from '@/components/investment-territory';
import { MATURITY_LEVELS } from '@/lib/investment-maturity'; import { MATURITY_LEVELS } from '@/lib/investment-maturity';
import CountrySelect, { type Country } from '@/components/country-select'; import CountrySelect, { type Country } from '@/components/country-select';
import type { Dispatch, FormEvent, ReactNode, SetStateAction } from 'react'; import type { Dispatch, FormEvent, ReactNode, SetStateAction } from 'react';
import type { LucideIcon } from 'lucide-react';
import { usePortalQuery } from '@/hooks/use-portal-query'; import { usePortalQuery } from '@/hooks/use-portal-query';
import { import {
PortalApiError, PortalApiError,
@@ -30,30 +38,20 @@ import type {
Sector, Sector,
} from '@/lib/portal-api'; } from '@/lib/portal-api';
import { import {
Search,
Leaf,
Zap,
Hotel,
Truck,
Waves,
Banknote,
ArrowRight,
ArrowLeft, ArrowLeft,
MapPin, MapPin,
CheckCircle2, CheckCircle2,
LogIn,
FileText,
Scale,
Handshake,
Calculator,
ArrowRight,
} from 'lucide-react'; } from 'lucide-react';
type View = 'home' | 'opportunities' | 'detail' | 'interest'; type View = 'home' | 'opportunities' | 'detail' | 'interest';
type OpportunityAction = (opportunity: Opportunity) => void; type OpportunityAction = (opportunity: Opportunity) => void;
const SectorContext = createContext<Sector[]>([]); const SectorContext = createContext<Sector[]>([]);
const SECTOR_ICONS: Record<string, LucideIcon> = {
agronegocio: Leaf,
energia: Zap,
turismo: Hotel,
infraestruturas: Truck,
'economia-azul': Waves,
'mercado-financeiro': Banknote,
};
function QueryStatus({ function QueryStatus({
loading, loading,
@@ -68,7 +66,7 @@ function QueryStatus({
return ( return (
<p <p
role="status" role="status"
className="mx-auto max-w-6xl px-5 py-8 text-slate-600" className="mx-auto max-w-6xl px-5 py-5 text-slate-600 sm:py-6"
> >
A carregar dados... A carregar dados...
</p> </p>
@@ -77,7 +75,7 @@ function QueryStatus({
return ( return (
<div <div
role="alert" role="alert"
className="mx-auto my-6 max-w-6xl rounded-xl border border-red-200 bg-red-50 p-5 text-red-800" className="mx-auto my-5 max-w-6xl rounded-xl border border-red-200 bg-red-50 p-5 text-red-800"
> >
<p>{error}</p> <p>{error}</p>
<button <button
@@ -137,172 +135,6 @@ function TopBar({
); );
} }
function Hero({
query,
setQuery,
onSearch,
onNavigate,
stats,
}: {
query: string;
setQuery: (value: string) => void;
onSearch: (event: FormEvent<HTMLFormElement>) => void;
onNavigate: (view: View) => void;
stats?: HomeResponse['data']['stats'];
}) {
return (
<section className="border-b border-slate-200 bg-[#0B2038] text-white">
<div className="mx-auto grid max-w-6xl gap-10 px-5 py-16 md:py-24">
<div className="text-center">
<p className="text-4xl leading-tight font-black tracking-tight text-emerald-300 uppercase md:text-6xl">
INVISTA EM MOÇAMBIQUE
</p>
<h1 className="mx-auto mt-4 max-w-4xl text-4xl leading-[1.05] font-black tracking-tight md:text-5xl">
Transforme informação em decisões
<span className="text-amber-400">
{' '}
e ideias em negócios reais.
</span>
</h1>
<p className="mx-auto mt-6 max-w-3xl text-lg font-semibold text-slate-200">
Oportunidades reais de investimento em Moçambique,
organizadas por sector.
</p>
<p className="mx-auto mt-5 max-w-2xl text-slate-300">
Consulte projectos por província e estágio de
maturidade, compreenda os requisitos legais e fiscais, e
manifeste interesse directamente junto da entidade
promotora.
</p>
<div className="mt-8 flex flex-wrap justify-center gap-3">
<button
onClick={() => onNavigate('opportunities')}
className="inline-flex items-center gap-2 rounded-lg bg-amber-400 px-5 py-3 font-bold text-[#0B2038] hover:bg-amber-300"
>
Consultar oportunidades <ArrowRight size={16} />
</button>
<a
href="/simulador-fiscal"
className="rounded-lg border border-emerald-300 px-5 py-3 font-semibold text-emerald-100 hover:bg-emerald-900"
>
Planear finanças
</a>
</div>
</div>
<form
onSubmit={onSearch}
className="h-fit rounded-2xl border border-white/10 bg-white/10 p-5"
>
<label
htmlFor="portal-opportunity-search"
className="mb-2 block text-sm font-semibold text-slate-200"
>
Pesquisa rápida
</label>
<div className="flex gap-2">
<input
id="portal-opportunity-search"
type="search"
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Ex.: agronegócio, Nampula, energia..."
className="w-full rounded-lg bg-white px-3 py-2.5 text-sm text-slate-900 ring-2 ring-transparent outline-none placeholder:text-slate-500 focus:ring-amber-400"
/>
<button
type="submit"
aria-label="Pesquisar oportunidades"
className="rounded-lg bg-amber-400 px-4 text-[#0B2038]"
>
<Search size={18} />
</button>
</div>
<div className="mt-4 flex flex-wrap gap-3 border-t border-white/10 pt-4 text-center text-xs text-slate-300">
<div>
<p className="text-xl font-black text-white">
{stats?.opportunities ?? '—'}
</p>
oportunidades
</div>
<div className="ml-auto">
<p className="text-xl font-black text-white">
{stats?.sectors ?? '—'}
</p>
sectores
</div>
<div className="ml-auto">
<p className="text-xl font-black text-white">
{stats?.provinces ?? '—'}
</p>
províncias
</div>
</div>
</form>
</div>
</section>
);
}
function SectorGrid({
onSelectSector,
}: {
onSelectSector: (slug: string) => void;
}) {
const sectors = useContext(SectorContext);
return (
<section className="mx-auto max-w-6xl px-5 py-16">
<h2 className="text-2xl font-black text-slate-900">
Sectores estratégicos
</h2>
<p className="mt-2 max-w-2xl text-slate-600">
Explore as áreas prioritárias do programa de investimento
nacional.
</p>
<div className="mt-8 grid gap-5 sm:grid-cols-2 lg:grid-cols-3">
{sectors.map((sector) => {
const Icon = SECTOR_ICONS[sector.slug] ?? Banknote;
const count = sector.opportunitiesCount;
return (
<button
key={sector.slug}
onClick={() => onSelectSector(sector.slug)}
className="group rounded-2xl border border-slate-200 bg-white p-6 text-left shadow-sm transition hover:-translate-y-0.5 hover:border-emerald-300 hover:shadow-md"
>
<div className="flex h-11 w-11 items-center justify-center rounded-xl bg-emerald-50 text-emerald-700">
<Icon size={22} />
</div>
<h3 className="mt-4 font-bold text-slate-900">
{sector.name}
</h3>
<p className="mt-2 text-sm leading-relaxed text-slate-600">
{sector.shortDescription}
</p>
{sector.specializations?.map((child) => (
<span
key={child.id}
className="mt-3 block text-sm font-semibold text-emerald-800"
>
Especialização:{' '}
{child.name.replace(
'Mercado Financeiro — ',
'',
)}
</span>
))}
<p className="mt-4 text-sm font-semibold text-emerald-700 group-hover:underline">
{count} oportunidade{count === 1 ? '' : 's'} →
</p>
</button>
);
})}
</div>
</section>
);
}
function OpportunityCard({ function OpportunityCard({
opportunity, opportunity,
onView, onView,
@@ -392,7 +224,12 @@ function OpportunitiesView({
return ( return (
<section className="mx-auto max-w-6xl px-5 py-12"> <section className="mx-auto max-w-6xl px-5 py-12">
<SearchState loading={query.loading} error={query.error} total={total} retry={query.retry} /> <SearchState
loading={query.loading}
error={query.error}
total={total}
retry={query.retry}
/>
<h1 className="text-3xl font-black text-slate-900"> <h1 className="text-3xl font-black text-slate-900">
Oportunidades de investimento Oportunidades de investimento
</h1> </h1>
@@ -705,19 +542,22 @@ function InterestForm({
const pending = useRef(false); const pending = useRef(false);
const submission = useRef<{ body: string; key: string } | null>(null); const submission = useRef<{ body: string; key: string } | null>(null);
const [submitError, setSubmitError] = useState<string | null>(null); const [submitError, setSubmitError] = useState<string | null>(null);
const draft = useInterestDraft<InterestFormData>('opportunity:' + (preselected?.reference ?? 'general'), { const draft = useInterestDraft<InterestFormData>(
name: '', 'opportunity:' + (preselected?.reference ?? 'general'),
email: '', {
phone: '', name: '',
investorType: '', email: '',
country: '', phone: '',
declared_origin_country_code: '', investorType: '',
sectorInterest: preselected?.sectorName ?? '', country: '',
opportunityReference: preselected ? preselected.reference : '', declared_origin_country_code: '',
investmentRange: '', sectorInterest: preselected?.sectorName ?? '',
message: '', opportunityReference: preselected ? preselected.reference : '',
privacyConsent: false, investmentRange: '',
}); message: '',
privacyConsent: false,
},
);
const { form, setForm } = draft; const { form, setForm } = draft;
const [errors, setErrors] = useState<FormErrors>({}); const [errors, setErrors] = useState<FormErrors>({});
const [result, setResult] = useState<{ reference: string } | null>(null); const [result, setResult] = useState<{ reference: string } | null>(null);
@@ -779,7 +619,10 @@ function InterestForm({
setResult({ reference: response.data.reference }); setResult({ reference: response.data.reference });
onSubmitted(); onSubmitted();
} catch (error: unknown) { } catch (error: unknown) {
if (error instanceof PortalApiError && error.status === 401) { draft.authenticate(); return; } if (error instanceof PortalApiError && error.status === 401) {
draft.authenticate();
return;
}
if (error instanceof PortalApiError) { if (error instanceof PortalApiError) {
setErrors(fieldErrors(error)); setErrors(fieldErrors(error));
setSubmitError(error.message); setSubmitError(error.message);
@@ -805,7 +648,13 @@ function InterestForm({
A sua referência é <strong>{result.reference}</strong>. A A sua referência é <strong>{result.reference}</strong>. A
equipa do portal irá analisar o pedido e poderá solicitar equipa do portal irá analisar o pedido e poderá solicitar
informação adicional. informação adicional.
</p><a href="/investidor/manifestacoes" className="mt-4 inline-block underline">Acompanhar manifestações</a> </p>
<a
href="/investidor/manifestacoes"
className="mt-4 inline-block underline"
>
Acompanhar manifestações
</a>
</section> </section>
); );
} }
@@ -1053,16 +902,20 @@ function Field({
function Footer() { function Footer() {
return ( return (
<footer className="border-t border-slate-200 bg-slate-950 py-10 text-slate-400"> <footer
<div className="mx-auto max-w-6xl px-5 text-sm"> aria-label="Portal do Investidor"
<p className="font-bold text-white">INVESTE Moçambique</p> className="border-t border-slate-200 bg-white"
<p className="mt-2 max-w-md"> >
Portal do Investidor — conheça as oportunidades de <div className="mx-auto flex max-w-6xl justify-start px-5 py-2">
investimento em Moçambique e manifeste o seu interesse.{' '} <a
<a href="/acesso-gestao" className="underline"> href="/acesso-gestao"
Acesso à gestão aria-label="Acesso à gestão"
</a> title="Acesso à gestão"
</p> className="inline-flex min-h-11 items-center justify-center gap-2 rounded-lg px-3 text-sm font-medium text-[#ed1c24] transition-colors hover:bg-red-50 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#ed1c24]"
>
<LogIn className="size-5" aria-hidden="true" />
<span>Acesso à gestão</span>
</a>
</div> </div>
</footer> </footer>
); );
@@ -1120,11 +973,7 @@ export default function PortalInvestidorApp({
function handleHeroSearch(event: FormEvent<HTMLFormElement>) { function handleHeroSearch(event: FormEvent<HTMLFormElement>) {
event.preventDefault(); event.preventDefault();
router.get('/oportunidades', { q: heroQuery }); router.get('/oportunidades', { q: heroQuery.trim() });
}
function handleSelectSector(slug: string) {
router.get('/sectores/' + encodeURIComponent(slug));
} }
function handleView(opportunity: Opportunity) { function handleView(opportunity: Opportunity) {
@@ -1140,121 +989,52 @@ export default function PortalInvestidorApp({
return ( return (
<SectorContext.Provider value={sectors}> <SectorContext.Provider value={sectors}>
<div className="min-h-screen bg-slate-50 font-sans text-slate-900"> <div className="min-h-screen bg-slate-50 font-sans text-slate-900">
{view !== 'home' && <TopBar onNavigate={navigate} requestCount={requestCount} />} {view !== 'home' && (
<TopBar onNavigate={navigate} requestCount={requestCount} />
)}
<PortalMenu /> <PortalMenu />
<main> <main>
{view === 'home' && ( {view === 'home' && (
<> <>
<Hero <PortalHero
query={heroQuery} query={heroQuery}
setQuery={setHeroQuery} setQuery={setHeroQuery}
onSearch={handleHeroSearch} onSearch={handleHeroSearch}
stats={home.data?.data.stats} stats={home.data?.data.stats}
onNavigate={navigate} onNavigate={navigate}
/> />
<section className="mx-auto max-w-6xl space-y-5 px-5 py-10"> <InvestmentContextCards />
<h2 className="text-2xl font-bold">
Encontre o contexto do seu investimento
</h2>
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
{[
[
'/clusters',
'Clusters',
'Cadeias de valor e lacunas produtivas.',
],
[
'/corredores',
'Corredores',
'Territórios, logística e conexões.',
],
[
'/projectos-ancora',
'Projectos âncora',
'Projectos estruturantes e relações.',
],
[
'/educacao',
'Educação',
'Investimentos em competências e formação.',
],
[
'/documentos',
'Documentos e Formulários',
'Legislação, procedimentos, formulários e materiais de apoio.',
],
].map(([href, title, text]) => (
<a
key={href}
href={href}
className="rounded-xl border bg-white p-5"
>
<h3 className="text-lg font-bold">
{title}
</h3>
<p>{text}</p>
</a>
))}
</div>
</section>
<QueryStatus <QueryStatus
loading={home.loading} loading={home.loading}
error={home.error} error={home.error}
retry={home.retry} retry={home.retry}
/> />
{home.data && ( {home.data && (
<SectorGrid <HomepageSectors
onSelectSector={handleSelectSector} sectors={sectors.map((sector) => ({
...sector,
description: sector.shortDescription,
}))}
/> />
)} )}
<section className="mx-auto max-w-6xl space-y-5 px-5 py-12"> <InvestmentSteps />
<h2 className="text-2xl font-black">
Como Investir
</h2>
<div className="grid gap-5 md:grid-cols-3">
{[
[
'1. Explorar',
'Identifique o sector, território e oportunidade.',
'/oportunidades',
],
[
'2. Preparar',
'Conheça o percurso e organize os documentos.',
'/como-investir',
],
[
'3. Acompanhar',
'Envie o pedido e acompanhe o protocolo.',
'/balcao-virtual',
],
].map(([title, text, href]) => (
<a
key={href}
href={href}
className="rounded-xl border bg-white p-6"
>
<h3 className="font-bold">
{title}
</h3>
<p>{text}</p>
</a>
))}
</div>
</section>
<section className="border-t border-slate-200 bg-white py-16"> <section className={HOME_SECTION_BAND}>
<div className="mx-auto max-w-6xl px-5"> <div className="mx-auto max-w-6xl px-5">
<div className="mb-8 flex items-end justify-between"> <div className="mb-5 flex items-end justify-between">
<h2 className="text-2xl font-black text-slate-900"> <h2 className={HOME_SECTION_HEADING}>
Oportunidades em destaque Oportunidades em destaque
</h2> </h2>
<button <button
onClick={goToOpportunities} onClick={goToOpportunities}
className="text-sm font-bold text-emerald-700 hover:underline" className="inline-flex items-center gap-1 text-sm font-bold text-[#ed1c24] hover:underline"
> >
Ver todas → <span>Ver todas</span>
<ArrowRight
className="h-4 w-4"
aria-hidden="true"
/>
</button> </button>
</div> </div>
{home.data && featured.length === 0 && ( {home.data && featured.length === 0 && (
@@ -1275,77 +1055,154 @@ export default function PortalInvestidorApp({
</div> </div>
</div> </div>
</section> </section>
<section className="mx-auto grid max-w-6xl gap-6 px-5 py-12 md:grid-cols-2"> <section
<div className="space-y-4 rounded-xl border bg-white p-6"> className={`${HOME_SECTION} grid gap-4 sm:gap-5 md:grid-cols-2`}
<h2 className="text-2xl font-black"> >
Documentos essenciais <article className="group flex h-full flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm transition-shadow hover:shadow-md">
</h2> <div className="flex items-start gap-4 p-6">
{essentialResources.length > 0 && ( <div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-[#ed1c24]/10 text-[#ed1c24]">
<ul className="space-y-2"> <FileText
{essentialResources.map( className="h-5 w-5"
(resource) => ( aria-hidden="true"
<li key={resource.id}> />
<a </div>
className="underline" <div className="space-y-2">
href={`/documentos/${resource.id}/download`} <h2 className="text-xl font-bold text-slate-900 sm:text-2xl">
> Documentos essenciais
{resource.title} </h2>
</a> <p className="text-sm leading-relaxed text-slate-600 sm:text-base">
</li> Consulte legislação, referências
), e formulários publicados para
)} preparar o seu investimento.
</ul> </p>
)} </div>
<p> </div>
Consulte legislação, referências e <div className="mt-auto flex flex-col gap-2 px-6 pb-6">
formulários publicados para preparar o
seu investimento.
</p>
<a
className="font-semibold text-emerald-800 underline"
href="/documentos"
>
Abrir biblioteca documental
</a>
<p>
<a <a
className="underline" className="inline-flex items-center justify-between gap-2 rounded-xl border border-slate-200 px-4 py-3 text-sm font-semibold text-slate-900 transition-colors hover:border-[#ed1c24] hover:bg-red-50/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#ed1c24]"
href="/documentos"
>
Abrir biblioteca documental
<ArrowRight
className="h-4 w-4"
aria-hidden="true"
/>
</a>
<a
className="inline-flex items-center justify-between gap-2 rounded-xl border border-slate-200 px-4 py-3 text-sm font-semibold text-slate-900 transition-colors hover:border-[#ed1c24] hover:bg-red-50/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#ed1c24]"
href="/legislacao" href="/legislacao"
> >
Legislação e Incentivos <span className="flex items-center gap-2">
<Scale
className="h-4 w-4 text-[#ed1c24]"
aria-hidden="true"
/>
Legislação e Incentivos
</span>
<ArrowRight
className="h-4 w-4"
aria-hidden="true"
/>
</a> </a>
</p> {essentialResources.length > 0 && (
</div> <div className="mt-2 rounded-xl bg-slate-50/80 p-4">
<div className="space-y-4 rounded-xl bg-emerald-900 p-6 text-white"> <p className="mb-2 text-xs font-semibold tracking-wide text-slate-500 uppercase">
<h2 className="text-2xl font-black"> Destaques
Apoio ao Investidor </p>
</h2> <ul className="space-y-1.5">
<p> {essentialResources
Peça orientação à equipa, proponha uma .slice(0, 3)
parceria ou acompanhe o seu pedido. .map((resource) => (
</p> <li
<a key={
className="font-semibold underline" resource.id
href="/apoio" }
> >
Contactar Apoio ao Investidor <a
</a> className="inline-flex items-center gap-2 text-sm text-slate-700 underline-offset-4 hover:text-slate-900 hover:underline"
<p> href={`/documentos/${resource.id}/download`}
>
<FileText
className="h-4 w-4 text-slate-400"
aria-hidden="true"
/>
{
resource.title
}
</a>
</li>
))}
</ul>
</div>
)}
</div>
</article>
<article className="group flex h-full flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm transition-shadow hover:shadow-md">
<div className="flex items-start gap-4 p-6">
<div className="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-[#ed1c24]/10 text-[#ed1c24]">
<Handshake
className="h-5 w-5"
aria-hidden="true"
/>
</div>
<div className="space-y-2">
<h2 className="text-xl font-bold text-slate-900 sm:text-2xl">
Apoio ao Investidor
</h2>
<p className="text-sm leading-relaxed text-slate-600 sm:text-base">
Peça orientação à equipa,
proponha uma parceria ou
acompanhe o seu pedido.
</p>
</div>
</div>
<div className="mt-auto flex flex-col gap-2 px-6 pb-6">
<a <a
className="underline" className="inline-flex items-center justify-between gap-2 rounded-xl bg-[#ed1c24] px-4 py-3 text-sm font-semibold text-white transition-colors hover:bg-[#c9141b] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#ed1c24]"
href="/parcerias" href="/apoio"
> >
Bolsa de Parcerias Contactar Apoio ao Investidor
</a>{' '} <ArrowRight
·{' '} className="h-4 w-4"
<a aria-hidden="true"
className="underline" />
href="/simulador-fiscal"
>
Simulador Fiscal
</a> </a>
</p> <div className="grid grid-cols-1 gap-2 sm:grid-cols-2">
</div> <a
className="inline-flex items-center justify-between gap-2 rounded-xl border border-slate-200 px-4 py-3 text-sm font-semibold text-slate-900 transition-colors hover:border-[#ed1c24] hover:bg-red-50/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#ed1c24]"
href="/parcerias"
>
<span className="flex items-center gap-2">
<Handshake
className="h-4 w-4 text-[#ed1c24]"
aria-hidden="true"
/>
Bolsa de Parcerias
</span>
<ArrowRight
className="h-4 w-4"
aria-hidden="true"
/>
</a>
<a
className="inline-flex items-center justify-between gap-2 rounded-xl border border-slate-200 px-4 py-3 text-sm font-semibold text-slate-900 transition-colors hover:border-[#ed1c24] hover:bg-red-50/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#ed1c24]"
href="/simulador-fiscal"
>
<span className="flex items-center gap-2">
<Calculator
className="h-4 w-4 text-[#ed1c24]"
aria-hidden="true"
/>
Simulador Fiscal
</span>
<ArrowRight
className="h-4 w-4"
aria-hidden="true"
/>
</a>
</div>
</div>
</article>
</section> </section>
</> </>
)} )}
+25 -2
View File
@@ -1,4 +1,5 @@
import EducationalGuides from '@/components/educational-guides'; import EducationalGuides from '@/components/educational-guides';
import { searchTerritoryHref } from '@/lib/search-territory';
import type { EducationalArticle } from '@/components/educational-article-card'; import type { EducationalArticle } from '@/components/educational-article-card';
import OpportunitySearchFilters from '@/components/opportunity-search-filters'; import OpportunitySearchFilters from '@/components/opportunity-search-filters';
import SearchState from '@/components/search-state'; import SearchState from '@/components/search-state';
@@ -46,7 +47,8 @@ export default function Catalogue({
corridor_id: string | null; corridor_id: string | null;
}[]; }[];
}) { }) {
const { auth } = usePage<{ auth: { user: unknown } }>().props; const page = usePage<{ auth: { user: unknown } }>();
const { auth } = page.props;
const form = useForm({ const form = useForm({
association_type: String(filters.association_type ?? ''), association_type: String(filters.association_type ?? ''),
association_target: String(filters.association_target ?? ''), association_target: String(filters.association_target ?? ''),
@@ -100,6 +102,16 @@ export default function Catalogue({
), ),
}); });
const view = String(filters.view ?? 'grid'); const view = String(filters.view ?? 'grid');
const selectedStructures = [
...(references.zones ?? []).filter((zone) =>
['park_id', 'zee_id', 'zfi_id'].some((key) => filters[key] === zone.id),
).map((zone) => ({ ...zone, url: `/zonas/${zone.id}` })),
...(['clusters', 'corridors', 'projects'] as const).flatMap((group) =>
references[group].filter((record) => filters[
{ clusters: 'cluster_id', corridors: 'corridor_id', projects: 'project_id' }[group]
] === record.id),
),
];
const [territoryPath, setTerritoryPath] = useState(territorySelection); const [territoryPath, setTerritoryPath] = useState(territorySelection);
const [saved, setSaved] = useState(favourites); const [saved, setSaved] = useState(favourites);
const [selected, setSelected] = useState<number[]>([]); const [selected, setSelected] = useState<number[]>([]);
@@ -360,6 +372,17 @@ export default function Catalogue({
total={results.total} total={results.total}
retry={() => runSearch()} retry={() => runSearch()}
/> />
{!searchLoading && !searchError && results.total === 0 && selectedStructures.length > 0 && (
<section className={card} aria-label="Estrutura seleccionada">
<p className="font-semibold">Sem oportunidades publicadas associadas com estes filtros.</p>
<p>A estrutura continua disponível para consulta. A sua selecção não confirma benefícios nem disponibilidade para investimento.</p>
{selectedStructures.map((record) => (
record.url ? <Link key={record.id} className="block underline" href={searchTerritoryHref(record.url, page.url)}>
Consultar ficha: {record.name}
</Link> : <p key={record.id}>{record.name} — sem ficha pública detalhada disponível.</p>
))}
</section>
)}
<div className="flex flex-wrap items-center gap-4"> <div className="flex flex-wrap items-center gap-4">
{!searchLoading && {!searchLoading &&
!searchError && !searchError &&
@@ -696,7 +719,7 @@ export default function Catalogue({
<div className="grid gap-4 md:grid-cols-3"> <div className="grid gap-4 md:grid-cols-3">
{territorial.map((d) => ( {territorial.map((d) => (
<Link <Link
href={`/carteira/${d.id}`} href={searchTerritoryHref(`/carteira/${d.id}`, page.url)}
key={d.id} key={d.id}
className={card} className={card}
> >
+3 -2
View File
@@ -1,4 +1,5 @@
import EducationalGuides from '@/components/educational-guides'; import EducationalGuides from '@/components/educational-guides';
import { searchTerritoryHref } from '@/lib/search-territory';
import type { EducationalArticle } from '@/components/educational-article-card'; import type { EducationalArticle } from '@/components/educational-article-card';
import { ClassificationSummary } from '@/components/opportunity-classification'; import { ClassificationSummary } from '@/components/opportunity-classification';
import { Link, router, usePage } from '@inertiajs/react'; import { Link, router, usePage } from '@inertiajs/react';
@@ -45,7 +46,7 @@ export default function Detail({
<p> <p>
<Link <Link
className="underline" className="underline"
href={`/carteira/${dossierOrigin.id}`} href={searchTerritoryHref(`/carteira/${dossierOrigin.id}`, page.url)}
> >
Voltar ao dossier: {dossierOrigin.title} Voltar ao dossier: {dossierOrigin.title}
</Link> </Link>
@@ -253,7 +254,7 @@ export default function Detail({
<span key={dossier.id}> <span key={dossier.id}>
<Link <Link
className="underline" className="underline"
href={`/carteira/${dossier.id}`} href={searchTerritoryHref(`/carteira/${dossier.id}`, page.url)}
> >
Consultar dossier: {dossier.title} Consultar dossier: {dossier.title}
</Link> </Link>
+1
View File
@@ -19,6 +19,7 @@ export type Option = {
export type Entity = { export type Entity = {
id: string; id: string;
name: string; name: string;
url?: string | null;
dossiers?: { id: string; title: string; source: string }[]; dossiers?: { id: string; title: string; source: string }[];
geography?: StructureGeography | null; geography?: StructureGeography | null;
}; };
+3 -2
View File
@@ -5,6 +5,7 @@ import ParkDetailsEditor, {
} from '@/components/investment-zone-operational-details'; } from '@/components/investment-zone-operational-details';
import { Link, router, useForm, usePage } from '@inertiajs/react'; import { Link, router, useForm, usePage } from '@inertiajs/react';
import { catalogueReturnHref } from '@/lib/catalogue-context'; import { catalogueReturnHref } from '@/lib/catalogue-context';
import { searchTerritoryHref } from '@/lib/search-territory';
import InvestmentTerritory from '@/components/investment-territory'; import InvestmentTerritory from '@/components/investment-territory';
import InvestmentMapPanel from '@/components/investment-map-panel'; import InvestmentMapPanel from '@/components/investment-map-panel';
import { import {
@@ -1772,7 +1773,7 @@ function Editor({
<p key={o.id}> <p key={o.id}>
<Link <Link
className="underline" className="underline"
href={`/oportunidades/${o.slug}?zone_id=${z.id}`} href={searchTerritoryHref(`/oportunidades/${o.slug}?zone_id=${z.id}`, pageUrl)}
> >
{o.title} {o.title}
</Link> </Link>
@@ -1829,7 +1830,7 @@ function Editor({
<p key={r.id}> <p key={r.id}>
<Link <Link
className="underline" className="underline"
href={`/carteira/${r.id}`} href={searchTerritoryHref(`/carteira/${r.id}`, pageUrl)}
> >
{r.title} {r.title}
</Link> </Link>
+10 -5
View File
@@ -1,7 +1,8 @@
import InvestmentZoneInstallation, { import InvestmentZoneInstallation, {
type ParkInstallationPlan, type ParkInstallationPlan,
} from '@/components/investment-zone-installation'; } from '@/components/investment-zone-installation';
import { Link, router } from '@inertiajs/react'; import { Link, router, usePage } from '@inertiajs/react';
import { searchTerritoryHref } from '@/lib/search-territory';
import { useState } from 'react'; import { useState } from 'react';
import { catalogueDetailHref } from '@/lib/catalogue-context'; import { catalogueDetailHref } from '@/lib/catalogue-context';
import { import {
@@ -90,9 +91,13 @@ export default function Zones({
zoneExtensionsAvailable?: boolean; zoneExtensionsAvailable?: boolean;
territorySelection?: TerritoryOption[]; territorySelection?: TerritoryOption[];
}) { }) {
const pageUrl = usePage().url;
const [error, setError] = useState(''); const [error, setError] = useState('');
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
const exportParams = new URLSearchParams(); const exportParams = new URLSearchParams();
['province_id', 'district_id', 'admin_post_id', 'locality_id'].forEach((field, index) => {
if (territorySelection[index]) exportParams.set(field, territorySelection[index].id);
});
for (const key of [ for (const key of [
'q', 'q',
'category', 'category',
@@ -148,9 +153,9 @@ export default function Zones({
> >
<Link href="/clusters">Por Cluster</Link> <Link href="/clusters">Por Cluster</Link>
<Link href="/corredores">Por Corredor</Link> <Link href="/corredores">Por Corredor</Link>
<Link href="/zonas?category=zee">Por ZEE</Link> <Link href={searchTerritoryHref('/zonas?category=zee', pageUrl)}>Por ZEE</Link>
<Link href="/zonas?category=zfi">Por ZFI</Link> <Link href={searchTerritoryHref('/zonas?category=zfi', pageUrl)}>Por ZFI</Link>
<Link href="/zonas?category=industrial_park"> <Link href={searchTerritoryHref('/zonas?category=industrial_park', pageUrl)}>
Parques industriais Parques industriais
</Link> </Link>
</nav> </nav>
@@ -343,7 +348,7 @@ export default function Zones({
{!management && ( {!management && (
<Link <Link
className="ml-4 underline" className="ml-4 underline"
href={`/oportunidades?${new URLSearchParams({ [zone.category === 'zee' ? 'zee_id' : zone.category === 'zfi' ? 'zfi_id' : 'park_id']: zone.id })}`} href={searchTerritoryHref(`/oportunidades?${new URLSearchParams({ [zone.category === 'zee' ? 'zee_id' : zone.category === 'zfi' ? 'zfi_id' : 'park_id']: zone.id })}`, pageUrl)}
> >
Ver oportunidades associadas Ver oportunidades associadas
</Link> </Link>
@@ -0,0 +1,26 @@
import { InvestmentContextGrid } from '@/components/investment-context-cards';
import { PORTAL_MORE_LINK } from '@/lib/portal-presentation';
import { Head } from '@inertiajs/react';
export default function InvestmentContexts() {
return (
<div className="min-h-screen bg-slate-50 text-slate-900">
<Head title="Contextos de investimento" />
<main className="mx-auto max-w-6xl min-w-0 space-y-6 px-5 py-10">
<h1 className="text-3xl font-bold text-[#ed1c24]">
Encontre o contexto do seu investimento
</h1>
<p className="text-slate-600">
Explore os contextos e recursos de apoio ao seu
investimento.
</p>
<InvestmentContextGrid />
<div className="flex justify-center">
<a href="/" className={PORTAL_MORE_LINK}>
Voltar ao início
</a>
</div>
</main>
</div>
);
}
+38 -32
View File
@@ -1,3 +1,5 @@
import { PublicSectorCards } from '@/components/public-sector-cards';
import { PORTAL_MORE_LINK } from '@/lib/portal-presentation';
import { import {
PublicDocumentContent, PublicDocumentContent,
type PublicDocument, type PublicDocument,
@@ -18,7 +20,7 @@ const input =
const button = const button =
'inline-block rounded-lg bg-emerald-800 px-5 py-3 font-semibold text-white disabled:opacity-50'; 'inline-block rounded-lg bg-emerald-800 px-5 py-3 font-semibold text-white disabled:opacity-50';
const titles: Record<string, string> = { const titles: Record<string, string> = {
sectors: 'Sectores Prioritários', sectors: 'Sectores de investimento',
sector: 'Sector prioritário', sector: 'Sector prioritário',
procedures: 'Como Investir em Moçambique', procedures: 'Como Investir em Moçambique',
legislation: 'Legislação e Incentivos', legislation: 'Legislação e Incentivos',
@@ -73,8 +75,9 @@ type Props = {
sectors?: { sectors?: {
name: string; name: string;
slug: string; slug: string;
short_description: string; short_description: string | null;
opportunities_count: number; opportunities_count: number;
url?: string;
specializations?: { id: number; name: string; url: string }[]; specializations?: { id: number; name: string; url: string }[];
}[]; }[];
sector?: { sector?: {
@@ -489,7 +492,15 @@ export default function Services(p: Props) {
<Head title={title} /> <Head title={title} />
<PortalMenu /> <PortalMenu />
<main className="mx-auto max-w-6xl min-w-0 space-y-8 overflow-x-clip px-5 py-10"> <main className="mx-auto max-w-6xl min-w-0 space-y-8 overflow-x-clip px-5 py-10">
<h1 className="text-3xl font-bold">{title}</h1> <h1
className={
p.section === 'sectors'
? 'text-3xl font-bold text-[#ed1c24]'
: 'text-3xl font-bold'
}
>
{title}
</h1>
{flash?.success && ( {flash?.success && (
<p <p
role="status" role="status"
@@ -499,38 +510,33 @@ export default function Services(p: Props) {
</p> </p>
)} )}
{p.section === 'sectors' && ( {p.section === 'sectors' && (
<div className="grid gap-5 md:grid-cols-3"> <section
{p.sectors?.map((s) => ( aria-label="Todos os sectores de investimento"
<article className="space-y-6"
className="rounded-xl border bg-white p-6" >
key={s.slug} <p className="text-slate-600">
> Explore o potencial estratégico de cada sector em
<h2 className="text-xl font-bold"> Moçambique.
<Link href={`/sectores/${s.slug}`}> </p>
{s.name} <PublicSectorCards
</Link> sectors={(p.sectors ?? []).map((sector) => ({
</h2> slug: sector.slug,
<p className="my-3">{s.short_description}</p> name: sector.name,
{s.specializations?.map((child) => ( description: sector.short_description,
<p key={child.id}> opportunitiesCount: sector.opportunities_count,
<Link specializations: sector.specializations,
className="font-semibold underline" url: sector.url,
href={child.url} }))}
> />
{child.name}
</Link>
</p>
))}
<p>
{s.opportunities_count} oportunidades
publicadas
</p>
</article>
))}
{!p.sectors?.length && ( {!p.sectors?.length && (
<p>Não existem sectores publicados.</p> <p>Não existem sectores publicados.</p>
)} )}
</div> <div className="flex justify-center">
<a href="/" className={PORTAL_MORE_LINK}>
Voltar ao início
</a>
</div>
</section>
)} )}
{p.section === 'sector' && p.sector && ( {p.section === 'sector' && p.sector && (
<> <>
+6 -4
View File
@@ -1,4 +1,5 @@
import { Link, useForm } from '@inertiajs/react'; import { Link, useForm, usePage } from '@inertiajs/react';
import { searchTerritoryHref } from '@/lib/search-territory';
import { catalogueDetailHref } from '@/lib/catalogue-context'; import { catalogueDetailHref } from '@/lib/catalogue-context';
import { Management } from '../management/shared'; import { Management } from '../management/shared';
import type { Paginated } from '../management/shared'; import type { Paginated } from '../management/shared';
@@ -35,6 +36,7 @@ export default function Index({
locality_id: filters.locality_id ?? '', locality_id: filters.locality_id ?? '',
}); });
const base = management ? '/management/portfolio' : '/carteira'; const base = management ? '/management/portfolio' : '/carteira';
const { url } = usePage();
const Frame = management ? Management : Layout; const Frame = management ? Management : Layout;
return ( return (
<Frame title="Corredores, clusters e projectos âncora"> <Frame title="Corredores, clusters e projectos âncora">
@@ -151,7 +153,7 @@ export default function Index({
(r.corridor_id || r.cluster_id || r.project_id) && ( (r.corridor_id || r.cluster_id || r.project_id) && (
<Link <Link
className="ml-4 underline" className="ml-4 underline"
href={`/oportunidades?${new URLSearchParams(r.corridor_id ? { corridor_id: r.corridor_id } : r.cluster_id ? { cluster_id: r.cluster_id } : { project_id: r.project_id! })}`} href={searchTerritoryHref(`/oportunidades?${new URLSearchParams(r.corridor_id ? { corridor_id: r.corridor_id } : r.cluster_id ? { cluster_id: r.cluster_id } : { project_id: r.project_id! })}`, url)}
> >
Ver oportunidades associadas Ver oportunidades associadas
</Link> </Link>
@@ -174,10 +176,10 @@ export default function Index({
aria-label="Alternativas de exploração" aria-label="Alternativas de exploração"
className="flex flex-wrap gap-4" className="flex flex-wrap gap-4"
> >
<Link className="underline" href="/oportunidades"> <Link className="underline" href={searchTerritoryHref('/oportunidades', url)}>
Ver oportunidades publicadas Ver oportunidades publicadas
</Link> </Link>
<Link className="underline" href="/zonas"> <Link className="underline" href={searchTerritoryHref('/zonas', url)}>
Consultar ZEE, ZFI e parques Consultar ZEE, ZFI e parques
</Link> </Link>
<Link className="underline" href="/Simulador"> <Link className="underline" href="/Simulador">
+4 -3
View File
@@ -1,6 +1,7 @@
import { Link, useForm, router, usePage } from '@inertiajs/react'; import { Link, useForm, router, usePage } from '@inertiajs/react';
import { useState } from 'react'; import { useState } from 'react';
import { catalogueReturnHref } from '@/lib/catalogue-context'; import { catalogueReturnHref } from '@/lib/catalogue-context';
import { searchTerritoryHref } from '@/lib/search-territory';
import InvestmentMapPanel from '@/components/investment-map-panel'; import InvestmentMapPanel from '@/components/investment-map-panel';
import StructureGeographyPanel, { import StructureGeographyPanel, {
type StructureGeography, type StructureGeography,
@@ -190,7 +191,7 @@ function Editor({
</h2> </h2>
{zones.map((z) => ( {zones.map((z) => (
<p key={z.id}> <p key={z.id}>
<Link className="underline" href={`/zonas/${z.id}`}> <Link className="underline" href={searchTerritoryHref(`/zonas/${z.id}`, pageUrl)}>
{z.name} {z.name}
</Link>{' '} </Link>{' '}
· {z.association_type} · Fonte: {z.source_reference} · {z.association_type} · Fonte: {z.source_reference}
@@ -297,7 +298,7 @@ function Editor({
<article key={opportunity.id}> <article key={opportunity.id}>
<Link <Link
className="font-semibold underline" className="font-semibold underline"
href={`/oportunidades/${opportunity.slug}?from_dossier=${record.id}`} href={searchTerritoryHref(`/oportunidades/${opportunity.slug}?from_dossier=${record.id}`, pageUrl)}
> >
{opportunity.title} {opportunity.title}
</Link> </Link>
@@ -485,7 +486,7 @@ function Editor({
{kind(r)}:{' '} {kind(r)}:{' '}
<Link <Link
className="underline" className="underline"
href={`${base}/${r.id}${management ? '' : `?from=${record.id}`}`} href={searchTerritoryHref(`${base}/${r.id}${management ? '' : `?from=${record.id}`}`, pageUrl)}
> >
{r.title} {r.title}
</Link> </Link>
+1
View File
@@ -47,6 +47,7 @@ use Laravel\Fortify\Features;
// Route::inertia('/', 'welcome')->name('home'); // Route::inertia('/', 'welcome')->name('home');
Route::get('/', [PortalServicesController::class, 'home'])->name('home'); Route::get('/', [PortalServicesController::class, 'home'])->name('home');
Route::inertia('/contextos-de-investimento', 'portal/investment-contexts')->name('portal.investment-contexts');
Route::inertia('/politica-de-privacidade', 'portal/privacy-policy')->name('legal.privacy'); Route::inertia('/politica-de-privacidade', 'portal/privacy-policy')->name('legal.privacy');
Route::inertia('/termos-de-uso', 'portal/terms-of-use')->name('legal.terms'); Route::inertia('/termos-de-uso', 'portal/terms-of-use')->name('legal.terms');
foreach (['sectores' => 'sectors', 'como-investir' => 'procedures', 'legislacao' => 'legislation', 'documentos' => 'documents', foreach (['sectores' => 'sectors', 'como-investir' => 'procedures', 'legislacao' => 'legislation', 'documentos' => 'documents',
@@ -0,0 +1,93 @@
<?php
namespace Tests\Feature;
use App\Services\InvestmentCatalogue;
use App\Services\InvestmentZones;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Tests\TestCase;
class CatalogueSelectorReferencesTest extends TestCase
{
use DatabaseTransactions;
protected function setUp(): void
{
parent::setUp();
$db = DB::selectOne('select current_database() as name, inet_server_port() as port');
$this->assertSame('simulator_fiscal_delta_20261021_test', $db->name);
$this->assertSame(55441, (int) $db->port);
$this->withoutVite();
}
public function test_public_parks_remain_selectable_with_zero_results_without_exposing_private_or_other_territories(): void
{
$province = '059b02ca-7095-577a-8705-4d4c46896747';
$template = app(InvestmentZones::class)->visible()->firstOrFail();
$ids = [];
foreach (['public', 'private', 'other'] as $case) {
$zone = $template->replicate();
$zone->id = (string) Str::uuid();
$zone->code = 'SINT-SELECTOR-'.Str::random(12);
$zone->name = 'SINTÉTICO QA '.$case;
$zone->category = 'industrial_park';
$zone->primary_territory_id = $case === 'other' ? '9e42dac8-fd9b-523f-bf59-71a7d3aa0fb8' : $province;
$zone->publication_status = $case === 'private' ? 'draft' : 'published';
$zone->source_evidence = [['source_type' => 'government', 'url' => 'https://example.test/qa-only', 'supports' => 'Synthetic QA fixture, not a legal source']];
$zone->save();
$ids[$case] = $zone->id;
}
$scope = ['province_id' => $province, 'park_id' => $ids['public'], 'q' => 'no-matching-opportunity-'.Str::uuid()];
$this->assertSame(0, app(InvestmentCatalogue::class)->query($scope)->count());
$response = $this->getJson('/api/v1/investment/references?'.http_build_query($scope))->assertOk();
$available = array_column($response->json('zones'), 'id');
$this->assertContains($ids['public'], $available);
$this->assertNotContains($ids['private'], $available);
$this->assertNotContains($ids['other'], $available);
$this->assertContains($ids['other'], array_column($this->getJson('/api/v1/investment/references')->assertOk()->json('zones'), 'id'));
$this->get('/zonas/'.$ids['public'])->assertOk();
$this->get('/zonas/'.$ids['private'])->assertNotFound();
}
public function test_activity_catalogue_does_not_disappear_when_opportunity_search_has_no_matches(): void
{
$catalogue = app(InvestmentCatalogue::class);
$global = collect($catalogue->references()['classification']['targets']['activity'])->pluck('id')->all();
$this->assertNotEmpty($global);
foreach (['059b02ca-7095-577a-8705-4d4c46896747', '9e42dac8-fd9b-523f-bf59-71a7d3aa0fb8'] as $province) {
$scope = ['province_id' => $province, 'q' => 'no-matching-opportunity-'.Str::uuid(), 'sector' => 'tourism'];
$this->assertSame(0, $catalogue->query($scope)->count());
$this->assertSame($global, collect($catalogue->references(false, $scope)['classification']['targets']['activity'])->pluck('id')->all());
}
}
public function test_public_master_structures_and_chain_are_available_without_opportunities_or_published_dossiers(): void
{
$province = '059b02ca-7095-577a-8705-4d4c46896747';
$clusters = [];
foreach (['public', 'internal'] as $visibility) {
$id = (string) Str::uuid();
DB::table('economic_clusters')->insert(['id' => $id, 'code' => 'SINT-'.Str::random(12), 'name' => 'SINTÉTICO QA cluster',
'sector' => 'QA', 'status' => 'active', 'data_classification' => $visibility, 'primary_territory_id' => $province]);
$clusters[$visibility] = $id;
}
$corridor = (string) Str::uuid();
DB::table('development_corridors')->insert(['id' => $corridor, 'code' => 'SINT-'.Str::random(12), 'name' => 'SINTÉTICO QA corredor',
'status' => 'active', 'data_classification' => 'public', 'primary_territory_id' => $province]);
$project = \App\Models\Project::factory()->create(['data_classification' => 'public', 'primary_territory_id' => $province]);
$chain = (string) Str::uuid();
DB::table('value_chains')->insert(['id' => $chain, 'cluster_id' => $clusters['public'], 'code' => 'SINT-'.Str::random(12),
'name' => 'SINTÉTICO QA cadeia', 'stage' => 'production', 'data_classification' => 'public']);
$refs = app(InvestmentCatalogue::class)->references(false, ['province_id' => $province, 'q' => 'no-matching-opportunity']);
$this->assertContains($clusters['public'], $refs['clusters']->pluck('id')->all());
$this->assertNotContains($clusters['internal'], $refs['clusters']->pluck('id')->all());
$this->assertContains($corridor, $refs['corridors']->pluck('id')->all());
$this->assertContains($project->id, $refs['projects']->pluck('id')->all());
$this->assertContains($chain, collect($refs['classification']['targets']['chain'])->pluck('id')->all());
$other = app(InvestmentCatalogue::class)->references(false, ['province_id' => '9e42dac8-fd9b-523f-bf59-71a7d3aa0fb8']);
$this->assertNotContains($clusters['public'], $other['clusters']->pluck('id')->all());
$this->assertNotContains($chain, collect($other['classification']['targets']['chain'])->pluck('id')->all());
}
}
+27
View File
@@ -0,0 +1,27 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { searchTerritoryHref } from '../../resources/js/lib/search-territory.ts';
test('portfolio to catalogue to related screen retains only territorial search filters', () => {
const start = '/carteira?province_id=inh&district_id=vil&q=airport&kind=project';
const catalogue = searchTerritoryHref('/oportunidades?view=grid', start);
assert.equal(catalogue, '/oportunidades?view=grid&province_id=inh&district_id=vil');
const detail = searchTerritoryHref('/carteira/id', catalogue);
assert.equal(searchTerritoryHref('/carteira', detail), '/carteira?province_id=inh&district_id=vil');
assert.equal(searchTerritoryHref('/zonas?category=zee', start), '/zonas?category=zee&province_id=inh&district_id=vil');
});
test('nested historical return query restores territory without importing unrelated filters', () => {
assert.equal(searchTerritoryHref('/oportunidades', '/carteira/id?catalogue_query='+encodeURIComponent('province_id=inh&district_id=vil&q=airport')), '/oportunidades?province_id=inh&district_id=vil');
});
test('explicit parent changes or clearing never import incompatible descendants', () => {
const current = '/oportunidades?province_id=inh&district_id=vil&admin_post_id=post&locality_id=loc';
assert.equal(searchTerritoryHref('/carteira?province_id=cabo', current), '/carteira?province_id=cabo');
assert.equal(searchTerritoryHref('/carteira?district_id=other', current), '/carteira?district_id=other&province_id=inh');
assert.equal(searchTerritoryHref('/carteira?province_id=', current), '/carteira?province_id=');
});
test('no cross-tab, project, account, external or unrelated route inheritance', () => {
assert.equal(searchTerritoryHref('/oportunidades','/carteira'), '/oportunidades');
assert.equal(searchTerritoryHref('/oportunidades','/investimentos/id?province_id=private'), '/oportunidades');
assert.equal(searchTerritoryHref('/investimentos/id','/carteira?province_id=inh'), '/investimentos/id');
assert.equal(searchTerritoryHref('https://other.test/carteira','/carteira?province_id=inh'), 'https://other.test/carteira');
});
+326
View File
@@ -0,0 +1,326 @@
// Actual public portal and navigation, synthetic API, local images, no database.
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const { chromium } = require(
process.env.CONTEXT_QA_PLAYWRIGHT ||
'C:/Users/jorge/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules/playwright',
);
const root = process.cwd();
const base = (
process.env.CONTEXT_QA_VITE || fs.readFileSync('public/hot', 'utf8')
).trim();
assert.equal(new URL(base).hostname, '127.0.0.1');
const dir = path.join(root, 'outputs/investment-context-compact-20261023');
fs.mkdirSync(dir, { recursive: true });
const fixturePath = '/outputs/investment-context-compact-20261023/fixture.html';
fs.writeFileSync(
path.join(dir, 'fixture.html'),
`<!doctype html><html lang="pt"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Cartões QA</title></head><body><div id="app"></div><script type="module" src="/outputs/investment-context-compact-20261023/fixture.tsx"></script></body></html>`,
);
fs.writeFileSync(
path.join(dir, 'fixture.tsx'),
`
import React from 'react';
import {createRoot} from 'react-dom/client';
import {createInertiaApp} from '@inertiajs/react';
import Portal from '../../resources/js/pages/PortalInvestidor';
import Navigation from '../../resources/js/layouts/portal-navigation';
import '../../resources/css/app.css';
await createInertiaApp({page:{component:'PortalInvestidor',props:{auth:{user:null,canManagePortal:false},essentialResources:[],countries:[]},url:'/',version:null},resolve:()=>Portal,layout:()=>Navigation,setup({el,App,props}){createRoot(el).render(<App {...props}/>);}});
`,
);
const destinations = [
['/clusters', 'Clusters', 'Cadeias de valor e lacunas produtivas.'],
['/corredores', 'Corredores', 'Territórios, logística e conexões.'],
[
'/projectos-ancora',
'Projectos âncora',
'Projectos estruturantes e relações.',
],
['/educacao', 'Educação', 'Investimentos em competências e formação.'],
[
'/documentos',
'Documentos e Formulários',
'Legislação, procedimentos, formulários e materiais de apoio.',
],
];
const browser = await chromium.launch({
headless: true,
...(process.env.CONTEXT_QA_CHROMIUM
? { executablePath: process.env.CONTEXT_QA_CHROMIUM }
: {}),
});
const errors = [],
results = [],
navigation = [];
let currentPage;
async function createCase(width, dpr = 1, fail = 'none') {
const context = await browser.newContext({
viewport: { width, height: 1000 },
deviceScaleFactor: dpr,
reducedMotion: 'reduce',
});
// Avoid development HMR reloading the fixture's synthetic homepage URL.
await context.routeWebSocket('**/*', () => {});
let releaseImages;
const imagesReady = new Promise((resolve) => {
releaseImages = resolve;
});
await context.route('**/*', async (route) => {
const url = new URL(route.request().url());
if (url.origin !== base) return route.abort();
if (url.pathname.startsWith('/images/')) {
if (url.pathname.startsWith('/images/investment-context/')) {
await imagesReady;
if (
fail === 'all' ||
(fail === 'primary' && !url.pathname.includes('-fallback'))
)
return route.fulfill({ status: 404 });
}
const file = path.resolve(root, 'public', '.' + url.pathname);
assert.ok(
file.startsWith(path.join(root, 'public', 'images') + path.sep),
);
return fs.existsSync(file)
? route.fulfill({ path: file })
: route.fulfill({ status: 404 });
}
if (url.pathname === '/api/v1/home')
return route.fulfill({
json: {
success: true,
data: {
sectors: [],
featuredOpportunities: [],
stats: { opportunities: 0, sectors: 0, provinces: 0 },
},
},
});
if (url.pathname.startsWith('/api/'))
return route.fulfill({ json: { data: [] } });
if (
route.request().isNavigationRequest() &&
destinations.some(([href]) => url.pathname === href)
) {
navigation.push(url.pathname);
return route.fulfill({
contentType: 'text/html',
body: '<!doctype html><html><body><h1>Destino de navegação de teste</h1></body></html>',
});
}
return route.continue();
});
const page = await context.newPage();
currentPage = page;
page.on('pageerror', (error) => errors.push(error.message));
await page.goto(base + fixturePath, {
waitUntil: 'domcontentloaded',
timeout: 60000,
});
const section = page.getByRole('region', {
name: 'Encontre o contexto do seu investimento',
});
await section.waitFor();
return { context, page, section, releaseImages };
}
try {
for (const [width, dpr] of [
[320, 1],
[390, 2],
[768, 1],
[1024, 1],
[1440, 2],
[1920, 1],
]) {
const { context, page, section, releaseImages } = await createCase(
width,
dpr,
);
const links = section.getByRole('link');
assert.equal(await links.count(), 5);
assert.equal(await section.locator('img').count(), 5);
const before = await links.evaluateAll((nodes) =>
nodes.map((node) => node.getBoundingClientRect().height),
);
releaseImages();
for (const img of await section.locator('img').all()) {
await img.scrollIntoViewIfNeeded();
await img.evaluate((image) => image.decode());
}
const photos = await section.locator('img').evaluateAll((nodes) =>
nodes.map((image) => ({
src: image.currentSrc,
alt: image.alt,
lazy: image.loading,
width: image.naturalWidth,
height: image.naturalHeight,
fit: getComputedStyle(image).objectFit,
ratio:
image.getBoundingClientRect().width /
image.getBoundingClientRect().height,
})),
);
assert.equal(new Set(photos.map((image) => image.src)).size, 5);
photos.forEach((image) => {
assert.ok(image.alt.length > 20);
assert.equal(image.lazy, 'lazy');
// naturalWidth is density corrected when srcset uses width descriptors.
assert.ok(image.width > 0 && image.height > 0);
assert.equal(image.fit, 'cover');
assert.ok(Math.abs(image.ratio - 16 / 9) < 0.01);
});
const after = await links.evaluateAll((nodes) =>
nodes.map((node) => node.getBoundingClientRect().height),
);
before.forEach((height, index) =>
assert.ok(
Math.abs(height - after[index]) < 1,
'Image caused card layout shift',
),
);
const rows = await links.evaluateAll((nodes) =>
nodes.map((node) => {
const rect = node.getBoundingClientRect();
return { top: rect.top, height: rect.height };
}),
);
for (const row of rows) {
const aligned = rows.filter(
(item) => Math.abs(item.top - row.top) < 1,
);
assert.ok(
aligned.every((item) => Math.abs(item.height - row.height) < 1),
'Unequal heights within a card row',
);
}
const columns = await section
.locator('nav')
.evaluate(
(node) =>
getComputedStyle(node).gridTemplateColumns.split(' ')
.length,
);
assert.equal(columns, width >= 1024 ? 4 : width >= 640 ? 2 : 1);
assert.equal(
await page.evaluate(
() => document.documentElement.scrollWidth > innerWidth,
),
false,
);
for (const [href, title, description] of destinations) {
const link = section.getByRole('link', {
name: title,
exact: true,
});
assert.equal(await link.getAttribute('href'), href);
assert.equal(
(await link.locator('p').textContent()).trim(),
description,
);
}
assert.equal(await page.locator('.tempo-header').count(), 1);
assert.equal(await page.locator('.portal-hero').count(), 1);
await section.screenshot({
path: path.join(dir, `cards-${width}-dpr${dpr}.png`),
});
if (width === 1440) {
for (const [href, title] of destinations) {
const link = section.getByRole('link', {
name: title,
exact: true,
});
await link.focus();
await page.keyboard.press('Enter');
await page.waitForURL(base + href);
assert.equal(navigation.at(-1), href);
await page.goto(base + fixturePath, {
waitUntil: 'networkidle',
});
await section.waitFor();
}
}
results.push({
width,
dpr,
columns,
photos: photos.map(({ src, width, height }) => ({
src,
width,
height,
})),
status: 'passed',
});
await context.close();
}
for (const fail of ['primary', 'all']) {
const { context, page, section, releaseImages } = await createCase(
390,
2,
fail,
);
releaseImages();
for (const link of await section.getByRole('link').all())
await link.scrollIntoViewIfNeeded();
if (fail === 'primary') {
await page.waitForFunction(
() =>
[
...document.querySelectorAll(
'#investment-context-heading + nav img',
),
].length === 5 &&
[
...document.querySelectorAll(
'#investment-context-heading + nav img',
),
].every(
(image) =>
image.complete &&
image.naturalWidth > 0 &&
image.currentSrc.includes('-fallback'),
),
);
} else {
await section
.getByText('Imagem indisponível', { exact: true })
.nth(4)
.waitFor();
assert.equal(await section.getByRole('link').count(), 5);
assert.equal(await section.locator('[role="img"]').count(), 5);
}
await section.screenshot({
path: path.join(dir, `fallback-${fail}.png`),
});
results.push({ fail, status: 'passed' });
await context.close();
}
assert.deepEqual(errors, []);
fs.writeFileSync(
path.join(dir, 'qa-results.json'),
JSON.stringify(
{ results, errors, navigation, databaseAccess: false },
null,
2,
),
);
console.log(JSON.stringify({ cases: results.length, errors, navigation }));
} catch (error) {
if (currentPage && !currentPage.isClosed()) {
await Promise.all([
Promise.resolve(
currentPage.screenshot({ path: path.join(dir, 'failure.png') }),
),
Promise.resolve(currentPage.content()).then((html) =>
fs.writeFileSync(path.join(dir, 'failure.html'), html),
),
]);
}
throw error;
} finally {
await browser.close();
}
+417
View File
@@ -0,0 +1,417 @@
// Real portal components in Vite, synthetic public data, no Laravel/database access.
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const { chromium } = require(
process.env.HERO_QA_PLAYWRIGHT ||
'C:/Users/jorge/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules/playwright',
);
const root = process.cwd();
const base = process.env.HERO_QA_VITE || 'http://127.0.0.1:5173';
assert.equal(new URL(base).hostname, '127.0.0.1');
const dir = path.join(root, 'outputs/portal-hero-no-controls-20261023');
const before = process.argv.includes('--before');
fs.mkdirSync(dir, { recursive: true });
if (before) assert.ok(!fs.existsSync(path.join(dir, 'before-results.json')));
const fixtureProps = {
auth: { user: null, canManagePortal: false },
essentialResources: [],
countries: [],
};
fs.writeFileSync(
path.join(dir, 'fixture.html'),
`<!doctype html>
<html lang="pt"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Portal QA</title></head>
<body><div id="app"></div><script type="module" src="/outputs/portal-hero-no-controls-20261023/fixture.tsx"></script></body></html>`,
);
fs.writeFileSync(
path.join(dir, 'fixture.tsx'),
`
import React from 'react';
import { createRoot } from 'react-dom/client';
import { createInertiaApp } from '@inertiajs/react';
import Portal from '../../resources/js/pages/PortalInvestidor';
import PortalNavigation from '../../resources/js/layouts/portal-navigation';
import '../../resources/css/app.css';
await createInertiaApp({page:{component:'PortalInvestidor',props:${JSON.stringify(fixtureProps)},url:'/',version:null},
resolve:()=>Portal,layout:()=>PortalNavigation,setup({el,App,props}){createRoot(el).render(<App {...props}/>);}});
`,
);
const browser = await chromium.launch({
headless: true,
...(process.env.HERO_QA_CHROMIUM
? { executablePath: process.env.HERO_QA_CHROMIUM }
: {}),
});
const results = [];
const errors = [];
const requests = [];
let activePage;
try {
const cases = before
? [
[1440, 'reduce'],
[390, 'reduce'],
]
: [
[320, 'reduce'],
[390, 'reduce'],
[768, 'reduce'],
[1440, 'reduce'],
[1920, 'reduce'],
[390, 'no-preference'],
[1440, 'no-preference'],
];
for (const [width, reducedMotion] of cases) {
const context = await browser.newContext({
viewport: { width, height: 1000 },
reducedMotion,
});
await context.route('**/*', async (route) => {
const url = new URL(route.request().url());
if (url.origin !== base) return route.abort();
if (url.pathname.startsWith('/images/')) {
const file = path.resolve(root, 'public', `.${url.pathname}`);
assert.ok(
file.startsWith(
path.join(root, 'public', 'images') + path.sep,
),
);
return fs.existsSync(file)
? route.fulfill({ path: file })
: route.fulfill({ status: 404 });
}
if (url.pathname === '/api/v1/home')
return route.fulfill({
json: {
success: true,
data: {
sectors: [
{
slug: 'energia',
name: 'Energia',
shortDescription: 'Energia de demonstração',
opportunitiesCount: 6,
},
],
stats: {
opportunities: 6,
sectors: 1,
provinces: 3,
},
featuredOpportunities: [],
},
},
});
if (url.pathname.startsWith('/api/'))
return route.fulfill({
json: { data: [], total: 0, current_page: 1, last_page: 1 },
});
if (route.request().headers()['x-inertia']) {
requests.push(url.pathname + url.search);
return route.fulfill({
headers: { 'X-Inertia': 'true' },
json: {
component: 'PortalInvestidor',
props: {
...fixtureProps,
initialView: 'opportunities',
initialQuery: url.searchParams.get('q') || '',
},
url: url.pathname + url.search,
version: null,
},
});
}
return route.continue();
});
const page = await context.newPage();
activePage = page;
page.on('pageerror', (error) => errors.push(error.message));
await page.goto(
`${base}/outputs/portal-hero-no-controls-20261023/fixture.html`,
{
waitUntil: 'networkidle',
timeout: 60000,
},
);
const search = page.locator('#portal-opportunity-search');
await search.waitFor();
await page.getByText('6', { exact: true }).first().waitFor();
assert.equal(await page.locator('h1').count(), 1);
assert.equal(await page.locator('.tempo-header').count(), 1);
await page
.locator('.portal-hero img')
.evaluateAll((images) =>
Promise.all(images.map((image) => image.decode())),
);
await page.screenshot({
path: path.join(
dir,
`${before ? 'before' : 'after'}-${width}-${reducedMotion}.png`,
),
fullPage: false,
});
assert.equal(
await page.evaluate(
() => document.documentElement.scrollWidth > innerWidth,
),
false,
`overflow at ${width}`,
);
assert.ok(
await page
.getByRole('link', {
name: /^Documentos e Formulários/,
})
.count(),
);
if (!before) {
const hero = page.getByRole('region', {
name: 'INVISTA EM MOÇAMBIQUE',
});
assert.equal(
await hero
.getByRole('group', { name: 'Imagens de apresentação' })
.count(),
0,
);
assert.equal(
await hero
.getByRole('button', {
name: /Mostrar imagem|Pausar apresentação|Retomar apresentação/,
})
.count(),
0,
);
assert.equal(
await hero.getByRole('link', { name: 'Termos de uso' }).count(),
0,
);
const images = hero.locator('img');
assert.equal(await images.count(), 2);
assert.ok(
await images.evaluateAll((nodes) =>
nodes.every(
(image) => image.complete && image.naturalWidth > 0,
),
),
);
const fullTitle = 'INVISTA EM MOÇAMBIQUE';
const fullSubtitle =
'Transforme informação em decisões e ideias em negócios reais.';
const title = hero.locator('h1 [data-hero-typed]');
const subtitle = hero.locator('p [data-hero-typed]');
if (reducedMotion === 'no-preference') {
await search.focus();
const positionBefore = await search.boundingBox();
await page.waitForFunction(
({ heading, tagline }) =>
document.querySelector('h1 [data-hero-typed]')
.textContent === heading &&
document.querySelector('p [data-hero-typed]')
.textContent === tagline,
{ heading: fullTitle, tagline: fullSubtitle },
);
const positionAfter = await search.boundingBox();
assert.ok(
Math.abs(positionAfter.y - positionBefore.y) < 0.5,
'Search moved during typing',
);
await page.screenshot({
path: path.join(dir, 'typed-' + width + '.png'),
});
const active = await images.evaluateAll((nodes) =>
nodes.findIndex((node) =>
node.classList.contains('opacity-100'),
),
);
await page.waitForTimeout(8300);
assert.equal(
await images.evaluateAll((nodes) =>
nodes.findIndex((node) =>
node.classList.contains('opacity-100'),
),
),
active,
);
await search.evaluate((element) => element.blur());
await page.mouse.move(0, 0);
await page.waitForFunction(
(previous) =>
[
...document.querySelectorAll('.portal-hero img'),
].findIndex((image) =>
image.classList.contains('opacity-100'),
) !== previous,
active,
{ timeout: 12000 },
);
assert.ok(
(await title.textContent()).length < fullTitle.length,
'Automatic slide did not replay typing',
);
await page.waitForFunction(
({ heading, tagline }) =>
document.querySelector('h1 [data-hero-typed]')
.textContent === heading &&
document.querySelector('p [data-hero-typed]')
.textContent === tagline,
{ heading: fullTitle, tagline: fullSubtitle },
);
await page.screenshot({
path: path.join(dir, 'second-image-' + width + '.png'),
});
} else {
assert.equal(await title.textContent(), fullTitle);
assert.equal(await subtitle.textContent(), fullSubtitle);
assert.equal(
await hero.locator('.portal-hero-caret').count(),
0,
);
}
}
// Exercise the real parent handler and Inertia request with accents and punctuation.
await search.fill(' energia & Nampula / Moçambique ');
if (!before && width === 390) {
await search.focus();
await page.keyboard.press('Tab');
assert.equal(
await page
.getByRole('button', { name: 'Pesquisar', exact: true })
.evaluate((el) => el === document.activeElement),
true,
);
await page.keyboard.press('Enter');
} else if (!before && width === 768) {
await page
.getByRole('button', { name: 'Pesquisar', exact: true })
.click();
} else {
await search.press('Enter');
}
await page
.getByRole('heading', {
name: 'Oportunidades de investimento',
exact: true,
})
.waitFor();
const last = new URL(requests.at(-1), base);
assert.equal(last.pathname, '/oportunidades');
assert.equal(
last.searchParams.get('q'),
before
? ' energia & Nampula / Moçambique '
: 'energia & Nampula / Moçambique',
);
if (!before && width === 390) {
const home = `${base}/outputs/portal-hero-no-controls-20261023/fixture.html`;
await page.goto(home, { waitUntil: 'networkidle' });
await page.locator('#portal-opportunity-search').fill(' ');
await page
.getByRole('button', { name: 'Pesquisar', exact: true })
.click();
await page
.getByRole('heading', {
name: 'Oportunidades de investimento',
exact: true,
})
.waitFor();
assert.equal(
new URL(requests.at(-1), base).searchParams.get('q'),
'',
);
await page.goto(home, { waitUntil: 'networkidle' });
await page
.getByRole('button', {
name: 'Consultar oportunidades',
exact: true,
})
.click();
await page
.getByRole('heading', {
name: 'Oportunidades de investimento',
exact: true,
})
.waitFor();
assert.equal(
new URL(requests.at(-1), base).pathname,
'/oportunidades',
);
await context.route('**/api/v1/home', (route) =>
route.fulfill({
status: 500,
json: { message: 'Synthetic failure' },
}),
);
await page.goto(home, { waitUntil: 'networkidle' });
await page.getByRole('alert').waitFor();
assert.deepEqual(
await page
.locator('dl[aria-label="Indicadores do portal"] dd')
.allTextContents(),
['—', '—', '—'],
);
await context.route('**/api/v1/home', (route) =>
route.fulfill({
json: {
success: true,
data: {
sectors: [],
featuredOpportunities: [],
stats: {
opportunities: 0,
sectors: 0,
provinces: 0,
},
},
},
}),
);
await page.goto(home, { waitUntil: 'networkidle' });
assert.deepEqual(
await page
.locator('dl[aria-label="Indicadores do portal"] dd')
.allTextContents(),
['0', '0', '0'],
);
}
results.push({ width, reducedMotion, status: 'passed' });
await context.close();
}
assert.deepEqual(errors, []);
fs.writeFileSync(
path.join(dir, before ? 'before-results.json' : 'qa-results.json'),
JSON.stringify(
{ results, errors, requests, databaseAccess: false },
null,
2,
),
);
console.log(JSON.stringify({ results, errors }));
} catch (error) {
if (activePage && !activePage.isClosed()) {
await activePage.screenshot({ path: path.join(dir, 'failure.png') });
fs.writeFileSync(
path.join(dir, 'failure.html'),
await activePage.content(),
);
console.error(
JSON.stringify(
await activePage.locator('h1').evaluateAll((nodes) =>
nodes.map((node) => ({
text: node.textContent,
html: node.outerHTML,
})),
),
),
);
console.error(JSON.stringify(errors));
}
throw error;
} finally {
await browser.close();
}
+417
View File
@@ -0,0 +1,417 @@
// Public React/Inertia screens with synthetic sectors and local assets; no database.
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const { chromium } = require(
process.env.SECTORS_QA_PLAYWRIGHT ||
'C:/Users/jorge/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/node_modules/playwright',
);
const root = process.cwd();
const base = (
process.env.SECTORS_QA_VITE || fs.readFileSync('public/hot', 'utf8')
).trim();
assert.equal(new URL(base).hostname, '127.0.0.1');
const dir = path.join(root, 'outputs/home-sectors-20261023');
fs.mkdirSync(dir, { recursive: true });
const sectors = [
[
'agronegocio',
'Agronegócio',
'Produção, agroprocessamento, irrigação e cadeias de valor agrícolas.',
],
[
'turismo',
'Turismo',
'Hotelaria, turismo costeiro, cultural e ecológico.',
],
[
'infraestruturas',
'Infraestruturas',
'Logística, transportes, parques industriais e energia.',
],
[
'economia-azul',
'Economia Azul',
'Pesca, aquacultura, portos e logística marítima.',
],
[
'mercado-financeiro',
'Mercado Financeiro',
'Fintech, capital de risco e instrumentos financeiros.',
],
['mineracao', 'Mineração', null],
['energia-especifica', 'Energia', null],
['imobiliario', 'Imobiliário', null],
['bens-de-consumo-e-franquias', 'Bens de Consumo e Franquias', null],
['tecnologias-de-informacao', 'Tecnologias de Informação', null],
].map(([slug, name, description], index) => ({
id: index + 1,
slug,
name,
shortDescription: description,
short_description: description,
description,
opportunitiesCount: index === 4 ? 4 : 0,
opportunities_count: index === 4 ? 4 : 0,
url: `/sectores/${slug}`,
specializations:
index === 4
? [
{
id: 901,
name: 'Mercado Financeiro — Fintech',
slug: 'fintech',
url: '/sectores/mercado-financeiro/fintech',
},
]
: [],
}));
const fixturePath = '/outputs/home-sectors-20261023/fixture.html';
const html =
'<!doctype html><html lang="pt"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Sectores QA</title></head><body><div id="app"></div><script type="module" src="/outputs/home-sectors-20261023/fixture.tsx"></script></body></html>';
fs.writeFileSync(path.join(dir, 'fixture.html'), html);
fs.writeFileSync(
path.join(dir, 'fixture.tsx'),
`
import React from 'react';
import {createRoot} from 'react-dom/client';
import {createInertiaApp} from '@inertiajs/react';
import Portal from '../../resources/js/pages/PortalInvestidor';
import Services from '../../resources/js/pages/portal/services';
import Navigation from '../../resources/js/layouts/portal-navigation';
import '../../resources/css/app.css';
const sectors=${JSON.stringify(sectors)};
const url=new URL(location.href),catalogue=url.pathname==='/sectores',detail=url.pathname.startsWith('/sectores/');
const selected=sectors.find(sector=>sector.url===url.pathname)||{id:901,name:'Fintech',slug:'fintech',description:null,short_description:null};
const props={auth:{user:null,canManagePortal:false},countries:[],essentialResources:[],...(catalogue?{section:'sectors',sectors:url.searchParams.has('empty')?[]:sectors}:detail?{section:'sector',sector:selected,opportunities:[]}:{} )};
await createInertiaApp({page:{component:catalogue||detail?'portal/services':'PortalInvestidor',props,url:url.pathname+url.search,version:null},resolve:()=>catalogue||detail?Services:Portal,layout:()=>Navigation,setup({el,App,props}){createRoot(el).render(<App {...props}/>);}});
`,
);
const browser = await chromium.launch({
headless: true,
...(process.env.SECTORS_QA_CHROMIUM
? { executablePath: process.env.SECTORS_QA_CHROMIUM }
: {}),
});
// Full navigations need Vite's transformed HTML, including the React preamble.
const fixtureResponse = await fetch(base + fixturePath);
assert.ok(fixtureResponse.ok);
const navigationHtml = await fixtureResponse.text();
const errors = [],
results = [],
navigation = [];
let currentPage;
async function openCase(width, { empty = false, fail = 'none' } = {}) {
const context = await browser.newContext({
viewport: { width, height: 1000 },
reducedMotion: 'reduce',
});
await context.routeWebSocket('**/*', () => {});
await context.route('**/*', (route) => {
const url = new URL(route.request().url());
if (url.origin !== base) return route.abort();
if (url.pathname.startsWith('/images/')) {
if (
url.pathname.startsWith('/images/sectors/') &&
(fail === 'all' ||
(fail === 'primary' &&
!url.pathname.includes('outros-sectores')))
)
return route.fulfill({ status: 404 });
const file = path.resolve(root, 'public', '.' + url.pathname);
assert.ok(
file.startsWith(path.join(root, 'public', 'images') + path.sep),
);
return fs.existsSync(file)
? route.fulfill({ path: file })
: route.fulfill({ status: 404 });
}
if (url.pathname === '/api/v1/home')
return route.fulfill({
json: {
success: true,
data: {
sectors: empty ? [] : sectors,
featuredOpportunities: [],
stats: {
opportunities: 4,
sectors: empty ? 0 : 10,
provinces: 3,
},
},
},
});
if (url.pathname.startsWith('/api/'))
return route.fulfill({ json: { data: [] } });
if (
route.request().isNavigationRequest() &&
(url.pathname === '/sectores' ||
url.pathname.startsWith('/sectores/') ||
url.pathname === '/')
) {
navigation.push(url.pathname);
return route.fulfill({
contentType: 'text/html',
body: navigationHtml,
});
}
return route.continue();
});
const page = await context.newPage();
currentPage = page;
page.on('pageerror', (error) => errors.push(error.message));
await page.goto(base + fixturePath, {
waitUntil: 'networkidle',
timeout: 60000,
});
return { context, page };
}
async function loadImages(region) {
for (const image of await region.locator('img').all()) {
await image.scrollIntoViewIfNeeded();
await region
.page()
.waitForFunction(
(node) => node.complete && node.naturalWidth > 0,
await image.elementHandle(),
{ timeout: 15000 },
);
}
}
try {
for (const width of [320, 390, 768, 1024, 1440, 1920]) {
const { context, page } = await openCase(width);
const section = page.getByRole('region', {
name: 'Sectores de investimento',
exact: true,
});
await section.waitFor();
await loadImages(section);
assert.equal(await section.getByRole('article').count(), 5);
assert.deepEqual(
await section.locator('h3').allTextContents(),
sectors.slice(0, 5).map((s) => s.name),
);
assert.equal(
await section
.getByRole('link', { name: /^Ler mais sobre / })
.count(),
5,
);
assert.ok(
await section.getByText('0 oportunidades', { exact: true }).count(),
);
assert.equal(
await section.getByText('4 oportunidades', { exact: true }).count(),
1,
);
assert.equal(
await section
.getByRole('link', { name: 'Especialização: Fintech' })
.getAttribute('href'),
'/sectores/mercado-financeiro/fintech',
);
const headings = await page.locator('main h2').evaluateAll((nodes) =>
nodes.map((node) => ({
title: node.textContent.trim(),
size: getComputedStyle(node).fontSize,
weight: getComputedStyle(node).fontWeight,
color: getComputedStyle(node).color,
lineHeight: getComputedStyle(node).lineHeight,
})),
);
assert.equal(headings.length, 6);
headings.forEach((heading) => {
assert.equal(heading.color, 'rgb(237, 28, 36)');
assert.equal(heading.size, '24px');
assert.equal(heading.weight, '700');
assert.equal(heading.lineHeight, '32px');
});
const homeColumns = await section
.locator(':scope > div')
.first()
.locator(':scope > div')
.evaluate(
(node) =>
getComputedStyle(node).gridTemplateColumns.split(' ')
.length,
);
assert.equal(homeColumns, width >= 1024 ? 5 : width >= 640 ? 3 : 2);
assert.equal(
await page.evaluate(
() => document.documentElement.scrollWidth > innerWidth,
),
false,
);
await section.screenshot({
path: path.join(dir, `home-sectors-${width}.png`),
});
if (width === 1440)
await page.screenshot({
path: path.join(dir, 'homepage-1440.png'),
fullPage: true,
});
const more = section.getByRole('link', {
name: 'Ver mais sectores',
exact: true,
});
assert.equal(await more.getAttribute('href'), '/sectores');
await more.focus();
await page.keyboard.press('Enter');
await page.waitForURL(base + '/sectores');
await page
.getByRole('heading', {
name: 'Sectores de investimento',
exact: true,
})
.waitFor();
const catalogue = page.getByRole('region', {
name: 'Todos os sectores de investimento',
});
await loadImages(catalogue);
assert.equal(await catalogue.getByRole('article').count(), 10);
assert.deepEqual(
await catalogue.locator('h3').allTextContents(),
sectors.map((s) => s.name),
);
assert.equal(
await catalogue
.getByRole('link', { name: /^Ler mais sobre / })
.count(),
10,
);
assert.equal(
await page.evaluate(
() => document.documentElement.scrollWidth > innerWidth,
),
false,
);
await catalogue.screenshot({
path: path.join(dir, `catalogue-${width}.png`),
});
if (width === 1440) {
for (const sector of sectors) {
await catalogue
.getByRole('link', {
name: `Ler mais sobre ${sector.name}`,
exact: true,
})
.click();
await page.waitForURL(base + sector.url);
await page
.getByRole('heading', { name: sector.name, exact: true })
.waitFor();
await page.goto(base + '/sectores', {
waitUntil: 'networkidle',
});
await catalogue.waitFor();
}
await catalogue
.getByRole('link', { name: 'Especialização: Fintech' })
.click();
await page.waitForURL(
base + '/sectores/mercado-financeiro/fintech',
);
await page
.getByRole('heading', { name: 'Fintech', exact: true })
.waitFor();
await page.goto(base + '/sectores', { waitUntil: 'networkidle' });
await catalogue
.getByRole('link', { name: 'Voltar ao início' })
.click();
await page.waitForURL(base + '/');
await page
.getByRole('region', {
name: 'Sectores de investimento',
exact: true,
})
.waitFor();
}
results.push({
width,
homeSectors: 5,
catalogueSectors: 10,
homeColumns,
headings,
status: 'passed',
});
await context.close();
}
for (const fail of ['primary', 'all']) {
const { context, page } = await openCase(390, { fail });
const section = page.getByRole('region', {
name: 'Sectores de investimento',
exact: true,
});
await section.waitFor();
for (const article of await section.getByRole('article').all())
await article.scrollIntoViewIfNeeded();
await page.waitForFunction((mode) => {
const cards = [
...document.querySelectorAll(
'#home-sectors-heading ~ div article',
),
];
return (
cards.length === 5 &&
cards.every((card) =>
mode === 'all'
? !card.querySelector('img')
: card.querySelector('img')?.complete &&
card.querySelector('img')?.naturalWidth > 0 &&
card
.querySelector('img')
?.currentSrc.includes('outros-sectores'),
)
);
}, fail);
assert.equal(
await section
.getByRole('link', { name: /^Ler mais sobre / })
.count(),
5,
);
await section.screenshot({
path: path.join(dir, `fallback-${fail}.png`),
});
results.push({ fail, status: 'passed' });
await context.close();
}
const { context, page } = await openCase(390, { empty: true });
const section = page.getByRole('region', {
name: 'Sectores de investimento',
exact: true,
});
await section.getByText('Não existem sectores publicados.').waitFor();
assert.equal(await section.getByRole('article').count(), 0);
await page.goto(base + '/sectores?empty=1', { waitUntil: 'networkidle' });
await page.getByText('Não existem sectores publicados.').waitFor();
results.push({ emptyCatalogue: true, status: 'passed' });
await context.close();
assert.deepEqual(errors, []);
fs.writeFileSync(
path.join(dir, 'qa-results.json'),
JSON.stringify(
{ results, errors, navigation, databaseAccess: false },
null,
2,
),
);
console.log(JSON.stringify({ cases: results.length, errors, navigation }));
} catch (error) {
if (currentPage && !currentPage.isClosed())
await Promise.all([
Promise.resolve(
currentPage.screenshot({ path: path.join(dir, 'failure.png') }),
),
Promise.resolve(currentPage.content()).then((html) =>
fs.writeFileSync(path.join(dir, 'failure.html'), html),
),
]);
throw error;
} finally {
await browser.close();
}