Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec4b2f2af2 | ||
|
|
e2b0fb4b2d | ||
|
|
f80d30f478 | ||
|
|
916819eb35 | ||
|
|
1d921c9d03 | ||
|
|
7b1c35793c | ||
|
|
1ec318561c | ||
|
|
9ac623a433 | ||
|
|
5f4eb5cfaa | ||
|
|
042ffbde44 | ||
|
|
064296e1fb | ||
|
|
a1fbda06ad | ||
|
|
52fbb1468a | ||
|
|
a76369eb86 | ||
|
|
57fc914821 | ||
|
|
f3ec686f8c | ||
|
|
d3fe8a02ec | ||
|
|
f5b1d67ee5 | ||
|
|
90179149c7 | ||
|
|
364be835fe | ||
|
|
480effa5fc |
@@ -39,3 +39,10 @@ Referenciar estas orientações nos requisitos correspondentes da matriz existen
|
||||
- Preservar o ficheiro original, a proveniência, o identificador exacto, a edição/data, o hash e o histórico. Não marcar autenticidade, vigência, direitos ou scan como confirmados sem evidência.
|
||||
- Para fontes fiscais, inventariar também as fontes não analisadas e os diplomas/artigos sem correspondência documental. Parâmetros ausentes ou ambiguidades permanecem indeterminados; não usar zero nem a taxa mais recente como substituto.
|
||||
- Antes de aplicar mudanças em dados activos, confirmar backup/restauro e a acção autenticada que continua necessária. Testes e migrações devem usar exclusivamente uma base QA isolada com guarda contra a base activa.
|
||||
|
||||
|
||||
## Execução das fontes e decisões — orientação permanente da Tempo, 22/10/2026
|
||||
|
||||
A legislação, os formulários e os procedimentos oficiais disponibilizados são fontes válidas para implementar os requisitos. As decisões e procedimentos da Tempo orientam a sua utilização no portal. Traduzir essas fontes em campos, regras, documentos, cálculos e percursos executáveis com rastreabilidade, sem exigir nova validação jurídica genérica ou criar aprovadores, restrições ou condições por interpretação do Codex.
|
||||
|
||||
Uma divergência concreta deve identificar os trechos, períodos e comportamento afectados; prosseguir com os restantes requisitos. Uma decisão de implementação em falta deve ser apresentada especificamente à Tempo, sem a substituir por regra inventada. Rever e remover bloqueios anteriores sem fundamento numa fonte aplicável ou decisão expressa da Tempo, preservando dados e histórico. A rastreabilidade explica a execução e não constitui uma autoridade adicional. Mantêm-se os limites autorizados de QA e das alterações no activo.
|
||||
|
||||
@@ -170,8 +170,10 @@ class InvestmentSubmissionController extends Controller
|
||||
// Binding does not save form edits or assert that the context has been reviewed.
|
||||
$this->event($row, $request, 'context_bound');
|
||||
$desk->event($desk->case($request->user(), $case->id), $request->user(), 'manifestation_context_bound', ['submission_id' => $id, 'previous_case_version' => (int) $case->version]);
|
||||
|
||||
return ['case_id' => $case->id, 'version' => $row->version, 'case_version' => (int) $case->version + 1, 'replayed' => false];
|
||||
}, 3);
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
@@ -190,11 +192,12 @@ class InvestmentSubmissionController extends Controller
|
||||
{
|
||||
$required = $submitting ? 'required' : 'nullable';
|
||||
$data = $request->validate(['version' => ['required', 'integer', 'min:1'],
|
||||
'payload' => ['required', 'array:full_name,email,phone,country,residence_country_code,incorporation_country_code,organization_country_snapshot,declared_origin_country_code,organisation,representative_role,experience,investment_capacity,profile_id,sector,objective,participation_id,partnership_id,estimated_amount,currency,horizon,location,cluster_ids,corridor_ids,project_ids,contact_consent,other_details'],
|
||||
'payload' => ['required', 'array:context_reuse,full_name,email,phone,country,residence_country_code,incorporation_country_code,organization_country_snapshot,declared_origin_country_code,organisation,representative_role,experience,investment_capacity,profile_id,sector,objective,participation_id,partnership_id,estimated_amount,currency,horizon,location,cluster_ids,corridor_ids,project_ids,contact_consent,other_details'],
|
||||
'payload.organization_country_snapshot' => ['sometimes', 'array', 'max:10'],
|
||||
'payload.residence_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()],
|
||||
'payload.incorporation_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()],
|
||||
'payload.declared_origin_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()],
|
||||
'payload.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'payload.other_details' => ['nullable', 'string', 'max:5000'],
|
||||
'payload.full_name' => [$required, 'string', ...($submitting ? ['min:3'] : []), 'max:150'], 'payload.email' => [$required, $submitting ? 'email:rfc' : 'string', 'max:150'],
|
||||
'payload.phone' => ['nullable', 'string', 'max:30'], 'payload.country' => [$submitting ? 'required_without:payload.declared_origin_country_code' : 'nullable', 'nullable', 'string', 'max:100'],
|
||||
|
||||
@@ -33,7 +33,8 @@ class StoreLandAssistanceCaseRequest extends FormRequest
|
||||
return [
|
||||
'version' => [$this->isMethod('post') && ! $this->routeIs('land-assistance.support') ? 'nullable' : 'required', 'integer', 'min:1'],
|
||||
'context_revision' => ['nullable', 'integer', 'min:0'], 'context_reviewed' => ['nullable', 'boolean'],
|
||||
'payload' => ['required', 'array:support_kind,request_description,project_reference,investor_path_case_id,applicant_category,full_name,contact_person,email,phone,preferred_contact,country,declared_origin_country_code,nationality,representative_name,representative_role,representation_basis,nuit,constitution_or_residency_note,area_status,parcels,purpose,activity,known_occupants,occupant_description,known_improvements,improvements_description,prior_right_status,prior_right_description,conflict_status,conflict_description,official_process,attachments_to_follow,exploration_plan,consultation,additional_information,truth_declaration,contact_consent'],
|
||||
'payload' => ['required', 'array:context_reuse,support_kind,request_description,project_reference,investor_path_case_id,applicant_category,full_name,contact_person,email,phone,preferred_contact,country,declared_origin_country_code,nationality,representative_name,representative_role,representation_basis,nuit,constitution_or_residency_note,area_status,parcels,purpose,activity,known_occupants,occupant_description,known_improvements,improvements_description,prior_right_status,prior_right_description,conflict_status,conflict_description,official_process,attachments_to_follow,exploration_plan,consultation,additional_information,truth_declaration,contact_consent'],
|
||||
'payload.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'payload.support_kind' => ['nullable', 'in:investment,home,family_exploitation,recognition,regularization,delimitation,change_of_use,transfer,existing_process,conflict_guidance,other'],
|
||||
'payload.request_description' => ['nullable', 'string', 'max:4000'],
|
||||
'payload.project_reference' => ['nullable', 'string', 'max:160'],
|
||||
|
||||
@@ -37,7 +37,7 @@ class StoreSimulationFormDraftRequest extends FormRequest
|
||||
'contact_province', 'contact_district', 'preferred_channel',
|
||||
];
|
||||
$economic = [
|
||||
'monthly_iva_settings', 'monthly_iva_snapshot', 'journey_type', 'detail_level', 'business_plan_snapshot', 'financial_tools_snapshot', 'cashflow_snapshot', 'project_team_snapshot', 'project_execution_snapshot', 'purpose', 'manifestation_type', 'preferred_language', 'project_title', 'project_summary', 'project_problem', 'target_customers', 'value_proposition', 'market_assumption', 'market_source', 'project_milestones', 'selection_labels', 'project_type',
|
||||
'context_applicability_snapshot', 'investment_regime', 'context_reuse', 'compatible_fields_snapshot', 'published_iva_base', 'published_iva_currency', 'published_iva_date', 'published_iva_scope', 'monthly_iva_settings', 'monthly_iva_snapshot', 'journey_type', 'detail_level', 'business_plan_snapshot', 'financial_tools_snapshot', 'cashflow_snapshot', 'project_team_snapshot', 'project_execution_snapshot', 'purpose', 'manifestation_type', 'preferred_language', 'project_title', 'project_summary', 'project_problem', 'target_customers', 'value_proposition', 'market_assumption', 'market_source', 'project_milestones', 'selection_labels', 'project_type',
|
||||
'competitor_assumption', 'sales_channel_assumption', 'marketing_approach', 'location_rationale', 'project_risk_responses_snapshot', 'project_questionnaire_version',
|
||||
'customer_validation_status', 'cost_estimate_status', 'location_assessment_status', 'funding_status', 'receivables_timing_status',
|
||||
'project_type_other', 'sector_id', 'activity_id', 'products_services', 'maturity_stage', 'expected_start_date',
|
||||
@@ -72,6 +72,14 @@ class StoreSimulationFormDraftRequest extends FormRequest
|
||||
'economic_snapshot.business_plan_snapshot' => ['nullable', 'string', 'max:60000'],
|
||||
'economic_snapshot.financial_tools_snapshot' => ['nullable', 'string', 'max:30000'],
|
||||
'economic_snapshot.cashflow_snapshot' => ['nullable', 'string', 'max:20000'],
|
||||
'economic_snapshot.context_applicability_snapshot' => ['nullable', 'string', 'max:20000'],
|
||||
'economic_snapshot.investment_regime' => ['nullable', 'in:general,industrial_park,zee,zfi'],
|
||||
'economic_snapshot.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'economic_snapshot.compatible_fields_snapshot' => ['nullable', 'string', 'max:10000'],
|
||||
'economic_snapshot.published_iva_base' => ['nullable', 'string', 'max:40'],
|
||||
'economic_snapshot.published_iva_currency' => ['nullable', 'string', 'max:3'],
|
||||
'economic_snapshot.published_iva_date' => ['nullable', 'string', 'max:10'],
|
||||
'economic_snapshot.published_iva_scope' => ['nullable', 'string', 'in:yes,no'],
|
||||
'economic_snapshot.monthly_iva_settings' => ['nullable', 'string', 'max:2000'],
|
||||
'economic_snapshot.monthly_iva_snapshot' => ['nullable', 'string', 'max:60000'],
|
||||
'economic_snapshot.project_team_snapshot' => ['nullable', 'string', 'max:30000'],
|
||||
|
||||
@@ -231,16 +231,25 @@ class InvestmentCatalogue
|
||||
} elseif (in_array($relation, ['clusters', 'corridors'], true)) {
|
||||
$query->whereIn('id', $this->publicStructureIds($relation, $foreign));
|
||||
} 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') {
|
||||
$dossiers = InvestmentPortfolioController::visible();
|
||||
app(InvestmentGeography::class)->constrainDossiersToTerritories($dossiers,
|
||||
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']);
|
||||
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();
|
||||
@@ -250,24 +259,15 @@ class InvestmentCatalogue
|
||||
['province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'geo_location_id']));
|
||||
}
|
||||
$result['zones'] = $zones->orderBy('name')->get(['id', 'name', 'category']);
|
||||
if (! $management && ($path !== [] || ! empty($territoryFilters['sector']))) {
|
||||
$scope = \Illuminate\Support\Arr::only($territoryFilters, ['sector','province_id','district_id','admin_post_id','locality_id','include_national']);
|
||||
$available = ['chain' => [], 'activity' => []];
|
||||
$this->query($scope)->reorder()->chunkById(200, function ($records) use (&$available) {
|
||||
foreach ($records as $record) {
|
||||
foreach (app(OpportunityClassification::class)->publicRows($record) as $row) {
|
||||
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();
|
||||
}
|
||||
if (! $management && $path !== []) {
|
||||
// A chain's documented scope comes from its public cluster, never
|
||||
// from the opportunities surviving the current search.
|
||||
$ids = app(OpportunityClassification::class)->targets('chain')
|
||||
->whereIn('cluster_id', $result['clusters']->pluck('id'))->pluck('id');
|
||||
$result['classification']['targets']['chain'] = collect($result['classification']['targets']['chain'])->whereIn('id', $ids)->values();
|
||||
}
|
||||
// Activities are a public classification catalogue, not evidence of
|
||||
// investment availability in a territory or sector.
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Services;
|
||||
use App\Models\ExistingBusiness;
|
||||
use App\Models\Opportunity;
|
||||
use App\Models\Sector;
|
||||
use App\Models\SimulationFormDraft;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Support\Arr;
|
||||
@@ -12,6 +13,7 @@ use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
/** Context belongs to the existing encrypted dossier. Sources remain read-only. */
|
||||
@@ -21,7 +23,7 @@ final class InvestorContext
|
||||
|
||||
public const SOURCE = 'investor-context';
|
||||
|
||||
public const FIELDS = ['project_title', 'project_summary', 'sector_id', 'sector', 'province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'location'];
|
||||
public const FIELDS = ['project_title', 'project_summary', 'sector_id', 'sector', 'province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'location', 'currency', 'expected_start_date', 'fiscal_period', 'fiscal_periodicity', 'fiscal_month', 'investor_origin', 'person_type', 'entity_stage', 'tax_residency_country', 'fiscal_residency_country', 'activity_id', 'project_type', 'maturity_stage', 'special_zone_id', 'investment_regime', ...PrivateInvestmentPreparation::FIELDS];
|
||||
|
||||
public function __construct(private readonly VirtualDesk $desk) {}
|
||||
|
||||
@@ -34,8 +36,26 @@ final class InvestorContext
|
||||
{
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
|
||||
return $payload['investor_path']['context'] ?? ['revision' => 0, 'selection' => [],
|
||||
$context = $payload['investor_path']['context'] ?? ['revision' => 0, 'selection' => [],
|
||||
'fields' => ['project_title' => $case->title], 'provenance' => ['project_title' => ['kind' => 'dossier', 'id' => $case->id, 'version' => $case->version]], 'review_steps' => []];
|
||||
// Explicit dossier anchor only: never the account's most recent simulation or another owner's draft.
|
||||
if (($case->simulation_id ?? null) && request()->user()?->id === (int) $case->user_id) {
|
||||
$draft = SimulationFormDraft::whereKey($case->simulation_id)->where('owner_user_id', $case->user_id)->whereNull('deleted_at')->first();
|
||||
if ($draft) {
|
||||
$values = [...SimulationFormDraft::decryptSnapshot($draft->personal_snapshot), ...SimulationFormDraft::decryptSnapshot($draft->economic_snapshot)];
|
||||
foreach (Arr::only($values, self::FIELDS) as $key => $value) {
|
||||
if (is_scalar($value) && (string) $value !== '' && (! array_key_exists($key, $context['fields']) || ($context['provenance'][$key]['kind'] ?? null) === 'linked_simulation')) {
|
||||
$context['fields'][$key] = (string) $value;
|
||||
$context['provenance'][$key] = ['kind' => 'linked_simulation', 'id' => $draft->id, 'version' => $draft->version_no, 'sha256' => $draft->snapshot_sha256];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$zone = $context['selection']['park'] ?? null;
|
||||
$context['fields']['investment_regime'] = $zone['fields']['investment_regime'] ?? 'general';
|
||||
$context['fields']['special_zone_id'] = $zone['id'] ?? '';
|
||||
|
||||
return $context;
|
||||
}
|
||||
|
||||
public function dependencyHash(array $selection): string
|
||||
@@ -53,17 +73,20 @@ final class InvestorContext
|
||||
$documents = [];
|
||||
$visibility = 'public';
|
||||
$state = null;
|
||||
$zoneAnalysis = null;
|
||||
if ($kind === 'opportunity') {
|
||||
abort_unless(ctype_digit($id), 422, 'Identificador de oportunidade inválido.');
|
||||
$o = Opportunity::with('sector')->findOrFail((int) $id);
|
||||
$published = Opportunity::published()->whereKey($o->id)->exists();
|
||||
if (!$published) {
|
||||
if (! $published) {
|
||||
abort_unless(request()->user() && $o->status !== 'archived' && app(PortalProfileAccess::class)->canView(request()->user(), $o), 404, 'Ficha privada indisponível neste âmbito.');
|
||||
$visibility = 'private';
|
||||
$state = app(PortalProfileAccess::class)->state($o);
|
||||
}
|
||||
if (request()->user()) $documents = app(OpportunityLibrarySupport::class)->snapshot(request()->user(), $o);
|
||||
$draft = !$published ? app(OpportunityManagement::class)->values($o) : [];
|
||||
if (request()->user()) {
|
||||
$documents = app(OpportunityLibrarySupport::class)->snapshot(request()->user(), $o);
|
||||
}
|
||||
$draft = ! $published ? app(OpportunityManagement::class)->values($o) : [];
|
||||
$title = $draft['canonical']['official_title'] ?? $o->title;
|
||||
$href = $published ? '/oportunidades/'.$o->slug : '/minhas-oportunidades/'.$o->id.'/view';
|
||||
$version = $o->management_version;
|
||||
@@ -122,19 +145,28 @@ final class InvestorContext
|
||||
$fields = $this->territoryFields($id);
|
||||
} elseif ($kind === 'park') {
|
||||
abort_unless(Str::isUuid($id), 422);
|
||||
$p = app(InvestmentZones::class)->visible()->where('category', 'industrial_park')->findOrFail($id);
|
||||
$p = app(InvestmentZones::class)->visible()->whereIn('category', ['industrial_park', 'zee', 'zfi'])->findOrFail($id);
|
||||
$title = $p->name;
|
||||
$fields = ['special_zone_id' => (string) $p->id, 'investment_regime' => (string) $p->category];
|
||||
$version = $p->version_no;
|
||||
$zoneAnalysis = ['conditions' => app(InvestmentZoneOperationalDetails::class)->publicData($p)['conditions'] ?? [],
|
||||
'source' => $p->legal_source_id ? DB::table('investment_legal_sources')->where('id', $p->legal_source_id)->first(['title', 'url', 'diploma', 'article', 'valid_from', 'valid_until']) : null,
|
||||
'recognition' => 'undetermined', 'executable_benefit' => false];
|
||||
$href = '/zonas/'.$id;
|
||||
if ($p->primary_territory_id) {
|
||||
$fields = $this->territoryFields($p->primary_territory_id);
|
||||
$fields = [...$fields, ...$this->territoryFields($p->primary_territory_id)];
|
||||
}
|
||||
} else {
|
||||
abort(422, 'Tipo de referência inválido.');
|
||||
}
|
||||
$fields = array_filter($fields, fn ($v) => is_scalar($v) && trim((string) $v) !== '');
|
||||
$record = ['key' => $key, 'kind' => $kind, 'id' => $id, 'title' => $title, 'version' => $version, 'href' => $href, 'fields' => $fields];
|
||||
if ($documents || $visibility === 'private') $record += ['documents' => $documents, 'visibility' => $visibility, 'state' => $state];
|
||||
if ($zoneAnalysis !== null) {
|
||||
$record['analysis'] = $zoneAnalysis;
|
||||
}
|
||||
if ($documents || $visibility === 'private') {
|
||||
$record += ['documents' => $documents, 'visibility' => $visibility, 'state' => $state];
|
||||
}
|
||||
|
||||
return [...$record, 'sha256' => hash('sha256', json_encode($record, JSON_THROW_ON_ERROR))];
|
||||
}
|
||||
@@ -170,7 +202,11 @@ final class InvestorContext
|
||||
}
|
||||
if (request()->user()) {
|
||||
$private = app(PortalProfileAccess::class)->scope(Opportunity::query(), request()->user())->where('status', '!=', 'published')->where('status', '!=', 'archived')->when($query, fn ($q) => $q->where('title', 'ilike', '%'.$query.'%'))->orderBy('title')->limit(51)->get();
|
||||
foreach ($private as $o) if (app(PortalProfileAccess::class)->canView(request()->user(), $o)) $items[] = ['key' => 'opportunity:'.$o->id, 'title' => $o->title.' — preparação privada', 'kind' => 'opportunity'];
|
||||
foreach ($private as $o) {
|
||||
if (app(PortalProfileAccess::class)->canView(request()->user(), $o)) {
|
||||
$items[] = ['key' => 'opportunity:'.$o->id, 'title' => $o->title.' — preparação privada', 'kind' => 'opportunity'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (config('existing-business.enabled')) {
|
||||
foreach (ExistingBusiness::published()->when($query, fn ($q) => $q->where('public_title', 'ilike', '%'.$query.'%'))->orderBy('public_title')->limit(51)->get(['id', 'public_title']) as $o) {
|
||||
@@ -179,7 +215,7 @@ final class InvestorContext
|
||||
}
|
||||
|
||||
return ['opportunities' => $items, 'search_limited' => count($items) > 50, 'sectors' => Sector::choices()->orderBy('name')->get(['id', 'name', 'slug']),
|
||||
'parks' => app(InvestmentZones::class)->visible()->where('category', 'industrial_park')->orderBy('name')->get(['id', 'name', 'version_no'])];
|
||||
'parks' => app(InvestmentZones::class)->visible()->whereIn('category', ['industrial_park', 'zee', 'zfi'])->orderBy('name')->get(['id', 'name', 'category', 'version_no'])];
|
||||
}
|
||||
|
||||
public function current(User $actor): array
|
||||
@@ -232,10 +268,21 @@ final class InvestorContext
|
||||
|
||||
private function input(array $input): array
|
||||
{
|
||||
abort_if(array_diff(array_keys($input), ['version', 'selection', 'declarations', 'replace_fields', 'preview_hash', 'operation_key', 'confirm', '_token']), 422, 'Campo de controlo desconhecido.');
|
||||
abort_if(array_diff(array_keys($input), ['version', 'selection', 'declarations', 'replace_fields', 'preview_hash', 'operation_key', 'confirm', 'document_links', '_token']), 422, 'Campo de controlo desconhecido.');
|
||||
|
||||
return Validator::make($input, ['version' => 'required|integer|min:1', 'selection' => 'present|array:opportunity,sector,territory,park',
|
||||
'selection.*' => 'nullable|string|max:100', 'declarations' => 'nullable|array:project_title,project_summary', 'declarations.project_title' => 'nullable|string|max:200', 'declarations.project_summary' => 'nullable|string|max:5000',
|
||||
abort_if(! app(PrivateInvestmentPreparation::class)->available() && (! empty($input['document_links']) || array_intersect(array_keys(is_array($input['declarations'] ?? null) ? $input['declarations'] : []), PrivateInvestmentPreparation::FIELDS)), 409, 'Esta preparação ainda não está disponível neste ambiente. As respostas foram preservadas.');
|
||||
|
||||
$inputRules = [
|
||||
'document_links' => 'sometimes|array:'.implode(',', PrivateInvestmentPreparation::DOCUMENTS),
|
||||
'document_links.*' => 'nullable|uuid',
|
||||
];
|
||||
foreach (app(PrivateInvestmentPreparation::class)->questions() as $question) {
|
||||
$inputRules['declarations.'.$question['key']] = isset($question['options']) ? ['nullable', Rule::in(array_keys($question['options']))] : ['nullable', 'regex:/^\d+(?:\.\d+)?$/D', 'numeric', 'min:0', 'max:999999999999999999'];
|
||||
}
|
||||
|
||||
return Validator::make($input, [...$inputRules, 'version' => 'required|integer|min:1', 'selection' => 'present|array:opportunity,sector,territory,park',
|
||||
'selection.*' => 'nullable|string|max:100', 'declarations' => 'nullable|array:project_title,project_summary,currency,expected_start_date,investor_origin,person_type,entity_stage,tax_residency_country,fiscal_residency_country,project_type,maturity_stage,'.implode(',', PrivateInvestmentPreparation::FIELDS), 'declarations.project_title' => 'nullable|string|max:200', 'declarations.project_summary' => 'nullable|string|max:5000',
|
||||
'declarations.currency' => 'nullable|regex:/^[A-Z]{3}$/', 'declarations.expected_start_date' => 'nullable|date_format:Y-m-d', 'declarations.investor_origin' => 'nullable|in:national,foreign,mixed', 'declarations.person_type' => 'nullable|in:singular,collective,sole_trader,consortium', 'declarations.entity_stage' => 'nullable|in:existing,being_formed', 'declarations.tax_residency_country' => ['nullable', 'string', app(CountryCatalogue::class)->rule()], 'declarations.fiscal_residency_country' => ['nullable', 'string', app(CountryCatalogue::class)->rule()], 'declarations.project_type' => 'nullable|string|max:100', 'declarations.maturity_stage' => 'nullable|string|max:100',
|
||||
'replace_fields' => 'nullable|array', 'replace_fields.*' => 'string|in:'.implode(',', self::FIELDS)])->validate();
|
||||
}
|
||||
|
||||
@@ -247,6 +294,15 @@ final class InvestorContext
|
||||
abort_unless((int) $case->version === $data['version'], 409, 'O dossier mudou; recupere a versão atual.');
|
||||
app(InvestorPath::class)->view($actor, $id);
|
||||
$old = $this->state($case);
|
||||
$links = $old['preparation_documents'] ?? [];
|
||||
foreach ($data['document_links'] ?? [] as $key => $document) {
|
||||
if ($document) {
|
||||
abort_unless(DB::table('desk_documents as l')->join('documents as d', 'd.id', '=', 'l.document_id')->where('l.case_id', $id)->where('d.id', $document)->whereNull('d.deleted_at')->exists(), 422, 'Seleccione um documento já associado a este dossier; os dados anteriores foram preservados.');
|
||||
$links[$key] = $document;
|
||||
} else {
|
||||
unset($links[$key]);
|
||||
}
|
||||
}
|
||||
$selection = $old['selection'];
|
||||
foreach ($data['selection'] as $slot => $key) {
|
||||
if ($key === null || $key === '') {
|
||||
@@ -299,7 +355,7 @@ final class InvestorContext
|
||||
}
|
||||
// Remove inherited subordinate geography only when its source was actually replaced.
|
||||
foreach ($fields as $key => $value) {
|
||||
if (! array_key_exists($key, $proposed) && in_array($key, ['province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'location', 'sector_id', 'sector'], true) && isset($provenance[$key]['key'])) {
|
||||
if (! array_key_exists($key, $proposed) && in_array($key, ['province_id', 'district_id', 'admin_post_id', 'locality_id', 'province', 'district', 'location', 'sector_id', 'sector', 'special_zone_id', 'investment_regime'], true) && isset($provenance[$key]['key'])) {
|
||||
unset($fields[$key],$provenance[$key]);
|
||||
}
|
||||
}
|
||||
@@ -314,14 +370,32 @@ final class InvestorContext
|
||||
$changed[] = $slot;
|
||||
}
|
||||
}
|
||||
$dependencyChanged = $this->dependencyHash($old['selection']) !== $this->dependencyHash($selection);
|
||||
$changedFields = array_column($replaced, 'field');
|
||||
$conditionsChanged = (bool) array_intersect($changedFields, array_diff(self::FIELDS, ['project_title', 'project_summary']));
|
||||
$dependencyChanged = $this->dependencyHash($old['selection']) !== $this->dependencyHash($selection) || $conditionsChanged;
|
||||
$privateConditionsChanged = (bool) array_intersect($changedFields, PrivateInvestmentPreparation::FIELDS);
|
||||
$calculationInputsChanged = $this->dependencyHash($old['selection']) !== $this->dependencyHash($selection) || (bool) array_intersect($changedFields, array_diff(self::FIELDS, ['project_title', 'project_summary', ...array_diff(PrivateInvestmentPreparation::FIELDS, ['total_investment', 'area_required', 'area_unit'])]));
|
||||
$payload = $this->desk->decode($case->payload);
|
||||
$results = $payload['investor_path']['results'] ?? [];
|
||||
$requests = DB::table('desk_requests')->where('case_id', $id)->orderBy('id')->get(['id', 'status', 'protocol', 'version'])->all();
|
||||
$steps = $dependencyChanged ? array_values(array_unique([...(array_intersect($changed, ['opportunity', 'sector']) ? ['S02', 'S03', 'S04', 'S08', 'S12', 'S13', 'S14', 'S15', 'S17'] : []), ...(array_intersect($changed, ['territory', 'park']) ? ['S08', 'S09', 'S10', 'S11', 'S17'] : [])])) : [];
|
||||
if (array_intersect($changedFields, array_diff(self::FIELDS, ['project_title', 'project_summary', ...PrivateInvestmentPreparation::FIELDS]))) {
|
||||
$steps = array_values(array_unique([...$steps, 'S02', 'S03', 'S08', 'S12', 'S13', 'S17']));
|
||||
}
|
||||
if ($privateConditionsChanged) {
|
||||
$steps = array_values(array_unique([...$steps, 'S02', 'S05', 'S06', 'S07']));
|
||||
}
|
||||
$privatePreparation = null;
|
||||
if (app(PrivateInvestmentPreparation::class)->available()) {
|
||||
$docs = $this->preparationDocuments($id);
|
||||
$beforePreparation = app(PrivateInvestmentPreparation::class)->assess($old, $docs);
|
||||
$afterPreparation = app(PrivateInvestmentPreparation::class)->assess(['fields' => $fields, 'selection' => $selection, 'preparation_documents' => $links], $docs);
|
||||
$privatePreparation = ['before' => $beforePreparation, 'after' => $afterPreparation];
|
||||
}
|
||||
$plan = ['case_id' => $id, 'version' => (int) $case->version, 'revision' => (int) $old['revision'], 'selection' => $selection, 'fields' => $fields, 'provenance' => $provenance,
|
||||
'updated' => $replaced, 'maintained' => $kept, 'changed_dimensions' => $changed, 'dependent_results' => (int) $case->user_id === $actor->id && $dependencyChanged ? array_map(fn ($r) => ['id' => $r['id'], 'engine' => $r['engine']], $results) : [],
|
||||
'requests' => $requests, 'review_steps' => $steps, 'dependency_changed' => $dependencyChanged, 'documents_preserved' => DB::table('desk_documents')->where('case_id', $id)->count(),
|
||||
'preparation_documents' => $links, 'private_investment' => $privatePreparation,
|
||||
'updated' => $replaced, 'maintained' => $kept, 'changed_dimensions' => $changed, 'dependent_results' => (int) $case->user_id === $actor->id && $calculationInputsChanged ? array_map(fn ($r) => ['id' => $r['id'], 'engine' => $r['engine']], $results) : [],
|
||||
'requests' => $requests, 'review_steps' => $steps, 'dependency_changed' => $dependencyChanged, 'calculation_inputs_changed' => $calculationInputsChanged, 'documents_preserved' => DB::table('desk_documents')->where('case_id', $id)->count(),
|
||||
'notice' => 'Não confirma incentivos, licenças, disponibilidade de terra, reserva ou autorização. Submissões e decisões anteriores mantêm o conteúdo enviado.'];
|
||||
$hash = hash_hmac('sha256', json_encode(Arr::sortRecursive([$actor->id, $data, $plan]), JSON_THROW_ON_ERROR), config('app.key'));
|
||||
|
||||
@@ -349,7 +423,7 @@ final class InvestorContext
|
||||
$before = $this->state($case);
|
||||
$plan = $this->preview($actor, $id, $input);
|
||||
abort_unless(hash_equals($plan['preview_hash'], $control['preview_hash']), 409, 'O dossier ou uma fonte mudou desde a prévia; compare novamente.');
|
||||
if (! $plan['changed_dimensions'] && ! $plan['updated'] && empty($input['declarations']) && empty($input['replace_fields'])) {
|
||||
if (! $plan['changed_dimensions'] && ! $plan['updated'] && empty($input['declarations']) && empty($input['replace_fields']) && empty($input['document_links'])) {
|
||||
$result = ['case_id' => $id, 'version' => (int) $case->version, 'revision' => $before['revision'], 'changed' => false, 'replayed' => false];
|
||||
DB::table('audit_events')->insert(['source_system' => self::SOURCE, 'entity_type' => 'desk_cases', 'entity_id' => $id, 'actor_user_id' => $actor->id, 'correlation_id' => $control['operation_key'], 'action' => 'context_unchanged', 'data_classification' => 'restricted', 'after_data' => json_encode(['case_id' => $id, 'request_hash' => $requestHash, 'result' => $result], JSON_THROW_ON_ERROR)]);
|
||||
|
||||
@@ -361,9 +435,9 @@ final class InvestorContext
|
||||
foreach ($plan['review_steps'] as $step) {
|
||||
$review[$step] = ['revision' => $revision, 'reason' => 'O contexto mudou; reveja os pressupostos e a evidência aplicável.'];
|
||||
}
|
||||
$context = ['revision' => $revision, 'selection' => $plan['selection'], 'fields' => $plan['fields'], 'provenance' => $plan['provenance'], 'review_steps' => $review,
|
||||
'dependency_hash' => $this->dependencyHash($plan['selection']), 'updated_at' => now()->toIso8601String(), 'updated_by' => $actor->id];
|
||||
if ($plan['dependency_changed']) {
|
||||
$context = ['preparation_documents' => $plan['preparation_documents'], 'preparation_snapshot' => $plan['private_investment']['after'] ?? $before['preparation_snapshot'] ?? null, 'revision' => $revision, 'selection' => $plan['selection'], 'fields' => $plan['fields'], 'provenance' => $plan['provenance'], 'review_steps' => $review,
|
||||
'dependency_hash' => $this->dependencyHash(['selection' => $plan['selection'], 'fields' => Arr::except($plan['fields'], ['project_title', 'project_summary'])]), 'updated_at' => now()->toIso8601String(), 'updated_by' => $actor->id];
|
||||
if ($plan['calculation_inputs_changed']) {
|
||||
foreach ($payload['investor_path']['results'] ?? [] as $i => $r) {
|
||||
$payload['investor_path']['results'][$i] = [...$r, 'context_state' => 'review_required', 'context_invalidated_revision' => $revision, 'context_invalidated_at' => now()->toIso8601String()];
|
||||
}
|
||||
@@ -384,6 +458,8 @@ final class InvestorContext
|
||||
abort_unless($this->desk->owns($actor, $case, false) || $actor->can('manage-portal'), 403);
|
||||
$ctx = $this->state($case);
|
||||
$path = app(InvestorPath::class)->view($actor, $id);
|
||||
$ctx['path_applicability'] = ['definition_id' => $path['definition_id'], 'definition_version' => $path['definition_version'], 'source_sha256' => $path['source_sha256'],
|
||||
'steps' => array_values(array_map(fn ($step) => Arr::only($step, ['code', 'title', 'applicability', 'reason', 'state', 'context_review_required']), array_filter($path['steps'], fn ($step) => ! empty($step['branch']))))];
|
||||
|
||||
$simulatorRevision = null;
|
||||
if ((int) $case->user_id === $actor->id && $case->simulation_id) {
|
||||
@@ -396,18 +472,36 @@ final class InvestorContext
|
||||
}
|
||||
}
|
||||
|
||||
return ['simulator_context_revision' => $simulatorRevision, 'case' => $path['case'], 'context' => $ctx, 'steps' => array_map(fn ($s) => Arr::only($s, ['code', 'title', 'state', 'context_review_required']), $path['steps']),
|
||||
$preparation = app(PrivateInvestmentPreparation::class)->available() ? app(PrivateInvestmentPreparation::class)->assess($ctx, $this->preparationDocuments($id)) : null;
|
||||
$ctx['preparation_assessment'] = $preparation;
|
||||
|
||||
return ['private_investment' => $preparation, 'preparation_documents' => $this->preparationDocuments($id), 'simulator_context_revision' => $simulatorRevision, 'case' => $path['case'], 'context' => $ctx, 'steps' => array_map(fn ($s) => Arr::only($s, ['code', 'title', 'state', 'context_review_required']), $path['steps']),
|
||||
'can_write' => $path['canWrite'], 'next' => $path['next'], 'results' => $path['results'], 'requests' => $path['requests'],
|
||||
'prefill' => $this->prefill($ctx), 'notice' => 'A seleção apoia a preparação e não confirma benefícios, licenças, direitos ou disponibilidade.'];
|
||||
}
|
||||
|
||||
public function preparationDocuments(string $id): array
|
||||
{
|
||||
return DB::table('desk_documents as l')->join('documents as d', 'd.id', '=', 'l.document_id')->where('l.case_id', $id)->whereNull('d.deleted_at')->get(['l.id', 'l.document_id', 'd.file_name', 'd.status', 'd.malware_scan_status', 'd.version_no', 'd.sha256'])->map(fn ($row) => (array) $row)->all();
|
||||
}
|
||||
|
||||
public function prefill(array $ctx): array
|
||||
{
|
||||
$f = $ctx['fields'];
|
||||
$sim = Arr::only($f, ['project_title', 'project_summary', 'sector_id', 'province_id', 'district_id', 'admin_post_id', 'locality_id']);
|
||||
$sim = Arr::except(Arr::only($f, self::FIELDS), ['sector', 'province', 'district', 'location', ...array_diff(PrivateInvestmentPreparation::FIELDS, ['total_investment', 'area_required', 'area_unit'])]);
|
||||
$zone = $ctx['selection']['park'] ?? null;
|
||||
$sim['context_applicability_snapshot'] = json_encode([
|
||||
'version' => 1, 'context_revision' => $ctx['revision'],
|
||||
'zone' => $zone ? Arr::only($zone, ['id', 'title', 'href', 'version', 'sha256', 'fields', 'analysis']) : null,
|
||||
'provenance' => $ctx['provenance'],
|
||||
'path' => $ctx['path_applicability'] ?? null,
|
||||
'preparation' => isset($ctx['preparation_assessment']) ? Arr::except($ctx['preparation_assessment'], ['questions']) : null,
|
||||
'fields' => Arr::only($f, ['investor_origin', 'tax_residency_country', 'entity_stage', 'currency', 'expected_start_date', 'investment_regime']),
|
||||
'notice' => 'Referências e declarações para preparação; sem reconhecimento automático de elegibilidade ou benefício.',
|
||||
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
|
||||
|
||||
return ['simulator' => $sim, 'land' => array_filter(['project_reference' => $f['project_title'] ?? null, 'activity' => $f['sector'] ?? null, 'purpose' => $f['project_summary'] ?? null, 'parcels' => [Arr::only($f, array_keys(InvestmentGeography::FIELDS))]], fn ($v) => $v !== null),
|
||||
'desk' => array_filter(['title' => $f['project_title'] ?? null, 'territory_id' => $f['locality_id'] ?? $f['admin_post_id'] ?? $f['district_id'] ?? $f['province_id'] ?? null, 'location_source' => isset($f['province_id']) ? 'Referência consultada no contexto v'.($ctx['revision'] ?? 0).': '.($f['location'] ?? 'território identificado').'. Não confirma disponibilidade.' : null, 'description' => $f['project_summary'] ?? null, 'sector' => $f['sector'] ?? null, ...Arr::only($f, array_keys(InvestmentGeography::FIELDS))], fn ($v) => $v !== null),
|
||||
'submission' => array_filter(['sector' => $f['sector'] ?? null, 'objective' => $f['project_summary'] ?? null, 'location' => $f['location'] ?? null], fn ($v) => $v !== null)];
|
||||
'submission' => array_filter(['currency' => $f['currency'] ?? null, 'sector' => $f['sector'] ?? null, 'objective' => $f['project_summary'] ?? null, 'location' => $f['location'] ?? null], fn ($v) => $v !== null)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ final class InvestorPath
|
||||
$documents = DB::table('desk_documents as l')->join('documents as d', 'd.id', '=', 'l.document_id')
|
||||
->where('l.case_id', $id)->whereNull('d.deleted_at')
|
||||
->when(! $owner && ! $manager, fn ($q) => $q->where(fn ($p) => $p->whereNull('l.request_id')->orWhereIn('l.request_id', $requests->pluck('id'))))
|
||||
->get(['l.id', 'l.document_id', 'd.file_name', 'd.status', 'd.malware_scan_status']);
|
||||
->get(['l.id', 'l.document_id', 'd.file_name', 'd.status', 'd.malware_scan_status', 'd.version_no', 'd.sha256']);
|
||||
// Only the private draft owner can receive the financial snapshot/result. Dossier access alone is insufficient.
|
||||
$results = (int) $case->user_id === $actor->id ? ($path['results'] ?? []) : [];
|
||||
$next = collect($steps)->first(fn ($step) => $step['preparation_allowed'] && ! in_array($step['state'], ['completed', 'approved', 'waiting_external', 'submitted', 'reviewing'], true));
|
||||
@@ -145,12 +145,17 @@ final class InvestorPath
|
||||
? LandAssistanceCase::where('user_id', $actor->id)->latest('updated_at')->get()
|
||||
->first(fn ($land) => ($land->payload['investor_path_case_id'] ?? null) === $id) : null;
|
||||
|
||||
return ['case' => ['id' => $id, 'title' => $case->title, 'version' => $case->version, 'closed' => $case->closed_at !== null],
|
||||
$preparation = ($owner || $manager) && app(PrivateInvestmentPreparation::class)->available() ? app(PrivateInvestmentPreparation::class)->assess($context, $documents->map(fn ($d) => (array) $d)->all()) : null;
|
||||
if ($preparation && $preparation['enabled']) {
|
||||
$next = ['code' => 'S06', 'title' => $preparation['next'], 'action' => 'Preparar', 'href' => '/investimentos/'.$id.'/contexto/editar#preparation-questions'];
|
||||
}
|
||||
|
||||
return ['private_investment' => $preparation, 'case' => ['id' => $id, 'title' => $case->title, 'version' => $case->version, 'closed' => $case->closed_at !== null],
|
||||
'journey_id' => $journey->id, 'definition_id' => $version->id, 'definition_version' => $version->version_no, 'source_sha256' => $definition['source_sha256'],
|
||||
'phases' => $definition['phases'], 'steps' => $steps, 'facts' => $facts, 'fact_reasons' => $path['fact_reasons'] ?? [],
|
||||
'fintech' => ($owner || $manager) && (isset($path['fintech']) || collect($path['sector_contexts'] ?? [])->contains(fn ($s) => in_array($s['slug'], ['fintech', 'tecnologias-de-informacao', 'mercado-financeiro'], true)) || collect($path['content_sources'] ?? [])->contains('return_href', '/tech-fintech')) ? app(FintechInvestment::class)->view($payload, $steps) : null,
|
||||
'canWrite' => $owner && ! $case->closed_at, 'canReview' => $manager && (int) $case->user_id !== $actor->id && ! $case->closed_at,
|
||||
'next' => $next ? ['code' => $next['code'], 'title' => $next['title'], 'action' => 'Preparar', 'href' => '#'.$next['code']] : null,
|
||||
'next' => $next ? ['code' => $next['code'], 'title' => $next['title'], 'action' => 'Preparar', 'href' => $next['href'] ?? '#'.$next['code']] : null,
|
||||
'investment_context' => ($owner || $manager) ? $context : null,
|
||||
'results' => $results, 'requests' => $requests, 'documents' => $documents,
|
||||
'zone_contexts' => ($owner || $manager) ? ($path['zone_contexts'] ?? []) : [],
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Brick\Math\BigDecimal;
|
||||
|
||||
/** Adapter of the dossier's declared context to preparation of a private-investment request. No tax or entitlement decision. */
|
||||
final class PrivateInvestmentPreparation
|
||||
{
|
||||
public const VERSION = 'private-investment-preparation-2026-v1';
|
||||
|
||||
public const SOURCE = 'https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf';
|
||||
|
||||
public const HASH = 'ba1e9eaabfec5d0c4cb2d9f2444a6860f7a90f222034764197829be402d408ed';
|
||||
|
||||
public const FIELDS = ['investment_form', 'investment_preparation', 'investment_activity_scope', 'implementation_mode', 'capital_origin', 'site_tenure', 'project_concession', 'significant_implications', 'land_extension', 'forest_concession', 'forest_concession_hectares', 'total_investment', 'area_required', 'area_unit'];
|
||||
|
||||
public const DOCUMENTS = ['identity', 'registration', 'name_reservation', 'site_plan', 'lease', 'duat', 'representation_license', 'feasibility', 'financial_capacity', 'foreign_capital'];
|
||||
|
||||
public function available(): bool
|
||||
{
|
||||
return (bool) config('investor-path.private_preparation', false);
|
||||
}
|
||||
|
||||
public function questions(): array
|
||||
{
|
||||
$tri = ['unknown' => 'Por determinar', 'yes' => 'Sim', 'no' => 'Não'];
|
||||
|
||||
return [
|
||||
['key' => 'investment_preparation', 'label' => 'Pretende preparar o pedido de garantias/incentivos ao investimento privado?', 'options' => $tri, 'source' => 'Lei 8/2023, artigo 2'],
|
||||
['key' => 'investment_activity_scope', 'label' => 'Natureza efectiva da actividade do projecto', 'options' => ['unknown' => 'Por determinar', 'general' => 'Outra actividade económica', 'extractive' => 'Prospecção, pesquisa ou produção extractiva', 'processing' => 'Processamento industrial mineiro/petrolífero', 'public_nonprofit' => 'Investimento público ou exclusivamente social/sem fins lucrativos'], 'source' => 'Lei 8/2023, artigos 2 e 22'],
|
||||
['key' => 'investment_form', 'label' => 'Tipo deste investimento', 'options' => ['unknown' => 'Por determinar', 'direct' => 'Directo', 'indirect' => 'Indirecto'], 'source' => 'Lei 8/2023, artigo 14(b); Regulamento, artigo 13', 'help' => 'O limiar monetário do artigo 13 aplica-se ao investimento directo. A forma indirecta não é convertida silenciosamente em directa.'],
|
||||
['key' => 'implementation_mode', 'label' => 'Modalidade da empresa implementadora', 'options' => ['unknown' => 'Por determinar', 'domestic_entity' => 'Empresa constituída/em constituição em Moçambique', 'foreign_representation' => 'Representação comercial estrangeira'], 'source' => 'Regulamento 8/2024, artigo 9(2)'],
|
||||
['key' => 'capital_origin', 'label' => 'Origem dos capitais/recursos deste investimento', 'options' => ['unknown' => 'Por determinar', 'national' => 'Nacionais', 'external' => 'Provenientes do exterior', 'mixed' => 'Mistos'], 'source' => 'Lei 8/2023, glossário; Regulamento, artigos 4–6'],
|
||||
['key' => 'site_tenure', 'label' => 'Fundamento declarado da utilização das instalações', 'options' => ['unknown' => 'Por determinar', 'lease' => 'Arrendamento', 'duat' => 'DUAT'], 'source' => 'Regulamento, artigos 9(1)(d) e 14(1)(d)'],
|
||||
['key' => 'project_concession', 'label' => 'O empreendimento é PPP ou concessão empresarial?', 'options' => $tri, 'source' => 'Lei 8/2023, artigo 22(1)(b)(ii)'],
|
||||
['key' => 'significant_implications', 'label' => 'Existem previsíveis implicações económicas, ambientais, de segurança ou saúde pública que exijam autorização?', 'options' => $tri, 'source' => 'Lei 8/2023, artigo 22(1)(b)(i)', 'help' => 'Declare o enquadramento conhecido; o nome do sector não responde a esta pergunta. Sem fundamento suficiente, mantenha por determinar.'],
|
||||
['key' => 'land_extension', 'label' => 'O projecto requer extensão de terra?', 'options' => $tri, 'source' => 'Lei 8/2023, artigo 22(1)(b)(iii)'],
|
||||
['key' => 'forest_concession', 'label' => 'O projecto requer concessão florestal?', 'options' => $tri, 'source' => 'Lei 8/2023, artigo 22(1)(b)(iv)'],
|
||||
['key' => 'forest_concession_hectares', 'label' => 'Área da concessão florestal (hectares)', 'type' => 'number', 'when' => ['field' => 'forest_concession', 'equals' => 'yes'], 'source' => 'Lei 8/2023, artigo 22(1)(b)(iv)'],
|
||||
['key' => 'total_investment', 'label' => 'Valor total do investimento na moeda do projecto', 'type' => 'number', 'source' => 'Regulamento, artigo 13(2)'],
|
||||
['key' => 'area_required', 'label' => 'Área de terra requerida', 'type' => 'number', 'when' => ['field' => 'land_extension', 'equals' => 'yes'], 'source' => 'Lei 8/2023, artigo 22(1)(b)(iii)'],
|
||||
['key' => 'area_unit', 'label' => 'Unidade da área requerida', 'options' => ['ha' => 'Hectares', 'm2' => 'Metros quadrados'], 'when' => ['field' => 'land_extension', 'equals' => 'yes'], 'source' => 'Conversão de unidade exacta; não é benefício ou condição adicional'],
|
||||
];
|
||||
}
|
||||
|
||||
private function number(array $f, string $key): ?BigDecimal
|
||||
{
|
||||
$value = $f[$key] ?? '';
|
||||
|
||||
return is_scalar($value) && preg_match('/^\d+(?:\.\d+)?$/D', (string) $value) ? BigDecimal::of((string) $value) : null;
|
||||
}
|
||||
|
||||
public function assess(array $context, array $documents = []): array
|
||||
{
|
||||
$f = $context['fields'] ?? [];
|
||||
$missing = [];
|
||||
$answer = function (string $key) use ($f, &$missing): ?bool {
|
||||
if (! in_array($f[$key] ?? '', ['yes', 'no'], true)) {
|
||||
$missing[] = $key;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return $f[$key] === 'yes';
|
||||
};
|
||||
$enabled = ($f['investment_preparation'] ?? '') === 'yes';
|
||||
$date = $f['expected_start_date'] ?? '';
|
||||
$period = preg_match('/^2026-\d{2}-\d{2}$/D', $date) === 1;
|
||||
$scope = $f['investment_activity_scope'] ?? 'unknown';
|
||||
$covered = in_array($scope, ['general', 'processing'], true);
|
||||
$mode = 'indeterminate';
|
||||
$reasons = [];
|
||||
if ($enabled) {
|
||||
if (! $date) {
|
||||
$missing[] = 'expected_start_date';
|
||||
}
|
||||
if ($scope === 'unknown' || $scope === '') {
|
||||
$missing[] = 'investment_activity_scope';
|
||||
}
|
||||
if (empty($f['currency'])) {
|
||||
$missing[] = 'currency';
|
||||
}
|
||||
if ($covered && $period) {
|
||||
$triggers = [];
|
||||
if ($scope === 'processing') {
|
||||
$triggers['processing'] = true;
|
||||
$reasons[] = 'Processamento industrial mineiro/petrolífero: Lei 8/2023, artigo 22(1)(b)(v).';
|
||||
}
|
||||
$amount = $this->number($f, 'total_investment');
|
||||
$triggers['amount'] = $amount && ($f['currency'] ?? '') === 'MZN' && ($f['investment_form'] ?? '') === 'direct' ? $amount->isGreaterThan('32000000000') : null;
|
||||
if (! in_array($f['investment_form'] ?? '', ['direct', 'indirect'], true)) {
|
||||
$missing[] = 'investment_form';
|
||||
}
|
||||
if (($f['investment_form'] ?? '') === 'indirect') {
|
||||
$reasons[] = 'Investimento indirecto: a classificação pela dimensão e o encaminhamento monetário não são determinados por este lote. As restantes condições documentadas continuam avaliadas.';
|
||||
}
|
||||
if (! $amount) {
|
||||
$missing[] = 'total_investment';
|
||||
}
|
||||
if (($f['currency'] ?? '') !== 'MZN') {
|
||||
$reasons[] = 'A condição monetária não é determinada noutra moeda: não se fez conversão.';
|
||||
}
|
||||
foreach (['project_concession', 'significant_implications'] as $key) {
|
||||
$triggers[$key] = $answer($key);
|
||||
}
|
||||
$land = $answer('land_extension');
|
||||
if ($land === true) {
|
||||
$area = $this->number($f, 'area_required');
|
||||
$unit = $f['area_unit'] ?? '';
|
||||
if (! $area) {
|
||||
$missing[] = 'area_required';
|
||||
}if (! in_array($unit, ['ha', 'm2'], true)) {
|
||||
$missing[] = 'area_unit';
|
||||
}
|
||||
$triggers['land_extension'] = $area && in_array($unit, ['ha', 'm2'], true) ? $area->isGreaterThanOrEqualTo($unit === 'ha' ? '10000' : '100000000') : null;
|
||||
} else {
|
||||
$triggers['land_extension'] = $land;
|
||||
}
|
||||
$forest = $answer('forest_concession');
|
||||
if ($forest === true) {
|
||||
$area = $this->number($f, 'forest_concession_hectares');
|
||||
if (! $area) {
|
||||
$missing[] = 'forest_concession_hectares';
|
||||
}$triggers['forest_concession'] = $area ? $area->isGreaterThan('100000') : null;
|
||||
} else {
|
||||
$triggers['forest_concession'] = $forest;
|
||||
}
|
||||
foreach (['amount' => 'Valor superior a 32 mil milhões MZN — R13(2), R21(2)(a)', 'project_concession' => 'PPP/concessão empresarial — Lei 8/2023, art. 22(1)(b)(ii), R21(2)(b)', 'significant_implications' => 'Implicações significativas declaradas — Lei 8/2023, art. 22(1)(b)(i), R21(1)', 'land_extension' => 'Extensão de terra igual/superior a 10 mil hectares — Lei 8/2023, art. 22(1)(b)(iii), R21(2)(c)', 'forest_concession' => 'Concessão florestal superior a 100 mil hectares — Lei 8/2023, art. 22(1)(b)(iv), R21(2)(d)'] as $condition => $description) {
|
||||
if (($triggers[$condition] ?? null) === true) {
|
||||
$reasons[] = $description.'.';
|
||||
}
|
||||
}
|
||||
$mode = in_array(true, $triggers, true) ? 'authorization' : (in_array(null, $triggers, true) ? 'indeterminate' : 'registration');
|
||||
$reasons[] = $mode === 'authorization' ? 'Foi identificada uma condição de autorização; as restantes condições desconhecidas não foram presumidas negativas.' : ($mode === 'registration' ? 'As condições de autorização deste lote foram declaradas negativas e o montante não ultrapassa o limite.' : 'Falta resolver pelo menos uma condição de autorização.');
|
||||
}
|
||||
foreach (['implementation_mode', 'capital_origin', 'site_tenure', 'entity_stage'] as $key) {
|
||||
if (empty($f[$key]) || $f[$key] === 'unknown') {
|
||||
$missing[] = $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($mode === 'authorization' && in_array(true, array_intersect_key($triggers, array_flip(['amount', 'project_concession', 'land_extension', 'forest_concession'])), true)) {
|
||||
$missing = array_values(array_diff($missing, ['investment_form', 'project_concession', 'significant_implications', 'land_extension', 'forest_concession', 'forest_concession_hectares', 'area_required', 'area_unit', 'total_investment']));
|
||||
}
|
||||
$base = $enabled && $covered && $period ? true : null;
|
||||
if (! $enabled || in_array($scope, ['extractive', 'public_nonprofit'], true) || ($date && ! $period)) {
|
||||
$base = false;
|
||||
}
|
||||
$rules = [
|
||||
['identity', 'Identificação do investidor', $base, 'S06', 'R9(1)(a) / R14(1)(a)', 41, 'Identificação do proponente do pedido.'],
|
||||
['registration', 'Certidão de registo comercial', $base === true ? (($f['entity_stage'] ?? '') === 'existing' ? true : (($f['entity_stage'] ?? '') === 'being_formed' ? false : null)) : $base, 'S05', 'R9(1)(b) / R14(1)(b)', 41, 'Alternativa para empresa já registada.'],
|
||||
['name_reservation', 'Reserva da denominação social', $base === true ? (($f['entity_stage'] ?? '') === 'being_formed' ? true : (($f['entity_stage'] ?? '') === 'existing' ? false : null)) : $base, 'S05', 'R9(1)(b) / R14(1)(b)', 41, 'Alternativa para empresa em constituição.'],
|
||||
['site_plan', 'Planta ou esboço do local', $base, 'S06', 'R9(1)(c) / R14(1)(c)', 42, 'Local de implantação identificado; não certifica disponibilidade.'],
|
||||
];
|
||||
foreach (['lease' => 'Contrato de arrendamento', 'duat' => 'Título DUAT'] as $key => $label) {
|
||||
$rules[] = [$key, $label, $base === true ? (($f['site_tenure'] ?? 'unknown') === 'unknown' ? null : ($f['site_tenure'] ?? '') === $key) : $base, 'S06', 'R9(1)(d) / R14(1)(d)', 42, 'Alternativa correspondente à utilização declarada das instalações.'];
|
||||
}
|
||||
$rules[] = ['representation_license', 'Licença de representação comercial', $base === true ? (($f['implementation_mode'] ?? 'unknown') === 'unknown' ? null : ($f['implementation_mode'] ?? '') === 'foreign_representation') : $base, 'S06', 'R9(2)', 42, 'Só para a modalidade representação comercial estrangeira; não decorre da nacionalidade.'];
|
||||
foreach (['feasibility' => 'Estudo de viabilidade técnica e económico-financeira', 'financial_capacity' => 'Comprovação da capacidade financeira'] as $key => $label) {
|
||||
$rules[] = [$key, $label, $base === true ? ($mode === 'indeterminate' ? null : $mode === 'authorization') : $base, 'S02', 'R14(1)–(2)', 45, 'Integra a preparação do pedido de autorização.'];
|
||||
}
|
||||
$rules[] = ['foreign_capital', 'Prova de realização/registo do aporte externo', $base === true ? (($f['capital_origin'] ?? 'unknown') === 'unknown' ? null : in_array($f['capital_origin'] ?? '', ['external', 'mixed'], true)) : $base, 'S06', 'R5(1)–(5)', 39, 'Preparação específica do aporte externo; formalidades cambiais concretas não calculadas.'];
|
||||
$links = $context['preparation_documents'] ?? [];
|
||||
$requirements = [];
|
||||
foreach ($rules as [$key,$label,$applies,$stage,$article,$page,$reason]) {
|
||||
$doc = isset($links[$key]) ? collect($documents)->firstWhere('document_id', $links[$key]) : null;
|
||||
$requirements[] = ['key' => $key, 'label' => $label, 'state' => $applies === false ? 'not_applicable' : ($applies === null ? 'indeterminate' : ($doc ? 'associated' : 'missing')), 'required' => $applies === true, 'document_id' => $links[$key] ?? null, 'document' => $doc, 'stage' => $stage, 'reason' => $reason, 'source' => ['reference' => $article, 'url' => self::SOURCE.'#page='.$page, 'sha256' => self::HASH, 'period' => '2026; Regulamento desde 07/03/2024'], 'legal_verification' => 'not_inferred'];
|
||||
}
|
||||
$authoritySource = ['reference' => 'R13(1)', 'url' => self::SOURCE.'#page=45'];
|
||||
$zone = $context['selection']['park'] ?? null;
|
||||
$amount = $this->number($f, 'total_investment');
|
||||
$authority = 'Por determinar neste lote';
|
||||
if ($base === true && $mode === 'registration' && $amount && ($f['currency'] ?? '') === 'MZN') {
|
||||
$special = in_array($zone['fields']['investment_regime'] ?? '', ['zee', 'zfi'], true);
|
||||
$authority = $special ? ($amount->isLessThanOrEqualTo('6500000000') ? 'APIEX — condicionado ao enquadramento ZEE/ZFI efectivamente reconhecido' : 'Ministro que superintende Finanças') : ($amount->isLessThanOrEqualTo('3500000000') ? 'Governador da Província' : ($amount->isLessThanOrEqualTo('6500000000') ? 'APIEX' : 'Ministro que superintende Finanças'));
|
||||
}
|
||||
if ($base === true && $mode === 'authorization') {
|
||||
$council = array_intersect_key($triggers, array_flip(['amount', 'project_concession', 'land_extension', 'forest_concession']));
|
||||
$authority = in_array(true, $council, true) ? 'Conselho de Ministros' : (in_array(null, $council, true) ? 'Autorização identificada; completar as condições em falta para distinguir a entidade decisória' : 'Ministro que superintende Finanças; eventual submissão ao Conselho de Ministros nos termos do R21(3)');
|
||||
$authoritySource = ['reference' => 'R21(1)–(3)', 'url' => self::SOURCE.'#page=50'];
|
||||
}
|
||||
|
||||
$labels = array_column($this->questions(), 'label', 'key') + ['currency' => 'Moeda do projecto', 'expected_start_date' => 'Data prevista de início', 'entity_stage' => 'Situação da entidade'];
|
||||
$missingLabels = array_map(fn ($key) => $labels[$key] ?? $key, array_values(array_unique($missing)));
|
||||
|
||||
return ['version' => self::VERSION, 'enabled' => $enabled, 'period_covered' => $period, 'scope_covered' => $covered, 'mode' => $mode, 'reason' => $reasons, 'missing_fields' => array_values(array_unique($missing)), 'missing_labels' => $missingLabels, 'questions' => $this->questions(), 'requirements' => $requirements, 'authority' => $authority, 'authority_source' => $authoritySource, 'next' => $base === false ? 'Rever o âmbito/período; este lote não cobre o pedido' : ($mode === 'indeterminate' ? 'Completar condições do enquadramento' : ($mode === 'authorization' ? 'Preparar estudo e documentos do pedido de autorização' : 'Preparar documentos do pedido de mero registo')), 'calculation_notice' => 'O regime procedimental não altera a taxa de IVA. Reutilize a simulação geral apenas no seu âmbito e período; benefícios, apuramento final e conversão cambial não são presumidos.', 'source' => ['url' => self::SOURCE, 'sha256' => self::HASH], 'notice' => 'Preparação informativa baseada em declarações; documentos associados não constituem validação jurídica, certificado ou submissão à Administração.'];
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,8 @@ class VirtualDesk
|
||||
* @return array<string,mixed> */
|
||||
public function validateFields(array $payload, array $definition, bool $submitting): array
|
||||
{
|
||||
$rules = ['payload' => ['required', 'array:'.implode(',', [...array_keys($definition['fields']), 'country', 'declared_origin_country_code'])],
|
||||
$rules = ['payload' => ['required', 'array:'.implode(',', [...array_keys($definition['fields']), 'country', 'declared_origin_country_code', 'context_reuse'])],
|
||||
'payload.context_reuse' => ['nullable', 'string', 'max:10000'],
|
||||
'payload.country' => ['nullable', 'string', 'max:100', app(CountryCatalogue::class)->legacyCountryRule()],
|
||||
'payload.declared_origin_country_code' => ['nullable', 'string', app(CountryCatalogue::class)->rule()]];
|
||||
foreach ($definition['fields'] as $key => $field) {
|
||||
@@ -388,7 +389,7 @@ class VirtualDesk
|
||||
abort_if($this->owns($actor, $case, false), 403, 'O proponente não pode analisar ou decidir o seu próprio pedido.');
|
||||
abort_unless($actor->can('manage-portal') || (int) $request->analyst_id === $actor->id, 403);
|
||||
if (in_array($data['status'], ['accepted', 'rejected', 'closed'], true)) {
|
||||
abort_unless(app(ScopedPortalAdministration::class)->deskDecision($actor,$request), 403);
|
||||
abort_unless(app(ScopedPortalAdministration::class)->deskDecision($actor, $request), 403);
|
||||
}
|
||||
abort_unless(in_array($data['status'], config('virtual-desk.transitions.'.$request->status, []), true), 409, 'Transição inválida.');
|
||||
}
|
||||
@@ -412,13 +413,13 @@ class VirtualDesk
|
||||
|
||||
return DB::transaction(function () use ($actor, $id, $data) {
|
||||
$case = $this->case($actor, $id, false, true);
|
||||
abort_unless($this->owns($actor, $case) || app(ScopedPortalAdministration::class)->deskCaseDecision($actor,$case->id), 403);
|
||||
abort_unless($this->owns($actor, $case) || app(ScopedPortalAdministration::class)->deskCaseDecision($actor, $case->id), 403);
|
||||
abort_unless((int) $case->version === (int) $data['version'], 409);
|
||||
$workflow = json_decode($case->workflow, true, 512, JSON_THROW_ON_ERROR);
|
||||
$current = $workflow[$data['stage']];
|
||||
$decision = in_array($data['status'], ['completed', 'not_applicable'], true);
|
||||
if ($decision) {
|
||||
abort_unless(app(ScopedPortalAdministration::class)->deskCaseDecision($actor,$case->id) && ! $this->owns($actor, $case, false), 403, 'Conclusão documental exige revisão interna por outra pessoa autorizada.');
|
||||
abort_unless(app(ScopedPortalAdministration::class)->deskCaseDecision($actor, $case->id) && ! $this->owns($actor, $case, false), 403, 'Conclusão documental exige revisão interna por outra pessoa autorizada.');
|
||||
abort_unless(trim($data['evidence'] ?? '') !== '', 422, 'Identifique a evidência documental.');
|
||||
foreach ($current['dependencies'] as $dependency) {
|
||||
abort_unless(in_array($workflow[$dependency]['status'], ['completed', 'not_applicable'], true) || (($data['exception'] ?? false) && ($data['document_id'] ?? null)), 422, 'Dependência '.$dependency.' pendente; uma exceção exige evidência própria.');
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
return [
|
||||
// Explicit opt-in after authenticated installation; never infer activation from schema/ready.
|
||||
'private_preparation' => env('PRIVATE_INVESTMENT_PREPARATION_ENABLED', false),
|
||||
'enabled' => env('INVESTOR_PATH_ENABLED', false),
|
||||
'definition_id' => '61000919-0000-4000-8000-000000000001',
|
||||
];
|
||||
|
||||
@@ -23,7 +23,7 @@ return [
|
||||
'opportunity_other_qa_subtypes' => [],
|
||||
'operator_name' => env('PORTAL_OPERATOR_NAME'),
|
||||
// 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' => [
|
||||
'email' => env('PORTAL_SUPPORT_EMAIL'),
|
||||
'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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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`.
|
||||
|
||||
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."
|
||||
}
|
||||
@@ -1611,5 +1611,395 @@
|
||||
"new_rules_published": false,
|
||||
"consumer_activation_changed": false,
|
||||
"proof_directory": "outputs/modelo-a-20261021"
|
||||
},
|
||||
"contextual_continuity_qa_20261022": {
|
||||
"branch": "codex/project-context-continuity-QA",
|
||||
"base": "57fc914821d0cefa02caa80a74b3d42e663f2742",
|
||||
"scope": "Primeiro incremento de continuidade e explicação contextual; adaptação jurídica integral não encerrada",
|
||||
"status": "QA, revisão; sem integração main ou alteração fiscal activa",
|
||||
"http_tests": {
|
||||
"tests": 4,
|
||||
"assertions": 74,
|
||||
"transaction_rollback": true
|
||||
},
|
||||
"frontend_tests": 8,
|
||||
"typescript": "passed",
|
||||
"build": "passed",
|
||||
"visual_evidence_directory": "outputs/context-continuity-20261022",
|
||||
"same_project_new_session": true,
|
||||
"deliberate_edit_preserved": true,
|
||||
"second_project_isolated": true,
|
||||
"fiscal_execution_id": "ae401465-834f-4761-9406-5af060c499fb",
|
||||
"new_executions_today": 1,
|
||||
"reused_proofs": [
|
||||
"13f68f1b: recuperação/exportadores/PDF",
|
||||
"83d2f97d e 226fd308: precisão/versões/históricos",
|
||||
"3f5430c3: cálculo mensal",
|
||||
"0b0cf761: correspondência parcial Modelo A"
|
||||
],
|
||||
"limitations": [
|
||||
"Catálogo visual QA sintético; ZEE/ZFI apenas controlos HTTP sintéticos revertidos, sem elegibilidade real demonstrada",
|
||||
"Condições jurídicas por sector/actividade/regime e benefícios executáveis não concluídos",
|
||||
"Outros três consumidores usam origem/reconciliador comum; não houve demonstração visual integral de cada processo",
|
||||
"Sem regra fiscal nova, publicação, activação ou integração em main",
|
||||
"Edge interrompeu a inspecção após navegação de regresso; endereço e gravação confirmados por inventário/serviço, visual final não observada. Limitação da ferramenta."
|
||||
],
|
||||
"return_evidence_id": "43317c22-50c8-40cf-98e4-e5d4d108c372",
|
||||
"B_recovered_context_revision": 2
|
||||
},
|
||||
"context_review_and_adaptive_path_preparation_20261022": {
|
||||
"reviewed_commit": "a76369eb",
|
||||
"review_status": "complete within accepted increment scope; no integration executed",
|
||||
"last_return_equivalent_evidence": "43317c22-50c8-40cf-98e4-e5d4d108c372",
|
||||
"accepted_AB_repeated": false,
|
||||
"next_lot": "Preparação de pedido de investimento privado: condição, fonte/período, formulário, percurso, cálculo e lacuna",
|
||||
"next_lot_status": "documented, not implemented or demonstrated end-to-end",
|
||||
"source_url": "https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf",
|
||||
"source_sha256": "ba1e9eaabfec5d0c4cb2d9f2444a6860f7a90f222034764197829be402d408ed",
|
||||
"new_fiscal_rule_activation": false,
|
||||
"next_acceptance": "Only synthetic C condition transitions and dossier/report links; reuse accepted context and IVA evidence"
|
||||
},
|
||||
"private_investment_executable_20261022": {
|
||||
"base": "52fbb146",
|
||||
"branch": "codex/private-investment-path-executable-QA",
|
||||
"status": "implemented and verified in isolated QA; not integrated",
|
||||
"source_version": "private-investment-preparation-2026-v1",
|
||||
"orientation": "Tempo 22/10: official sources execute without generic additional legal approval; permanent AGENTS updated",
|
||||
"qa_url": "http://127.0.0.1:18580/investimentos/4133311b-5426-4cec-900d-1f1484484083",
|
||||
"persistence": {
|
||||
"case_id": "4133311b-5426-4cec-900d-1f1484484083",
|
||||
"case_version": 8,
|
||||
"context_revision": 4,
|
||||
"mode": "registration",
|
||||
"association": {
|
||||
"lease": "e5ce142a-1178-46a2-b039-f187139c62cd"
|
||||
},
|
||||
"documents": 1,
|
||||
"context_events": 4,
|
||||
"draft_id": "beba1dec-fc05-4820-b099-24952c5ab36c",
|
||||
"draft_version": 4,
|
||||
"draft_sha256": "4136e82a3b9420ab8f980ec0d7bda6dc2a67b568c18535b5ba0ecc80efd37e37",
|
||||
"saved_context_revision": 3,
|
||||
"saved_preparation_mode": "authorization",
|
||||
"currency": "MZN",
|
||||
"date": "2026-01-01",
|
||||
"preparation_version": "private-investment-preparation-2026-v1"
|
||||
},
|
||||
"new_checks": {
|
||||
"feature_tests": 3,
|
||||
"assertions": 96,
|
||||
"frontend_delta_tests": 1,
|
||||
"typescript": "passed",
|
||||
"build": "passed"
|
||||
},
|
||||
"evidence_sha256": {
|
||||
"C-authorization-preview.png": "311c9f14ac601429666ded55c5906aa8ab018b5d31a1f101b4fb32697adf0817",
|
||||
"C-final-directness-preview.png": "2037958e2879fb184cac1c4aa07ddc367417dbd1541d979c4e653a63918cdaca",
|
||||
"C-final-path.png": "0c3c0900d861724b6def3f5850bd6c6c0f65dfee7cb01d6bb7c72c8bf645645a",
|
||||
"C-persistence-v3.json": "b8faad9a5d4d9174a489a7b1096104f3a91645201b221b1ad7ece4a217180e00",
|
||||
"C-persistence.json": "6b6120c88f41cff43b185905fdfec992ca76b359d0eab6bc1df02dee064c780d",
|
||||
"C-recovered-path.png": "c734d119b0f766d8600892713be473d1c1875cb6ff4474b6fceabef702a3490b",
|
||||
"C-report-check.json": "217b56b89041e6c8c05907af48c48dadf4f8316a2cce0f9195daf828258cb503",
|
||||
"C-report.docx": "28cfe4b75116c892d3e29fde389de7d067b456761756bab732af625178ee69ce"
|
||||
},
|
||||
"report": {
|
||||
"path": "C:\\Mac\\Home\\Downloads\\relatorio-investmoz-sintetico-qa-c-pedido-de-investimento-privado.docx",
|
||||
"size": 16674,
|
||||
"sha256": "28cfe4b75116c892d3e29fde389de7d067b456761756bab732af625178ee69ce"
|
||||
},
|
||||
"tool_limitation": "Download observation timed out and browser debugger detached; completed DOCX found in Downloads, verified before any retry; no repeated export",
|
||||
"reused": "Accepted A/B, decimal calculation, CSV, exporters and native PDF pagination",
|
||||
"main_integrated": false,
|
||||
"homologation_changed": false,
|
||||
"fiscal_rule_published_or_activated": false,
|
||||
"limitations": [
|
||||
"Only 2026 private investment preparation, documented registration/authorization conditions",
|
||||
"No administrative submission or entitlement decision",
|
||||
"No full sector licensing, foreign-currency equivalence or fiscal benefits engine",
|
||||
"ZEE/ZFI routing predicate uses QA references; no real zone visual recognition proof",
|
||||
"Dossier attachment association does not approve content; synthetic C fixture pending scan not delivered as seed",
|
||||
"Final C context v4 registration differs from frozen draft/report context v3 authorization; no silent rewrite or repeated export."
|
||||
],
|
||||
"historical_report_persistence": {
|
||||
"case_id": "4133311b-5426-4cec-900d-1f1484484083",
|
||||
"case_version": 7,
|
||||
"context_revision": 3,
|
||||
"mode": "authorization",
|
||||
"association": {
|
||||
"lease": "e5ce142a-1178-46a2-b039-f187139c62cd"
|
||||
},
|
||||
"documents": 1,
|
||||
"context_events": 3,
|
||||
"draft_id": "beba1dec-fc05-4820-b099-24952c5ab36c",
|
||||
"draft_version": 4,
|
||||
"draft_sha256": "4136e82a3b9420ab8f980ec0d7bda6dc2a67b568c18535b5ba0ecc80efd37e37",
|
||||
"saved_context_revision": 3,
|
||||
"saved_preparation_mode": "authorization",
|
||||
"currency": "MZN",
|
||||
"date": "2026-01-01",
|
||||
"preparation_version": "private-investment-preparation-2026-v1"
|
||||
},
|
||||
"directness_control": "Lei 8/2023 art14(b), R13: direct declared before using direct-investment monetary threshold; indirect/unknown unresolved only for dependent results; PPP independent condition remains executable"
|
||||
},
|
||||
"private_investment_report_alignment_20261022": {
|
||||
"functional_revision": "a1fbda06",
|
||||
"status": "targeted missing evidence completed; no functional code changes",
|
||||
"current_persistence": {
|
||||
"case_id": "4133311b-5426-4cec-900d-1f1484484083",
|
||||
"case_version": 8,
|
||||
"context_revision": 4,
|
||||
"mode": "registration",
|
||||
"association": {
|
||||
"lease": "e5ce142a-1178-46a2-b039-f187139c62cd"
|
||||
},
|
||||
"documents": 1,
|
||||
"context_events": 4,
|
||||
"draft_id": "beba1dec-fc05-4820-b099-24952c5ab36c",
|
||||
"draft_version": 5,
|
||||
"draft_sha256": "ba824fe0362ca87b301da55298122796f44fdfb11507830b3fe8f54cf88d132d",
|
||||
"saved_context_revision": 4,
|
||||
"saved_preparation_mode": "registration",
|
||||
"currency": "MZN",
|
||||
"date": "2026-01-01",
|
||||
"preparation_version": "private-investment-preparation-2026-v1"
|
||||
},
|
||||
"reports": {
|
||||
"historic_v3": {
|
||||
"path": "C:\\Mac\\Home\\Downloads\\relatorio-investmoz-sintetico-qa-c-pedido-de-investimento-privado.docx",
|
||||
"sha256": "28cfe4b75116c892d3e29fde389de7d067b456761756bab732af625178ee69ce",
|
||||
"bytes": 16674,
|
||||
"rows": [
|
||||
[
|
||||
"Contexto do investimento",
|
||||
"Revisão 3; sem ZEE, ZFI ou parque seleccionado",
|
||||
"Contexto versionado; não é reconhecimento jurídico. Referência do mesmo dossier no momento da gravação"
|
||||
],
|
||||
[
|
||||
"Preparação do investimento privado",
|
||||
"Pedido de autorização",
|
||||
"Declarações e requisitos de preparação; sem aprovação jurídica. Contexto congelado v3; private-investment-preparation-2026-v1"
|
||||
],
|
||||
[
|
||||
"Estudo de viabilidade técnica e económico-financeira",
|
||||
"Documento por associar",
|
||||
"Preparação informativa — simulação, sem submissão à Administração. Integra a preparação do pedido de autorização. R14(1)–(2); https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf#page=45"
|
||||
],
|
||||
[
|
||||
"Comprovação da capacidade financeira",
|
||||
"Documento por associar",
|
||||
"Preparação informativa — simulação, sem submissão à Administração. Integra a preparação do pedido de autorização. R14(1)–(2); https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf#page=45"
|
||||
]
|
||||
]
|
||||
},
|
||||
"current_v4": {
|
||||
"path": "C:\\Mac\\Home\\Downloads\\relatorio-investmoz-sintetico-qa-c-pedido-de-investimento-privado (1).docx",
|
||||
"sha256": "a2849427f4a91fa6ab78e433be8b919baca80a0f4f452a4546a5b169b921d753",
|
||||
"bytes": 16678,
|
||||
"rows": [
|
||||
[
|
||||
"Contexto do investimento",
|
||||
"Revisão 4; sem ZEE, ZFI ou parque seleccionado",
|
||||
"Contexto versionado; não é reconhecimento jurídico. Referência do mesmo dossier no momento da gravação"
|
||||
],
|
||||
[
|
||||
"Preparação do investimento privado",
|
||||
"Pedido de mero registo",
|
||||
"Declarações e requisitos de preparação; sem aprovação jurídica. Contexto congelado v4; private-investment-preparation-2026-v1"
|
||||
],
|
||||
[
|
||||
"Estudo de viabilidade técnica e económico-financeira",
|
||||
"Não aplicável; histórico preservado",
|
||||
"Preparação informativa — simulação, sem submissão à Administração. Integra a preparação do pedido de autorização. R14(1)–(2); https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf#page=45"
|
||||
],
|
||||
[
|
||||
"Comprovação da capacidade financeira",
|
||||
"Não aplicável; histórico preservado",
|
||||
"Preparação informativa — simulação, sem submissão à Administração. Integra a preparação do pedido de autorização. R14(1)–(2); https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf#page=45"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"proof_sha256": {
|
||||
"C-report-HISTORICO-contexto-v3.docx": "28cfe4b75116c892d3e29fde389de7d067b456761756bab732af625178ee69ce",
|
||||
"C-report-contexto-v4.docx": "a2849427f4a91fa6ab78e433be8b919baca80a0f4f452a4546a5b169b921d753",
|
||||
"C-report-v3-v4-comparison.json": "722154fd38b2915ec087f804abe66bc4c98c6eff2c4403d8e670d65d257e3446",
|
||||
"C-persistence-v4-draft5.json": "a10505a52c553b4c0e03ece59d20d5a0a20204ae694bcf7174ee0574272ec1c4",
|
||||
"C-new-report-context-v4.png": "b0cf159e6be5a457efdc46eb5e273895c43010caa9727e3b75668f916aa11f8d"
|
||||
},
|
||||
"historic_label": "C-report-HISTORICO-contexto-v3.docx; original bytes unchanged, embedded Contexto congelado v3",
|
||||
"current_label": "C-report-contexto-v4.docx; embedded Contexto congelado v4; registration; study/capacity not applicable",
|
||||
"accepted_tests_repeated": false,
|
||||
"integration_dependencies": [
|
||||
"a76369eb common continuity, required ancestor of a1fbda06",
|
||||
"52fbb146 documentary intermediate, no executable delta",
|
||||
"a1fbda06 adaptive private-investment functionality",
|
||||
"Current branch includes ancestors; do not cherry-pick a1fbda06 alone without a76369eb/equivalent changes"
|
||||
],
|
||||
"integration_procedure": "After Tempo evaluation/decision, fetch current main, merge preserving concurrent changes and review actual conflicts. a76369eb can integrate independently first; shared ancestry avoids duplicate application. No reset or force-push main. Confirm deployed revision and only changed destination behavior. PRIVATE_INVESTMENT_PREPARATION_ENABLED is separate from tax publication/activation.",
|
||||
"remote_main_read": "57fc914821d0cefa02caa80a74b3d42e663f2742",
|
||||
"main_integrated": false,
|
||||
"fiscal_rules_changed": false
|
||||
},
|
||||
"adaptive_private_path_homologation_20261022": {
|
||||
"authorized_by": "Tempo, user authorization 22/10/2026",
|
||||
"previous_main": "57fc914821d0cefa02caa80a74b3d42e663f2742",
|
||||
"authorized_ancestry": [
|
||||
"a76369eb",
|
||||
"52fbb146",
|
||||
"a1fbda06",
|
||||
"064296e1"
|
||||
],
|
||||
"integration": "fast-forward, no conflicts or concurrent commits observed at push; no forced update",
|
||||
"first_attempt": {
|
||||
"status": "failed",
|
||||
"commit": "064296e1fbf7b17f932df23c7b3ee5508719dec5",
|
||||
"error": "Verification command failed: node (see protected build log)",
|
||||
"active_release_preserved": true,
|
||||
"requested_commits": [
|
||||
"064296e1fbf7b17f932df23c7b3ee5508719dec5"
|
||||
],
|
||||
"finished_at": "2026-10-22T08:11:54.420414+00:00"
|
||||
},
|
||||
"compatibility_fix": {
|
||||
"commit": "042ffbde44cac27704d6f8b7ec25b525a42e3575",
|
||||
"cause": "Empty inheritance metadata appended when restoring a legacy draft with no compatible source",
|
||||
"change": "Return original draft when both compatible source and prior inheritance metadata are absent",
|
||||
"targeted_tests": "9 inheritance controls + exact failing legacy partition/recovery test, all passed"
|
||||
},
|
||||
"installed": {
|
||||
"status": "installed",
|
||||
"commit": "042ffbde44cac27704d6f8b7ec25b525a42e3575",
|
||||
"release": "/var/www/investmoz-homologacao/releases/042ffbde44cac27704d6f8b7ec25b525a42e3575-6dfae60c",
|
||||
"previous_release": "/var/www/investmoz-homologacao/releases/57fc914821d0cefa02caa80a74b3d42e663f2742-f563f9a7",
|
||||
"database_migrations": 0,
|
||||
"content_imports": 0,
|
||||
"requested_commits": [
|
||||
"042ffbde44cac27704d6f8b7ec25b525a42e3575"
|
||||
],
|
||||
"finished_at": "2026-10-22T08:16:16.903501+00:00"
|
||||
},
|
||||
"http": {
|
||||
"/build/revision.json": {
|
||||
"status": 200,
|
||||
"body": {
|
||||
"commit": "042ffbde44cac27704d6f8b7ec25b525a42e3575",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-22T08:16:14.331119+00:00",
|
||||
"manifest_sha256": "655eef6e6a5e71c5138c68465a5b2ffc36d2cadeff96e6b35682dbfd19d42e79"
|
||||
}
|
||||
},
|
||||
"/api/v1/fiscal-consumer": {
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"enabled": true,
|
||||
"coverage_start": "2026-01-01",
|
||||
"coverage_end": "2026-12-31",
|
||||
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||
}
|
||||
}
|
||||
},
|
||||
"/investimentos": {
|
||||
"status": 302,
|
||||
"location": "https://teste-investidor.tempo.co.mz/login"
|
||||
},
|
||||
"/simulador-fiscal": {
|
||||
"status": 200,
|
||||
"body": "HTML available"
|
||||
},
|
||||
"checked_utc": "2026-10-22T08:17:20.250804+00:00"
|
||||
},
|
||||
"configuration_before": {
|
||||
"read_only": true,
|
||||
"utc": "2026-10-22T08:16:34.265947+00:00",
|
||||
"revision": {
|
||||
"commit": "042ffbde44cac27704d6f8b7ec25b525a42e3575",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-22T08:16:14.331119+00:00",
|
||||
"manifest_sha256": "655eef6e6a5e71c5138c68465a5b2ffc36d2cadeff96e6b35682dbfd19d42e79"
|
||||
},
|
||||
"live": "/var/www/investmoz-homologacao/releases/042ffbde44cac27704d6f8b7ec25b525a42e3575-6dfae60c",
|
||||
"env_path": "/var/www/html/teste-investidor.tempo.co.mz/.env",
|
||||
"env_sha256": "7cdaba591bb5787485a349c24db2fd7c8279436da0eb31502e44db2fffa21d03",
|
||||
"env_mode": "0o640",
|
||||
"uid": 1001,
|
||||
"gid": 33,
|
||||
"private_preparation_env": "unset",
|
||||
"config": {
|
||||
"private_preparation": false,
|
||||
"investor_path": true,
|
||||
"fiscal_consumer": {
|
||||
"enabled": true,
|
||||
"coverage_start": "2026-01-01",
|
||||
"coverage_end": "2026-12-31",
|
||||
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||
},
|
||||
"preparation_version": "private-investment-preparation-2026-v1"
|
||||
}
|
||||
},
|
||||
"configuration_enable": {
|
||||
"utc": "2026-10-22T08:16:49.343216+00:00",
|
||||
"revision": {
|
||||
"commit": "042ffbde44cac27704d6f8b7ec25b525a42e3575",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-22T08:16:14.331119+00:00",
|
||||
"manifest_sha256": "655eef6e6a5e71c5138c68465a5b2ffc36d2cadeff96e6b35682dbfd19d42e79"
|
||||
},
|
||||
"changed": true,
|
||||
"env_before_sha256": "7cdaba591bb5787485a349c24db2fd7c8279436da0eb31502e44db2fffa21d03",
|
||||
"env_after_sha256": "a6b4e9064cf6dbb2d945b53418a6c9252f9c736ff3fde4016b95b74885a9ee0f",
|
||||
"backup": "/var/lib/investmoz-deploy/backups/private-preparation-20261022/env-7cdaba591bb5787485a349c24db2fd7c8279436da0eb31502e44db2fffa21d03.private",
|
||||
"backup_bytes_verified": true,
|
||||
"only_key_changed": "PRIVATE_INVESTMENT_PREPARATION_ENABLED",
|
||||
"mode_preserved": true,
|
||||
"owner_preserved": true,
|
||||
"config": {
|
||||
"private_preparation": true,
|
||||
"investor_path": true,
|
||||
"fiscal_consumer": {
|
||||
"enabled": true,
|
||||
"coverage_start": "2026-01-01",
|
||||
"coverage_end": "2026-12-31",
|
||||
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||
},
|
||||
"preparation_version": "private-investment-preparation-2026-v1"
|
||||
},
|
||||
"fiscal_configuration_changed": false,
|
||||
"database_operations": false,
|
||||
"recovery": "Restore previous key value only against recorded post-change hash, rebuild config cache; preserve subsequent changes and all data"
|
||||
},
|
||||
"configuration_after": {
|
||||
"read_only": true,
|
||||
"utc": "2026-10-22T08:17:21.883131+00:00",
|
||||
"revision": {
|
||||
"commit": "042ffbde44cac27704d6f8b7ec25b525a42e3575",
|
||||
"branch": "main",
|
||||
"built_at": "2026-10-22T08:16:14.331119+00:00",
|
||||
"manifest_sha256": "655eef6e6a5e71c5138c68465a5b2ffc36d2cadeff96e6b35682dbfd19d42e79"
|
||||
},
|
||||
"live": "/var/www/investmoz-homologacao/releases/042ffbde44cac27704d6f8b7ec25b525a42e3575-6dfae60c",
|
||||
"env_path": "/var/www/html/teste-investidor.tempo.co.mz/.env",
|
||||
"env_sha256": "a6b4e9064cf6dbb2d945b53418a6c9252f9c736ff3fde4016b95b74885a9ee0f",
|
||||
"env_mode": "0o640",
|
||||
"uid": 1001,
|
||||
"gid": 33,
|
||||
"private_preparation_env": "true",
|
||||
"config": {
|
||||
"private_preparation": true,
|
||||
"investor_path": true,
|
||||
"fiscal_consumer": {
|
||||
"enabled": true,
|
||||
"coverage_start": "2026-01-01",
|
||||
"coverage_end": "2026-12-31",
|
||||
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||
},
|
||||
"preparation_version": "private-investment-preparation-2026-v1"
|
||||
}
|
||||
},
|
||||
"effective_procedural_version": "private-investment-preparation-2026-v1",
|
||||
"new_fiscal_rules_published_or_activated": false,
|
||||
"qa_fixtures_copied": false,
|
||||
"accepted_scenarios_repeated_manually": false,
|
||||
"limitations": "No new scenario executed in homologation and no real dossier or personal data created. QA functional evidence reused; destination verification limited to revision, configuration and entry routes. Sector/fiscal exclusions remain explicit."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2018,3 +2018,212 @@ Cotejo dirigido: Lei22/2022 art.17-A/aditamento e eficácia; Lei10/2025 arts.18/
|
||||
Provas novas apenas do incremento:3testes frontend (agendas, zero/falta, sem IVA/dedução fabricados e relatório sem mutar resultado), TypeScript/build, Edge de consulta após recuperação e biblioteca idempotente/scan. Avaliador, selecção publicada, precisão, históricos e exportadores aceites reutilizados. DossierQA e fixtureIVA v4 continuam disponíveis para revisão; este incremento não calcula novamente. Provas privadas outputs/modelo-a-20261021; recibo e inventário existentes actualizados. Branch codex/iva-modelo-a-reconciliation-QA, parent3f5430c3, separada de main; homologação/regra real/interruptor inalterados.
|
||||
|
||||
Saldo explícito: **reconciliação e primeiro incremento de interface concluídos, apuramento completo não implementado**. Próximo lote: classificação por operação e origem prevista/efectiva, cadastro fundamentado de âmbito/dedução e ligação a totais14–18 propagando indeterminação; 8–16h cadastro/consolidação e20–36h código/aceitação, total28–52h condicionado ao âmbito/consolidação, sem créditos anteriores/substituições/pagamento/reembolso ou simulador integral. O documento contém o delta e critérios concretos. Integração do código, publicação e activação continuam operações distintas; esta preparação não executa nenhuma no destino.
|
||||
|
||||
|
||||
### Continuidade e adaptação contextual — primeiro incremento QA, 22/10/2026
|
||||
|
||||
Instrução expressa da Tempo de 22/10: o contexto do investimento é transversal ao percurso, formulários, documentos e simulações, mesmo sem IA. Base Git e revisão servida confirmadas em leitura: `57fc914821d0cefa02caa80a74b3d42e663f2742`. Trabalho isolado em `codex/project-context-continuity-QA`, sem integração ou publicação/activação fiscal no destino.
|
||||
|
||||
Causas identificadas no código e reprodução dirigida: `InvestorContext` só distribuía título, descrição, sector e geografia; o preenchimento comum copiava apenas campos vazios sem distinguir herança de edição deliberada; o IVA pontual mantinha moeda/data/base em estado local que desaparecia ao desmontar o ecrã. A projecção empresarial sobrepunha a moeda do projecto à moeda de origem do plano ao apresentar/calcular/exportar. No ensaio anterior, projecto guardado em MZN e selector IVA vazio. A primeira tentativa de abertura encontrou uma sessão expirada, confirmada pela leitura sem autenticação e resolvida pelo início de sessão normal; não foi classificada como perda do dossier.
|
||||
|
||||
Correcção comum: consolidar exclusivamente o rascunho explicitamente ligado ao mesmo dossier e proprietário; conservar origem, versão e hash. Não procurar o último projecto da conta. Herança persistida com assinaturas de alteração por campo e âmbito dossier/consumidor; não são tokens de autorização nem prova jurídica. Actualizar valores ainda herdados, preservar alterações deliberadas e campos apagados; manter a hierarquia geográfica e os restantes dados das parcelas. O armazenamento do navegador passa a incluir conta e projecto. Consumidores do padrão: simulador, apoio à terra, Balcão e manifestação de investimento; esta última recebe também a moeda compatível. Campos sem correspondência semântica não são copiados. Nacionalidade, residência e país de constituição não são equiparados.
|
||||
|
||||
O IVA pontual guarda as entradas com o rascunho. A exploração fiscal, oportunidade e componente pontual reutilizam a moeda compatível; a projecção mensal reutiliza o plano e o início previsto. Não se infere exigibilidade fiscal a partir da data prevista de início, nem residência jurídica a partir do país. USD é conservado e explicado como não suportado pela versão MZN. Uma divergência entre moeda guardada no plano e moeda do projecto é apresentada, sem conversão ou reclassificação. O plano conserva a moeda de origem também na apresentação e nos exportadores existentes. Vendas, zero/falta e snapshots de IVA continuam a usar o motor publicado e os históricos aceites; nenhum imposto mensal fixo é introduzido.
|
||||
|
||||
Adaptação deste incremento: o editor existente passa a permitir moeda, início previsto, origem do investidor, tipo/situação da entidade e residência fiscal declarada, sempre pela prévia/confirmar existente. A prévia continua a identificar dados/documentos conservados, resultados e etapas afectados; alterações apenas ao título/descrição não invalidam a aplicabilidade. O selector territorial reutiliza o catálogo público `InvestmentZones` para parques, ZEE e ZFI, preservando versão/hash, fontes e condições públicas já divulgadas no complemento existente. A mesma síntese aparece no contexto e simulador e segue para o relatório do dossier. Os ramos de terra/financiamento reutilizam a definição publicada, factos, estados e razões de `InvestorPath`; não foi criado outro avaliador nem activado benefício.
|
||||
|
||||
Escolher uma zona abre a análise específica: referência consultada, condições documentadas ou em falta, período/fonte cadastrados quando disponíveis e reconhecimento por determinar. O benefício e o cenário condicionado permanecem indeterminados quando não existe ligação executável às condições/reconhecimento. O IVA disponível é identificado como cenário geral sem benefício; não representa automaticamente o regime escolhido nem apuramento final. Reutilizam-se `InvestorContext`, `InvestmentZones`, `InvestmentZoneOperationalDetails`, `InvestorPath`/definição publicada, resolvedor/avaliador fiscal e snapshots existentes. A escolha técnica de exigir uma nova confirmação genérica dos mesmos dados em cada formulário foi retirada por instrução da Tempo; permissões, declarações, submissões formais, revisões independentes aprovadas e campos autorizados de pedidos devolvidos mantêm os controlos existentes.
|
||||
|
||||
Provas novas: 4 testes HTTP/74 asserções, em transacções revertidas na base isolada `simulator_fiscal_delta_20261021_test`/loopback55441; 8 testes frontend de herança, edição/apagamento, isolamento, parcelas, moeda divergente e contexto no relatório; TypeScript/build. Percurso Edge: A nacional/MZN e residência fiscal ZA, vendas guardadas de quatro meses → cálculo mensal → gravação → edição deliberada do título → recarregamento → terminar sessão/iniciar sessão → recuperação e relatório pelos dados efectivamente guardados. Resultado `ae401465-834f-4761-9406-5af060c499fb`, uma única execução nova no dia; Janeiro1000.03/IVA160.0048, Fevereiro2000.06/320.0096, Marçozero e Abrilsem informação. O modelo de relatório recuperado conserva os valores exactos e não altera o snapshot. B estrangeiro/USD, primeiro divergência explícita planoMZN/projectoUSD, depois declaração manual USD no plano, IVA recusado sem conversão; selecção de parque pela prévia e análise específica. Os testes de ZEE/ZFI usam apenas metadados sintéticos revertidos: não demonstram elegibilidade real. Provas privadas em `outputs/context-continuity-20261022`; não entregar fixtures ou credenciais.
|
||||
|
||||
Limites concretos: este é o primeiro incremento utilizável de continuidade e explicação contextual, não a conclusão da adaptação de todos os sectores/regimes. O catálogo QA consultado contém parques sintéticos; a ligação jurídica completa de requisitos/documentos/licenças e benefícios às condições de cada actividade/regime não está demonstrada. Condições sem estrutura/relação executável continuam explicitamente em falta; nenhuma alegação nova de direito ou benefício é feita. Não houve nova validação jurídica nem revalidação genérica de credibilidade das fontes oficiais aceites em08/10. Não repetir cálculo decimal/exportadores/paginação já aceites. A demonstração visual foi feita no percurso e simulador; os outros três consumidores receberam o reconciliador comum, sem se afirmar um ensaio visual integral de cada processo.
|
||||
|
||||
Revisão: abrir o simulador QA com o dossier A `92d0836c-0ffb-4e07-a7f5-0e8ca3f594b9` ou B `1872412f-251a-4f6d-bf18-70388e71a16a`; usar a conta sintética QA existente, nunca actores sintéticos na homologação. O router privado de QA usa a instalação já existente do percurso, activada apenas neste ensaio isolado; não há migration ou nova exigência de funções. Entregar a candidata para revisão pelo processo Git existente, preservando alterações concorrentes. Uma integração futura exige rever o delta relativamente a main e o estado de instalação/configuração do percurso no destino; não publicar regras ou alterar interruptores fiscais como consequência desta correcção. Preservar todos os históricos na suspensão ou reversão de código.
|
||||
|
||||
Fecho da observação deste incremento: o regresso A ao dossier gravou a evidência financeira `43317c22-50c8-40cf-98e4-e5d4d108c372`, rascunho `cf4dec46-c96c-4aa6-aa9c-1a8d6ecb1bea` v8, contexto v1, com hash preservado. A ligação de inspecção do Edge interrompeu-se depois da navegação; o inventário mostrou o endereço do mesmo dossier e a leitura autenticada do serviço confirmou a gravação. A parte visual final do regresso não foi observada e fica como limitação da ferramenta, não falha do simulador. B recuperou contexto v2 e gravou rascunho v6, mantendo USD e sem execução fiscal. O relatório gerado destes dados recuperados conserva a versão do parque e benefício indeterminado. O enriquecimento automático do rascunho privado é exclusivo do proprietário autenticado; o acesso de gestão ao dossier não concede por esta alteração acesso ao rascunho privado da conta.
|
||||
|
||||
|
||||
### Revisão de a76369eb e primeiro percurso adaptativo fundamentado — v1, 22/10/2026
|
||||
|
||||
**Revisão encerrada no âmbito de a76369eb, sem integração.** O último regresso tem prova equivalente: destino do mesmo dossier observado pelo inventário do navegador e evidência `43317c22-50c8-40cf-98e4-e5d4d108c372` confirmada no serviço, ligada ao rascunho v8/contexto v1 e ao hash `a21fa5779bf8b8df366f16683c8a9bb9817a6d2921c7384f85df02135307fa13`. A observação visual final continuou limitada pela ferramenta. Não se repetiram A/B, cálculos, exportações ou nova sessão; reutilizam-se as provas aceites. Leitura dirigida do delta: isolamento por proprietário/dossier, edições/apagamentos, origem monetária, controlo de escrita e ausência de publicação fiscal. Não foi identificada nova preparação técnica que condicione a decisão de integração deste âmbito. A adaptação jurídica seguinte é independente.
|
||||
|
||||
**Percurso delimitado preparado:** preparação de um pedido de investimento privado para empreendimento económico em Moçambique, com actividade concreta declarada, instalação identificada e operações mensais enquadráveis no consumidor IVA geral existente. Trata a preparação do pedido de investimento; não se apresenta como licenciamento sectorial completo, certificado emitido, direito a incentivo ou submissão à Administração. Investidor nacional/estrangeiro, actividade, modalidade e localização são condições distintas. A saída é formulário orientado, etapas/documentos aplicáveis e simulação identificada pelo seu âmbito. Não se escolhe “Turismo” ou uma ZEE para presumir requisitos ou benefícios.
|
||||
|
||||
**Fonte primária aplicada:** compilação oficial APIEX “Legislação de Investimentos em Moçambique”, exemplar obtido de https://pt.apiex.gov.mz/wp-content/uploads/2025/02/LEGISLACAO-DE-INVESTIMENTOS-EM-MOCAMBIQUE.pdf — 6467655 bytes, SHA256 `ba1e9eaabfec5d0c4cb2d9f2444a6860f7a90f222034764197829be402d408ed`. Contém Lei8/2023 (pp.8–32), Decreto8/2024/Regulamento (pp.36–59), CBF (pp.64–92). Aceitação oficial de08/10 mantida; não há exigência de segunda autenticação ou aprovação jurídica da Tempo. Inventários existentes de604 registos/exemplares/anexos e9901 caminhos do acervo reutilizados antes da selecção; cópia privada, texto extraído e citações em `outputs/adaptive-path-20261022`. Não importar/publicar automaticamente. As pendências históricas genéricas de nova certificação nos levantamentos de28/09 e03/10 não são gates deste lote.
|
||||
|
||||
**Período:** Decreto8/2024, artigo5 do diploma preambular, indica aplicação desde a publicação de7/03/2024; Lei8/2023, artigo32, indica90dias após publicação. O lote proposto cobre datas de projecto em2026 e preserva estes inícios, exemplar e versão. Não foi encontrada alteração nas consultas oficiais dirigidas desta execução; isso não certifica inexistência de actos posteriores. A compilação de2025 não constitui consolidação universal de2026. Na ligação executável, uma fonte/versão sem cobertura temporal não autoriza fallback para a versão mais recente. Os artigos citados são do **Regulamento anexo** quando identificado “R”; “L” designa a Lei8/2023. Rastrear esta distinção evita confundir os dois artigos9 ou o artigo5 preambular com o do Regulamento.
|
||||
|
||||
| Condição | Fonte e período | Efeito no formulário | Efeito no percurso | Efeito no cálculo | Informação em falta / estado da ligação |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| Projecto económico em Moçambique que procura garantias/incentivos; actividade efectiva conhecida | L2(1)–(3), pp.8–9; período2026 deste lote | Reutilizar localização e actividade; perguntar a finalidade jurídica apenas se ausente | S02 identifica cobertura do procedimento; actividades excluídas recebem encaminhamento próprio | Não inferir benefício ou exclusão de IVA a partir deste âmbito | Falta ligação executável da cobertura ao perfil; legislação sectorial especial fica fora deste lote |
|
||||
| Capital/recursos do exterior ou nacionais; pessoa, residência e constituição separadas | L3/anexo, pp.28–29; R4–6, pp.38–40; período2026 | Reutilizar os dados declarados; pedir origem/forma do aporte quando faltar, sem transformar nacionalidade em classificação do capital | Acrescentar preparação da prova/registo do aporte externo quando aplicável | Nenhuma mudança automática de taxa IVA ou conversão; transferências cambiais não calculadas | Falta dado estruturado de aporte e ligação à documentação; requisitos cambiais concretos não abrangidos |
|
||||
| Implementadora em constituição ou já registada | R9(1)(b), p.41; R14(1)(b), p.45; desde7/03/2024, recorte2026 | Mostrar a alternativa documental correspondente, sem exigir novo preenchimento da entidade | S05/S06: reserva de denominação ou certidão comercial, com estado declarado/associado por conferir | Não altera IVA | Falta associar categorias documentais existentes à alternativa e ao estado do cadastro |
|
||||
| Implantação em instalações arrendadas ou com DUAT | R9(1)(c)–(d), pp.41–42; R14(1)(c)–(d), p.46; recorte2026 | Reutilizar local; perguntar apenas a modalidade/evidência ainda ausente | S06 identifica esboço/planta e alternativa contrato/DUAT; sem converter ausência de título em ausência de direito | Não atribui taxa, custo fundiário ou benefício | Falta modalidade estruturada e associação ao documento; sem decidir titularidade/disponibilidade |
|
||||
| Pedido por representação comercial estrangeira, distinto de qualquer investidor estrangeiro | R9(2)–(3), p.42; recorte2026 | Pergunta de representação apenas quando a implantação declarada o permita; depois referência da licença e documento | S06 acrescenta licença de representação e identifica formalidades documentais pertinentes | Sem alteração da taxa geral | Falta modalidade e origem documental estruturadas; não exigir licença a todo investidor estrangeiro |
|
||||
| Nenhuma condição de autorização; ou dimensão/actividade/terra que a exija | L22(1)(b)–(2), pp.20–21; R13(2), R14 e R21, pp.45–50; recorte2026 | Reutilizar montante/moeda/actividade/área; perguntar apenas PPP/concessão, implicações ou dados ainda desconhecidos | Seleccionar preparação de mero registo ou autorização; na segunda, S02/S06 acrescentam estudo de viabilidade e capacidade financeira | Comparação do montante exige MZN ou equivalência documentada; não converter nem inventar taxa; IVA permanece componente separada | Falta ligar os predicados e evidências ao perfil. “Não sei” não equivale a “não”. Limite de32mil milhões MZN só resolve a condição de montante, não todas as restantes |
|
||||
| Localização geral versus ZEE/ZFI com referência e âmbito documentados | R13(1)(a)–(b), p.45; R10(4), p.43; recorte2026 | Reutilizar zona/versionamento; pedir reconhecimento/condições pertinentes em falta | Diferenciar entidade de encaminhamento e articulação aplicável; S08/S17 conservam evidências e pendências | Sem regra executável do benefício, mostrar resultado especial indeterminado e cenário geral separado | a76369eb já apresenta referência/limite; faltam ligações jurídicas de encaminhamento e condições. Parque industrial não equivale automaticamente a ZEE/ZFI |
|
||||
| Operação mensal interna geral, base líquida, MZN e período coberto pela versão publicada | Regra IVA já fundamentada/autorizada; Lei22/2022 art.17(1), fontes/limites no recibo existente; recorte fiscal2026 | Reutilizar vendas/mês/moeda; perguntar apenas pressupostos fiscais ainda ausentes | Ligar cálculo e relatório à mesma versão de contexto/regra | Consumidor existente calcula por versão servida; zero difere de falta; preço com IVA incluído não vira base líquida | Ligação mensal já demonstrada. Dedução, reembolso, saldo final e benefício especial continuam fora |
|
||||
| Mudança de título/contacto ou outra condição irrelevante para a regra aplicada | Decisão Tempo22/10 e contratos existentes; escolha técnica de dependências identificada | Preservar a edição e preencher o que continuar compatível | Não reiniciar revisões/etapas sem dependência relevante | Não criar outra execução nem mudar taxa/base | Prova de título e testes de dependências já aceites; estender por dependência, não por “qualquer alteração” |
|
||||
|
||||
**Diferença útil que a implementação deste lote deve demonstrar, sem repetir A/B:** um caso C exclusivamente sintético, empresa em constituição, actividade económica não extractiva declarada, instalações arrendadas, capital emMZN, período2026. Primeiro completar as condições de enquadramento; depois a preparação de mero registo mostra a alternativa reserva de denominação/arrendamento. Alterar a condição de autorização para verdadeira troca o resultado procedimental, os campos necessários e os documentos para estudo/capacidade financeira. Com condição desconhecida, a selecção fica indeterminada e pede apenas essa informação. Alterar para representação comercial estrangeira acrescenta a licença pertinente; mudar apenas nacionalidade não produz esse efeito. Alterar de localização geral para ZEE/ZFI documentada altera o encaminhamento e as verificações, sem conceder benefício. O IVA geral continua matematicamente igual quando a mudança não afecta a sua regra; mudar vendas/base/moeda/período altera ou impede o cálculo conforme a cobertura existente. Não forçar um resultado numérico diferente quando a lei não o determina.
|
||||
|
||||
**Cadastro e código separados:** o conteúdo jurídico acima está preparado, com artigos, exemplar e início temporal. Falta cadastrar as correspondências versionadas campo/condição/etapa/documento e ligar a sua execução ao perfil existente. Usar o mesmo dossier, prévia/confirmar, definições/questionários versionados e suporte condicional `when` já utilizado nos formulários; reutilizar resolvedor temporal, avaliação e aritmética exacta nas interfaces em que sejam compatíveis, com adaptador explícito para os predicados procedimentais, sem criar outro motor nem armazenar procedimentos como imposto. O contexto já tem sector/actividade/localização/moeda/período/entidade; as respostas de modalidade e evidências ainda não ligadas devem ser acrescentadas ao mesmo contexto cifrado, com origem e alterações deliberadas. Reutilizar vínculos documentais/históricos e permissões existentes. Não alterar a definição publicada dos19passos nem activar outra regra fiscal para executar este cadastro.
|
||||
|
||||
**Estado desta entrega:** revisão de a76369eb concluída no âmbito aceite; **percurso seguinte fundamentado e delimitado, ainda não implementado/demonstrado de ponta a ponta**. A tabela não é prova de funcionalidade nem declara licenciamento sectorial completo. Não integrar este documento como se instalasse o percurso. Próxima execução técnica concreta: ligar as condições acima, persistir decisões/documentos e verificar apenas as transições de C, recuperação e relatório; conservar as provas aceites de contexto e IVA. Código, publicação de parâmetros/regras e activação continuam operações separadas. Não há nova autorização organizacional ou validação jurídica da Tempo presumida.
|
||||
|
||||
|
||||
### Percurso de investimento privado executável em QA — 22/10/2026
|
||||
|
||||
Implementação do delta de `52fbb146`, na branch `codex/private-investment-path-executable-QA`. A integração independente de `a76369eb` não foi repetida nem condicionada por este lote. Não houve escrita na homologação, integração em main, publicação ou activação de regras fiscais.
|
||||
|
||||
**Orientação permanente aplicada:** decisão expressa da Tempo de 22/10, registada também em AGENTS.md: legislação, modelos e procedimentos oficiais disponibilizados são a base aceite para implementar; decisões da Tempo orientam a implementação. Não existe nova aprovação jurídica genérica, aprovador adicional ou validação de credibilidade como condição para executar este percurso. Dados concretamente em falta são identificados por campo e não anulam os restantes requisitos. Associação documental não equivale a reconhecimento administrativo; esta distinção é informativa, sem bloquear a gravação ou a preparação.
|
||||
|
||||
**Ligação executável:** `PrivateInvestmentPreparation` é o adaptador delimitado das condições procedimentais já documentadas para o contexto cifrado do dossier. Correspondência `private-investment-preparation-2026-v1`, exemplar APIEX/hash anteriormente registados, recorte de início previsto em 2026. Reutiliza campos conhecidos do mesmo projecto/rascunho, permissões, vínculos documentais, prévia assinada, controlo de concorrência, chave idempotente, eventos antes/depois e os 19 passos existentes. Não é outro motor fiscal, catálogo paralelo de benefícios ou novo processo de aprovação. O resolvedor fiscal publicado e a aritmética decimal existentes continuam responsáveis pelos seus cálculos; não se armazenaram predicados procedimentais como impostos.
|
||||
|
||||
No dossier normal, «Preparar o pedido de investimento privado» abre o editor de contexto. Valores já declarados ficam recuperados e editáveis, sem nova confirmação por ecrã. Dados condicionais de área só aparecem para extensão de terra/concessão florestal. A prévia mostra ramo antes/depois, documentos novos/inactivos, passos afectados e resultados que precisam de revisão. Apenas a confirmação grava uma revisão; cancelamento conserva o estado anterior. Os requisitos correspondentes aparecem nas etapas S02/S05/S06 e o próximo passo acompanha mero registo/autorização. As dependências formais da definição publicada não foram substituídas por novos bloqueios.
|
||||
|
||||
**Fundamento executado:** Lei 8/2023 artigos 2 e 22; Regulamento aprovado pelo Decreto 8/2024 artigos 5, 9, 13, 14 e 21, conforme a tabela de 52fbb146 acima. Na interface, R designa este Regulamento. As exigências têm razão, artigo, período e ligação ao exemplar oficial. As alternativas certidão/reserva e DUAT/arrendamento não são cumulativas. Representação estrangeira determina a licença correspondente; nacionalidade ou residência, isoladamente, não a determinam. Aporte externo tem origem declarada separadamente da nacionalidade. Montante >32 mil milhões MZN, terra >=10 mil ha e concessão florestal >100 mil ha usam comparação decimal exacta, sem conversão cambial presumida. R21 distingue Finanças/Conselho de Ministros conforme as condições efectivamente conhecidas; uma condição positiva suficiente não espera pelas restantes para identificar o pedido de autorização.
|
||||
|
||||
| Comparação nova, exclusivamente QA | Campos e documentos | Próximo passo / efeito no cálculo | Prova |
|
||||
| --- | --- | --- | --- |
|
||||
| C: empresa em constituição, actividade geral, 1.000.000 MZN, 01/01/2026, modalidade doméstica, capital nacional, instalações arrendadas; condições de autorização negativas | Reserva de denominação, identificação, planta e arrendamento; não exige certidão, DUAT, licença de representação ou estudo/capacidade de autorização | Mero registo; encaminhamento Governador. Nenhuma taxa IVA alterada | UI → prévia → confirmar; contexto v1 |
|
||||
| C: associar suporte sintético já existente ao arrendamento | Mesmo documento associado por ID; não cria cópia nem o aprova | Conserva o pedido; contexto v2 | UI; um vínculo em desk_documents |
|
||||
| C: PPP/concessão empresarial passa a sim, modalidade passa a representação estrangeira e instalações a DUAT | Entram estudo/capacidade, licença de representação e DUAT; arrendamento deixa de ser exigido, conservando o documento anterior | Autorização, Conselho de Ministros; S02/S05/S06/S07 para revisão. Esta mudança meramente procedimental não invalida os inputs do IVA | Prévia visual antes de confirmar; contexto v3 recuperado; PNG C-authorization-preview |
|
||||
| C: recuperação e simulador | MZN, data, título, contexto v3 e preparação por autorização recuperados sem reintrodução; arrendamento inactivo visível no histórico | Mesmo âmbito fiscal geral; nenhuma execução fiscal nova pedida neste ensaio | Dossier normal, simulador e rascunho ligado; leitura persistida e relatório Word |
|
||||
| Regresso autorização → mero registo; entidade em constituição → existente | Estudo/capacidade/licença deixam de ser exigidos; arrendamento anterior volta associado; certidão substitui reserva, sem apagar histórico | Ramo e requisitos recalculados | Controlo HTTP transaccional dirigido, não repetição visual A/B |
|
||||
| ZEE/ZFI versus parque industrial | Encaminhamento APIEX condicionado ao enquadramento reconhecido; parque não é convertido em ZEE/ZFI | Nenhum benefício ou taxa especial concedidos | Predicados com referências sintéticas de QA; não prova de elegibilidade de uma zona real |
|
||||
|
||||
**Provas novas:** três testes feature, 96 asserções, exclusivamente na base `simulator_fiscal_delta_20261021_test`, loopback 55441, com transacções revertidas e guarda do alvo. Cobrem limiares exactos, desconhecidos, exclusões/período, não inferência por nacionalidade, alternativas e preservação de vínculo, recuperação, idempotência, prévia sem escrita, adulteração, documento de outro dossier recusado e consumidor desligado, incluindo edição independente do título sem perder snapshot ou vínculos. Um teste frontend confere somente o novo conteúdo congelado do relatório. TypeScript e build passaram. Não foram repetidos cálculos decimais, exportadores completos, paginação PDF, CSV ou ensaios A/B aceites.
|
||||
|
||||
**Recibo C da fase por autorização (histórico v3):** dossier `4133311b-5426-4cec-900d-1f1484484083`; contexto v3; rascunho `beba1dec-fc05-4820-b099-24952c5ab36c`, v4, SHA256 `4136e82a3b9420ab8f980ec0d7bda6dc2a67b568c18535b5ba0ecc80efd37e37`. Um documento sintético `e5ce142a-1178-46a2-b039-f187139c62cd`, sem pretensão de autenticidade oficial ou reconhecimento; mantém quarentena/scan pendente, sem contornar o carregamento/antimalware. A fixture apenas disponibiliza metadados privados para observar associação, não ensaia novamente uploads e não faz parte de dados/migrações de entrega. Três eventos de mudança do contexto; uma associação documental. C não contém projecção de vendas nem novo resultado fiscal; as provas anteriores dessa componente são reutilizadas.
|
||||
|
||||
**Relatório efectivamente transferido:** `relatorio-investmoz-sintetico-qa-c-pedido-de-investimento-privado.docx`, 16.674 bytes, SHA256 `28cfe4b75116c892d3e29fde389de7d067b456761756bab732af625178ee69ce`. Conferido o novo conteúdo: pedido de autorização, versão, fundamentos R14 e exigências não aplicáveis com histórico preservado. Não se repetiu a verificação de paginação/exportadores. Os anexos do dossier não são inseridos silenciosamente no pacote; mantém-se a selecção explícita existente. O relatório identifica a preparação/simulação e não alega submissão ou aceitação administrativa.
|
||||
|
||||
**Limitação da ferramenta:** a observação do evento de download excedeu o tempo e a extensão perdeu a ligação. O ficheiro terminou e foi encontrado em Transferências antes de qualquer repetição; conteúdo/hash conferidos localmente. Não se repetiu a exportação nem se classificou o incidente como falha do simulador. A prévia de impacto e recuperação já tinham prova visual; a recepção do ficheiro é prova distinta.
|
||||
|
||||
**Limites concretos:** este lote prepara o pedido de garantias/incentivos de investimento privado, não executa submissão administrativa, licenciamento completo por sector ou decisão de elegibilidade. Prospecção/pesquisa/produção extractiva, investimento público/exclusivamente social sem fins lucrativos e períodos fora de 2026 não são cobertos por este adaptador; processamento industrial tem o ramo de autorização documentado. A equivalência de montante noutra moeda não é determinada sem dados/fundamento cambial aplicáveis; condições positivas independentes continuam executáveis. O catálogo visual deste QA contém apenas parques sintéticos, não uma ZEE/ZFI real elegível: encaminhamento especial conferido no predicado, sem declarar prova visual de reconhecimento real. Benefícios territoriais, deduções, reembolsos e apuramento final do IVA continuam indisponíveis; o cálculo geral já autorizado conserva o seu âmbito.
|
||||
|
||||
**Utilização e integração:** abrir `http://127.0.0.1:18580/investimentos/4133311b-5426-4cec-900d-1f1484484083` na conta QA habitual. Usar «Comparar e alterar contexto», editar apenas a condição relevante, comparar e confirmar; para documentos, usar o Balcão do mesmo dossier e associar os existentes. QA habilita `investor-path.private_preparation=true` no router privado. A configuração de entrega `PRIVATE_INVESTMENT_PREPARATION_ENABLED` fica desligada por defeito; a homologação não foi alterada. Integração eventual pelo processo Git existente: rever branch/código e limites, incorporar sobre main actualizado preservando alterações concorrentes, build e conferir apenas o delta no destino; habilitação deste percurso é uma configuração separada, não publicação/activação fiscal. Suspender a configuração oculta o novo consumidor e recusa novas escritas específicas, sem eliminar contexto, documentos, eventos, rascunhos ou relatórios congelados. Sem migração ou seed de fixtures no destino. Nenhuma nova ronda de preparação técnica foi identificada para este recorte; revisão/decisão de integração continuam separadas.
|
||||
|
||||
|
||||
**Distinção final conferida, sem nova validação genérica:** Lei 8/2023 artigo 14(b) distingue investimento directo/indirecto; R13 refere expressamente investimento directo nos limiares monetários. Acrescentado o dado «Tipo deste investimento», separado da origem/nacionalidade. Sem esse dado, a via dependente da dimensão permanece indeterminada; para forma indirecta este lote não determina dimensão/encaminhamento monetário, mas continua a avaliar as condições independentes documentadas. PPP/concessão positiva continua a determinar autorização e Conselho de Ministros, sem esperar por esse campo irrelevante à decisão já suficiente. A interface foi conferida: retirar a condição PPP pede exactamente o tipo em falta; declarar directo resolve mero registo e retira estudo/capacidade financeira. Comparação antes de confirmar em `C-final-directness-preview.png` e percurso recuperado em `C-final-path.png`.
|
||||
|
||||
Estado final C: dossier v8, contexto **v4**, investimento directo declarado, PPP não, pedido de **mero registo**; quatro eventos de contexto e um documento/vínculo conservados. A modalidade estrangeira/DUAT conservou a edição deliberada. O rascunho v4 e o Word já transferido mantêm o contexto **v3 por autorização**, com hash acima: são prova histórica congelada e não o relatório da revisão v4. Não houve reescrita silenciosa nem reexportação. Ao abrir o simulador, o mecanismo comum de continuidade disponibiliza a revisão actual para o próximo rascunho/relatório; as provas anteriores deste mecanismo continuam reutilizadas.
|
||||
|
||||
|
||||
### Correspondência do novo relatório com o contexto v4 e dependências Git — 22/10/2026
|
||||
|
||||
Verificação dirigida solicitada pela Tempo após a avaliação do resumo de `a1fbda06`; nenhuma alteração funcional necessária. A prova anterior só demonstrava o Word congelado v3. Nesta continuação abriu-se o simulador pelo link normal do mesmo dossier C (incluindo o rascunho ligado), recuperou-se automaticamente o contexto v4 e gerou-se **uma** saída Word nova. Não se repetiram cálculos, CSV, paginação, anexos ou ensaios A/B aceites; não houve nova validação jurídica, integração ou alteração fiscal.
|
||||
|
||||
| Elemento | Word histórico v3 | Novo Word do contexto v4 |
|
||||
| --- | --- | --- |
|
||||
| Identificação dentro do documento | «Revisão 3» e «Contexto congelado v3» | «Revisão 4» e «Contexto congelado v4» |
|
||||
| Pedido | Autorização | Mero registo |
|
||||
| Estudo de viabilidade | Documento por associar | Não aplicável; histórico preservado |
|
||||
| Capacidade financeira | Documento por associar | Não aplicável; histórico preservado |
|
||||
| Bytes / SHA256 | 16.674 / `28cfe4b75116c892d3e29fde389de7d067b456761756bab732af625178ee69ce` | 16.678 / `a2849427f4a91fa6ab78e433be8b919baca80a0f4f452a4546a5b169b921d753` |
|
||||
| Cópia identificada para revisão | `outputs/private-path-executable-20261022/C-report-HISTORICO-contexto-v3.docx` | `outputs/private-path-executable-20261022/C-report-contexto-v4.docx` |
|
||||
|
||||
O original v3 conserva exactamente os bytes/hash anteriores; a cópia está explicitamente designada **HISTÓRICO**. A revisão congelada no próprio Word identifica o contexto a que pertence, sem o transformar no estado actual. O novo ficheiro foi encontrado em Transferências após o clique de exportação e conferido por leitura das células efectivamente geradas; recibo em `C-report-v3-v4-comparison.json`. O rascunho passou a v5, SHA256 `ba824fe0362ca87b301da55298122796f44fdfb11507830b3fe8f54cf88d132d`, com contexto v4 e preparação por mero registo; dossier v8/contexto v4 e um documento mantidos. Prova visual de recuperação em `C-new-report-context-v4.png`. Não se altera a validade histórica da prova v3.
|
||||
|
||||
**Dependências para integração após a avaliação da Tempo:** ancestralidade confirmada `57fc9148 → a76369eb → 52fbb146 → a1fbda06`. `a76369eb` fornece a continuidade comum do contexto/edições e é dependência funcional de `a1fbda06`; pode ser integrado independentemente. `52fbb146` é a preparação documental intermédia, sem código executável. A branch `codex/private-investment-path-executable-QA` inclui essa ancestralidade e a presente prova documental; não aplicar apenas o diff de `a1fbda06` num destino sem a continuidade ou alteração equivalente. Se a76369eb já tiver sido integrado, o merge normal reconhece a ancestralidade e não o reaplica como um segundo desenvolvimento.
|
||||
|
||||
Procedimento: após a decisão, recuperar o main actual, rever a comparação e fazer integração Git que preserve as alterações concorrentes; resolver apenas conflitos efectivos, sem reset/force-push de main. A leitura desta continuação encontrou main em `57fc914821d0cefa02caa80a74b3d42e663f2742`; é fotografia do estado, não autorização para ignorar commits posteriores. Conferir a revisão servida e só o delta no destino. A habilitação `PRIVATE_INVESTMENT_PREPARATION_ENABLED` é configuração distinta; não publica nem activa regras fiscais. Nesta execução a branch permanece separada, sem integração/habilitação na homologação. Limitações sectoriais/fiscais explícitas mantêm âmbito próprio e não bloqueiam este recorte concluído.
|
||||
|
||||
|
||||
### Integração autorizada do percurso adaptativo — 22/10/2026
|
||||
|
||||
A Tempo autorizou a implementação após o fecho do recorte. Main remoto foi actualizado por avanço directo de `57fc9148` para `064296e1`, preservando a sequência `a76369eb → 52fbb146 → a1fbda06 → 064296e1`; não havia alteração concorrente ou conflito no momento do envio. A cadeia automática recusou a primeira tentativa no teste frontend «server draft snapshots split private identity from economic values»: 188/189 passaram. A versão servida anterior `57fc9148` foi conservada, conforme o mecanismo de recuperação; não se contornou a verificação.
|
||||
|
||||
Causa concreta: o adaptador de continuidade acrescentava `compatible_fields_snapshot` vazio na recuperação de um rascunho legado sem nenhuma origem compatível. Correcção delimitada na branch `codex/adaptive-delivery-compatibility-QA`: devolver o rascunho original quando não há origem compatível nem metadados de herança anteriores. A herança com origem/metadados continua executada, preservando edições e limites por dossier. Nove controlos dirigidos da herança e o teste exacto da partição/recuperação passaram; não se reabriram os cálculos, relatórios ou cenários aceites. A correcção deve seguir o mesmo processo automático; não altera regras fiscais, esquema ou dados activos. Recibos da tentativa e da disponibilização final em `outputs/investmoz-adaptive-path-delivery-20261022`.
|
||||
|
||||
|
||||
### Percurso adaptativo disponibilizado na homologação — 22/10/2026, 10:17 Maputo
|
||||
|
||||
Autorização expressa da Tempo executada. Main passou de `57fc9148` por avanço directo para `064296e1`, conservando a ancestralidade `a76369eb → 52fbb146 → a1fbda06 → 064296e1`. O remoto não tinha alterações concorrentes adicionais no momento da integração; não houve conflito, reset ou envio forçado. A primeira verificação automática recusou o novo metadado vazio na recuperação legada e conservou a release anterior; a causa e a correcção dirigida constam da secção anterior. A correcção `042ffbde44cac27704d6f8b7ec25b525a42e3575` foi ensaiada em branch e integrada por avanço directo, sem suprimir o teste que detectou a incompatibilidade.
|
||||
|
||||
**Revisão efectivamente servida:** `042ffbde44cac27704d6f8b7ec25b525a42e3575`, branch main, build de 22/10/2026 às 10:16:14 Maputo; instalação automática concluída às 10:16:16. Manifesto SHA256 `655eef6e6a5e71c5138c68465a5b2ffc36d2cadeff96e6b35682dbfd19d42e79`. Conferida em `https://teste-investidor.tempo.co.mz/build/revision.json` e no recibo protegido da cadeia. A cadeia correu as verificações próprias; manualmente só foram repetidos os dez controlos afectados pela incompatibilidade. Zero migrations e zero importações no destino, sem copiar fixtures QA.
|
||||
|
||||
**Funcionalidade utilizável:** `https://teste-investidor.tempo.co.mz/investimentos` (login normal); abrir ou criar o dossier legítimo do investimento e usar «Preparar o pedido de investimento privado» / «Comparar e alterar contexto». Estão disponíveis as perguntas condicionais, fundamentos, comparação antes de confirmação, requisitos/documentos e próximos passos do lote `private-investment-preparation-2026-v1`, com os limites de 2026 já documentados. A conferência do destino limitou-se à revisão, configuração efectiva e entradas: investimentos redirecciona ao login (302), simulador responde 200. Não se criaram dossiers/contas reais ou sintéticas no destino nem se repetiram os cenários funcionais QA aceites.
|
||||
|
||||
**Habilitação concreta, distinta de fiscalidade:** a configuração do percurso `PRIVATE_INVESTMENT_PREPARATION_ENABLED` estava ausente/false; passou a true mediante a sessão SSH habitual autenticada pelo utilizador. Antes da escrita foram conferidos revisão servida e hash da configuração; cópia protegida dos bytes anteriores verificada, alteração limitada a essa chave, proprietário e modo0640 preservados, cache de configuração reconstruída e workers notificados de reinício gracioso. Hash .env anterior `7cdaba591bb5787485a349c24db2fd7c8279436da0eb31502e44db2fffa21d03`; posterior `a6b4e9064cf6dbb2d945b53418a6c9252f9c736ff3fde4016b95b74885a9ee0f`. A leitura posterior confirmou `investor-path.enabled=true` e `private_preparation=true`. A cópia de recuperação permanece privada em `/var/lib/investmoz-deploy/backups/private-preparation-20261022/`; não contém uma publicação de parâmetros e não segue para Git.
|
||||
|
||||
**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.
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 9.4 MiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 91 KiB |
@@ -7,413 +7,24 @@
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
/* Institutional shell adapted from Tempo; page content keeps its own theme. */
|
||||
.tempo-header {
|
||||
position: relative;
|
||||
z-index: 40;
|
||||
background: #090909;
|
||||
color: #fff;
|
||||
}
|
||||
.tempo-header-inner {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
grid-template-rows: 72px;
|
||||
column-gap: 0.5rem;
|
||||
align-items: center;
|
||||
max-width: 1440px;
|
||||
margin-inline: auto;
|
||||
padding-inline: 0.75rem;
|
||||
}
|
||||
.tempo-logo-link {
|
||||
grid-area: 1 / 1;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.tempo-header-logo {
|
||||
width: auto;
|
||||
height: 36px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.tempo-primary-navigation {
|
||||
display: none;
|
||||
grid-area: 2 / 1 / auto / -1;
|
||||
min-width: 0;
|
||||
border-top: 1px solid #ffffff1a;
|
||||
}
|
||||
.tempo-primary-navigation > ul {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 0.25rem 0.5rem;
|
||||
padding-block: 0.75rem;
|
||||
}
|
||||
.tempo-primary-navigation .tempo-nav-trigger {
|
||||
font-size: 0.9375rem;
|
||||
padding-inline: 0.5rem;
|
||||
}
|
||||
.tempo-nav-trigger {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 44px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.4rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 0.4rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
color: #eee;
|
||||
transition:
|
||||
color 0.2s,
|
||||
background 0.2s;
|
||||
}
|
||||
.tempo-nav-trigger:hover,
|
||||
.tempo-nav-trigger[data-state='open'] {
|
||||
background: #ffffff0d;
|
||||
color: #fff;
|
||||
}
|
||||
.tempo-nav-trigger[data-current-group] {
|
||||
color: #fff;
|
||||
box-shadow: inset 0 -2px #ed1c24;
|
||||
}
|
||||
.tempo-nav-trigger[data-state='open'] > svg {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.tempo-primary-navigation .tempo-nav-trigger > svg {
|
||||
transform: none;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.tempo-section-bar {
|
||||
border-top: 1px solid #ffffff14;
|
||||
background: inherit;
|
||||
}
|
||||
.tempo-section-inner {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 0.25rem 0.75rem;
|
||||
max-width: 1440px;
|
||||
margin-inline: auto;
|
||||
padding: 0 0.75rem 0.5rem;
|
||||
}
|
||||
.tempo-section-navigation {
|
||||
grid-area: 1 / 1 / auto / -1;
|
||||
min-width: 0;
|
||||
}
|
||||
.tempo-section-navigation > ul {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
.tempo-section-navigation .tempo-nav-trigger {
|
||||
justify-content: center;
|
||||
min-height: 44px;
|
||||
gap: 0.25rem;
|
||||
padding: 0.5rem 0.375rem;
|
||||
border-radius: 0;
|
||||
font-size: 0.8125rem;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
.tempo-section-navigation .tempo-nav-trigger {
|
||||
min-height: 48px;
|
||||
gap: 0.5rem;
|
||||
padding-inline: 0.75rem;
|
||||
font-size: 1rem;
|
||||
@import './tempo-header.css';
|
||||
|
||||
@keyframes portal-hero-caret {
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.tempo-section-inner {
|
||||
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
||||
padding: 0.25rem 1.25rem;
|
||||
}
|
||||
.tempo-section-navigation {
|
||||
grid-area: 1 / 2;
|
||||
}
|
||||
.tempo-section-inner .tempo-panel-summary {
|
||||
grid-area: 1 / 1;
|
||||
}
|
||||
.tempo-section-inner .tempo-interest-button {
|
||||
grid-area: 1 / 3;
|
||||
|
||||
.portal-hero-caret {
|
||||
animation: portal-hero-caret 0.8s step-end infinite;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.portal-hero-caret {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
.tempo-header-extras {
|
||||
display: none;
|
||||
grid-area: 3 / 1 / auto / -1;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
min-width: 0;
|
||||
padding-block: 0.75rem;
|
||||
border-top: 1px solid #ffffff1a;
|
||||
}
|
||||
.tempo-header[data-expanded] .tempo-primary-navigation {
|
||||
display: block;
|
||||
}
|
||||
.tempo-header[data-expanded] .tempo-header-extras {
|
||||
display: flex;
|
||||
}
|
||||
.tempo-header-utilities {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.tempo-utility-button {
|
||||
display: flex;
|
||||
min-height: 40px;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 0.4rem;
|
||||
border-radius: 0.5rem;
|
||||
font-size: 0.8125rem;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
.tempo-utility-button:hover {
|
||||
background: #ffffff10;
|
||||
}
|
||||
.tempo-header-social {
|
||||
display: flex;
|
||||
width: 30px;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--social-color);
|
||||
transition:
|
||||
transform 0.2s,
|
||||
opacity 0.2s;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
.tempo-header-social:hover {
|
||||
transform: translateY(-2px);
|
||||
opacity: 0.8;
|
||||
}
|
||||
.tempo-login-button {
|
||||
display: inline-flex;
|
||||
min-height: 40px;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
border: 1px solid #ffffff50;
|
||||
border-radius: 0.4rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
color: #fff;
|
||||
transition:
|
||||
background 0.2s,
|
||||
border-color 0.2s;
|
||||
}
|
||||
.tempo-login-button:hover {
|
||||
background: #ed1c24;
|
||||
border-color: #ed1c24;
|
||||
}
|
||||
.tempo-login-button > span {
|
||||
max-width: clamp(2rem, calc(100vw - 18rem), 6rem);
|
||||
}
|
||||
.tempo-header-actions {
|
||||
grid-area: 1 / 2;
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
align-items: center;
|
||||
}
|
||||
.tempo-interest-button {
|
||||
display: inline-flex;
|
||||
grid-area: 2 / 2;
|
||||
justify-self: end;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 40px;
|
||||
padding: 0.5rem 0.65rem;
|
||||
border: 1px solid #ed1c24;
|
||||
border-radius: 0.4rem;
|
||||
background: #ed1c24;
|
||||
color: white;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.tempo-interest-button:hover {
|
||||
background: #c9151c;
|
||||
}
|
||||
.tempo-panel-summary {
|
||||
grid-area: 2 / 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
gap: 0.1rem;
|
||||
min-height: 44px;
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.4;
|
||||
color: #fff;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
.tempo-panel-summary:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.tempo-panel-count {
|
||||
color: #cbd5e1;
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
.tempo-header-toggle {
|
||||
grid-area: 1 / 3;
|
||||
display: inline-flex;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #ffffff33;
|
||||
border-radius: 0.4rem;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tempo-header-toggle:hover,
|
||||
.tempo-header-toggle[aria-expanded='true'] {
|
||||
background: #ffffff10;
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
.tempo-header-inner {
|
||||
padding-inline: 1.25rem;
|
||||
}
|
||||
.tempo-header-logo {
|
||||
height: 44px;
|
||||
}
|
||||
.tempo-primary-navigation > ul {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.tempo-header-inner {
|
||||
grid-template-rows: 88px;
|
||||
padding-inline: 1.5rem;
|
||||
}
|
||||
.tempo-header-logo {
|
||||
height: 56px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
/* Shared columns keep each portal area below its institutional link. */
|
||||
.tempo-header-layout {
|
||||
display: grid;
|
||||
grid-template-columns: auto repeat(4, max-content) minmax(0, 1fr) auto;
|
||||
column-gap: 0.25rem;
|
||||
max-width: 1440px;
|
||||
margin-inline: auto;
|
||||
padding-inline: 2rem;
|
||||
}
|
||||
.tempo-header-inner {
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
min-height: 88px;
|
||||
column-gap: normal;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.tempo-logo-link {
|
||||
margin-right: 0.75rem;
|
||||
}
|
||||
.tempo-header-logo {
|
||||
height: 64px;
|
||||
}
|
||||
.tempo-header[data-expanded] .tempo-primary-navigation,
|
||||
.tempo-primary-navigation {
|
||||
display: grid;
|
||||
grid-area: 1 / 2 / 2 / 6;
|
||||
grid-template-columns: subgrid;
|
||||
border: 0;
|
||||
}
|
||||
.tempo-primary-navigation > ul {
|
||||
display: grid;
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
gap: normal;
|
||||
padding: 0;
|
||||
}
|
||||
.tempo-nav-trigger {
|
||||
justify-content: center;
|
||||
padding-inline: 0.875rem;
|
||||
font-size: 1.125rem;
|
||||
letter-spacing: 0.025em;
|
||||
}
|
||||
.tempo-primary-navigation .tempo-nav-trigger {
|
||||
padding-inline: 0.625rem;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
.tempo-header-extras {
|
||||
display: flex;
|
||||
grid-area: 1 / 6;
|
||||
justify-self: end;
|
||||
flex-shrink: 0;
|
||||
padding: 0 0.75rem;
|
||||
border-top: 0;
|
||||
border-inline: 1px solid #ffffff1a;
|
||||
}
|
||||
.tempo-header-utilities {
|
||||
flex-wrap: nowrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.tempo-header-social {
|
||||
width: 26px;
|
||||
}
|
||||
.tempo-header-toggle {
|
||||
display: none;
|
||||
}
|
||||
.tempo-header-actions {
|
||||
grid-area: 1 / 7;
|
||||
}
|
||||
.tempo-section-bar {
|
||||
display: grid;
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
}
|
||||
.tempo-section-inner {
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
gap: normal;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding-inline: 0;
|
||||
}
|
||||
.tempo-section-navigation {
|
||||
display: grid;
|
||||
grid-area: 1 / 2 / 2 / 5;
|
||||
grid-template-columns: subgrid;
|
||||
}
|
||||
.tempo-section-navigation > ul {
|
||||
display: grid;
|
||||
grid-column: 1 / -1;
|
||||
grid-template-columns: subgrid;
|
||||
gap: normal;
|
||||
}
|
||||
.tempo-section-navigation .tempo-nav-trigger {
|
||||
padding-inline: 0.625rem;
|
||||
}
|
||||
.tempo-primary-navigation .tempo-nav-trigger,
|
||||
.tempo-section-navigation .tempo-nav-trigger {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.tempo-interest-button {
|
||||
padding-inline: 0.85rem;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
.tempo-section-inner .tempo-interest-button {
|
||||
grid-area: 1 / 6 / 2 / -1;
|
||||
}
|
||||
}
|
||||
.tempo-header :is(a, button):focus-visible {
|
||||
outline: 2px solid #fff;
|
||||
outline-offset: 4px;
|
||||
}
|
||||
|
||||
.tempo-dropdown {
|
||||
z-index: 60;
|
||||
border: 1px solid #e2e8f0;
|
||||
@@ -441,7 +52,7 @@
|
||||
outline: none;
|
||||
}
|
||||
.tempo-footer {
|
||||
margin-top: 2rem;
|
||||
margin-top: 1.5rem;
|
||||
background: #050505;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -475,7 +86,8 @@
|
||||
.tempo-contact-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
gap: 0.75rem;
|
||||
min-height: 40px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.tempo-contact-link:hover {
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
/* Presentation choice for Tempo's 21/10/2026 request: one shared navigation. */
|
||||
.tempo-header {
|
||||
position: relative;
|
||||
z-index: 40;
|
||||
background: #090909;
|
||||
color: #fff;
|
||||
border-bottom: 1px solid #ffffff14;
|
||||
}
|
||||
.tempo-header-inner {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
grid-template-rows: 71px;
|
||||
align-items: center;
|
||||
column-gap: 0.5rem;
|
||||
max-width: 1600px;
|
||||
margin-inline: auto;
|
||||
padding-inline: 0.75rem;
|
||||
}
|
||||
.tempo-logo-link {
|
||||
grid-area: 1 / 1;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
width: 112px;
|
||||
max-width: 100%;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.tempo-header-logo {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
.tempo-primary-navigation {
|
||||
display: none;
|
||||
grid-area: 2 / 1 / auto / -1;
|
||||
min-width: 0;
|
||||
border-top: 1px solid #ffffff1a;
|
||||
padding-block: 0.75rem;
|
||||
}
|
||||
.tempo-primary-navigation > ul {
|
||||
display: grid;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
.tempo-nav-trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.4rem;
|
||||
width: 100%;
|
||||
min-height: 44px;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 0.5rem;
|
||||
color: #e2e8f0;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
transition:
|
||||
color 0.2s,
|
||||
background 0.2s;
|
||||
}
|
||||
.tempo-nav-trigger:hover,
|
||||
.tempo-nav-trigger[data-state='open'] {
|
||||
background: #ffffff0d;
|
||||
color: #fff;
|
||||
}
|
||||
.tempo-nav-trigger[data-current-group] {
|
||||
color: #fff;
|
||||
background: #ffffff08;
|
||||
box-shadow: inset 0 -2px #ed1c24;
|
||||
}
|
||||
.tempo-nav-trigger > svg {
|
||||
flex-shrink: 0;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
.tempo-nav-trigger[data-state='open'] > svg {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.tempo-header-extras {
|
||||
display: none;
|
||||
grid-area: 3 / 1 / auto / -1;
|
||||
min-width: 0;
|
||||
padding-block: 0.75rem;
|
||||
border-top: 1px solid #ffffff1a;
|
||||
}
|
||||
.tempo-header-utilities {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.tempo-utility-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
min-height: 44px;
|
||||
padding: 0.4rem;
|
||||
border-radius: 0.5rem;
|
||||
color: #e2e8f0;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
.tempo-utility-button:hover {
|
||||
background: #ffffff10;
|
||||
}
|
||||
.tempo-header-actions {
|
||||
grid-area: 1 / 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
min-width: 0;
|
||||
}
|
||||
.tempo-login-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
min-height: 44px;
|
||||
padding: 0.5rem 0.625rem;
|
||||
border: 1px solid #ffffff40;
|
||||
border-radius: 0.5rem;
|
||||
color: #fff;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
transition:
|
||||
background 0.2s,
|
||||
border-color 0.2s;
|
||||
}
|
||||
.tempo-login-button:hover {
|
||||
background: #ffffff10;
|
||||
border-color: #ffffff80;
|
||||
}
|
||||
.tempo-login-button > span {
|
||||
max-width: clamp(2rem, calc(100vw - 18rem), 6rem);
|
||||
}
|
||||
.tempo-panel-summary {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 0.5rem;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
.tempo-panel-summary:hover {
|
||||
background: #ffffff10;
|
||||
color: #fff;
|
||||
}
|
||||
.tempo-panel-count {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -0.125rem;
|
||||
min-width: 17px;
|
||||
padding-inline: 0.2rem;
|
||||
border: 2px solid #090909;
|
||||
border-radius: 999px;
|
||||
background: #ed1c24;
|
||||
color: #fff;
|
||||
font-size: 0.5625rem;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
}
|
||||
.tempo-interest-button {
|
||||
display: none;
|
||||
grid-area: 4 / 1 / auto / -1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
min-height: 44px;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.5rem 0.875rem;
|
||||
border: 1px solid #ed1c24;
|
||||
border-radius: 0.5rem;
|
||||
background: #ed1c24;
|
||||
color: #fff;
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.tempo-interest-button:hover {
|
||||
background: #c9151c;
|
||||
}
|
||||
.tempo-header-toggle {
|
||||
grid-area: 1 / 3;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border: 1px solid #ffffff33;
|
||||
border-radius: 0.5rem;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tempo-header-toggle:hover,
|
||||
.tempo-header-toggle[aria-expanded='true'] {
|
||||
background: #ffffff10;
|
||||
}
|
||||
.tempo-header[data-expanded] .tempo-primary-navigation {
|
||||
display: block;
|
||||
}
|
||||
.tempo-header[data-expanded] .tempo-header-extras {
|
||||
display: flex;
|
||||
}
|
||||
.tempo-header[data-expanded] .tempo-interest-button {
|
||||
display: inline-flex;
|
||||
}
|
||||
.tempo-header :is(a, button):focus-visible {
|
||||
outline: 2px solid #fff;
|
||||
outline-offset: 3px;
|
||||
}
|
||||
.tempo-submenu {
|
||||
max-width: min(
|
||||
calc(100vw - 1.5rem),
|
||||
var(--radix-dropdown-menu-content-available-width)
|
||||
);
|
||||
}
|
||||
@media (min-width: 640px) {
|
||||
.tempo-header-inner {
|
||||
grid-template-columns: minmax(0, 1fr) auto auto auto;
|
||||
column-gap: 0.75rem;
|
||||
padding-inline: 1.5rem;
|
||||
}
|
||||
.tempo-logo-link {
|
||||
width: 132px;
|
||||
}
|
||||
.tempo-interest-button {
|
||||
display: inline-flex;
|
||||
grid-area: 1 / 3;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.tempo-header-toggle {
|
||||
grid-area: 1 / 4;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
.tempo-header-inner {
|
||||
grid-template-columns: auto minmax(0, 1fr) auto auto auto;
|
||||
column-gap: 0.25rem;
|
||||
padding-inline: 1.25rem;
|
||||
}
|
||||
.tempo-logo-link {
|
||||
width: 100px;
|
||||
}
|
||||
.tempo-login-button > span {
|
||||
max-width: 3rem;
|
||||
}
|
||||
.tempo-primary-navigation,
|
||||
.tempo-header[data-expanded] .tempo-primary-navigation {
|
||||
display: block;
|
||||
grid-area: 1 / 2;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
justify-self: center;
|
||||
}
|
||||
.tempo-primary-navigation > ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
}
|
||||
.tempo-nav-trigger {
|
||||
justify-content: center;
|
||||
padding-inline: 0.25rem;
|
||||
font-size: 1.125rem;
|
||||
letter-spacing: 0.025em;
|
||||
}
|
||||
.tempo-header-extras,
|
||||
.tempo-header[data-expanded] .tempo-header-extras {
|
||||
display: flex;
|
||||
grid-area: 1 / 3;
|
||||
padding: 0 0.5rem 0 0;
|
||||
border: 0;
|
||||
border-right: 1px solid #ffffff1a;
|
||||
}
|
||||
.tempo-header-utilities {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.tempo-header-actions {
|
||||
grid-area: 1 / 4;
|
||||
}
|
||||
.tempo-interest-button {
|
||||
grid-area: 1 / 5;
|
||||
}
|
||||
.tempo-header-toggle {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1440px) {
|
||||
.tempo-header-inner {
|
||||
column-gap: 0.75rem;
|
||||
padding-inline: 2rem;
|
||||
}
|
||||
.tempo-nav-trigger {
|
||||
padding-inline: 0.375rem;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
.tempo-logo-link {
|
||||
width: 132px;
|
||||
}
|
||||
.tempo-login-button > span {
|
||||
max-width: 5rem;
|
||||
}
|
||||
.tempo-header-extras {
|
||||
padding-right: 0.75rem;
|
||||
}
|
||||
.tempo-primary-navigation > ul {
|
||||
gap: 0.125rem;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1536px) {
|
||||
.tempo-header-inner {
|
||||
column-gap: 1rem;
|
||||
}
|
||||
.tempo-nav-trigger {
|
||||
padding-inline: 0.75rem;
|
||||
}
|
||||
.tempo-login-button > span {
|
||||
max-width: 6rem;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Link, usePage } from '@inertiajs/react';
|
||||
import { searchTerritoryHref } from '@/lib/search-territory';
|
||||
export default function CatalogueNavigation({
|
||||
dimensionUrl,
|
||||
}: {
|
||||
@@ -21,7 +22,7 @@ export default function CatalogueNavigation({
|
||||
)
|
||||
return dimensionUrl(u.searchParams.get('dimension')!);
|
||||
if (context) u.searchParams.set('context', context);
|
||||
return u.pathname + u.search;
|
||||
return searchTerritoryHref(u.pathname + u.search, url);
|
||||
};
|
||||
const sections = {
|
||||
'Enquadramento e filtros': [
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { InvestmentContextAssessment } from './investment-context-assessment';
|
||||
import { Link } from '@inertiajs/react';
|
||||
import {
|
||||
contextApi,
|
||||
contextFieldNames,
|
||||
type ContextView,
|
||||
} from '@/lib/investor-context';
|
||||
import { inheritCompatibleFields } from '@/lib/context-inheritance';
|
||||
type Props = {
|
||||
contextId?: string | null;
|
||||
consumer: 'simulator' | 'land' | 'desk' | 'submission';
|
||||
@@ -12,6 +14,7 @@ type Props = {
|
||||
enabled?: boolean;
|
||||
readOnly?: boolean;
|
||||
allowedFields?: string[];
|
||||
persistInheritance?: boolean;
|
||||
boundRevision?: number;
|
||||
onApply: (patch: Record<string, unknown>, replace: boolean) => void;
|
||||
onReview?: (revision: number, reviewed: boolean) => void;
|
||||
@@ -40,17 +43,16 @@ export function DossierPrefill(props: Props) {
|
||||
const [selected, setSelected] = useState<string[]>([]);
|
||||
const [reviewed, setReviewed] = useState(false);
|
||||
const [message, setMessage] = useState('');
|
||||
const filled = useRef('');
|
||||
useEffect(() => {
|
||||
if (!contextId) return;
|
||||
let stopped = false;
|
||||
setView(null);
|
||||
setError('');
|
||||
void contextApi<ContextView>(`/investimentos/${contextId}/contexto`)
|
||||
.then((v) => {
|
||||
if (!stopped) {
|
||||
setView(v);
|
||||
setReviewed(false);
|
||||
latest.current.onReview?.(v.context.revision, false);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -61,44 +63,20 @@ export function DossierPrefill(props: Props) {
|
||||
};
|
||||
}, [contextId, retry]);
|
||||
useEffect(() => {
|
||||
if (!view || !enabled || readOnly || !view.can_write) return;
|
||||
const generation = `${contextId}:${view.context.revision}:${consumer}`;
|
||||
if (filled.current === generation) return;
|
||||
if (!view || view.case.id !== contextId || !enabled || readOnly || !view.can_write) return;
|
||||
const source = view.prefill[consumer] ?? {};
|
||||
const now = latest.current;
|
||||
const patch: Record<string, unknown> = {};
|
||||
const conflict = geo.some(
|
||||
(k) =>
|
||||
!empty(now.values[k]) &&
|
||||
String(now.values[k]) !== text(source[k]),
|
||||
);
|
||||
for (const [k, v] of Object.entries(source)) {
|
||||
if (
|
||||
(now.allowedFields && !now.allowedFields.includes(k)) ||
|
||||
(geo.includes(k) && conflict)
|
||||
)
|
||||
continue;
|
||||
if (k === 'parcels') {
|
||||
const old = now.values.parcels as
|
||||
| Record<string, unknown>[]
|
||||
| undefined;
|
||||
if (
|
||||
(!old?.length || geo.every((g) => empty(old[0]?.[g]))) &&
|
||||
Array.isArray(v) &&
|
||||
v[0] &&
|
||||
Object.keys(v[0]).length
|
||||
)
|
||||
patch[k] = v;
|
||||
} else if (empty(now.values[k]) && !empty(v)) patch[k] = v;
|
||||
}
|
||||
filled.current = generation;
|
||||
if (Object.keys(patch).length) {
|
||||
now.onApply(patch, false);
|
||||
const inherited = inheritCompatibleFields(`dossier:${contextId}:${consumer}`, now.values, source, now.values.context_reuse, now.allowedFields);
|
||||
if (Object.keys(inherited.patch).length || (now.persistInheritance !== false && now.values.context_reuse !== inherited.metadata)) {
|
||||
// The shared reconciliation has already selected safe fields; metadata travels with the same saved form.
|
||||
now.onApply({...inherited.patch, ...(now.persistInheritance === false ? {} : {context_reuse:inherited.metadata})}, true);
|
||||
setMessage(
|
||||
'Campos vazios preenchidos a partir do dossier. Reveja-os; os campos já preenchidos foram preservados.',
|
||||
'Dados compatíveis reutilizados do mesmo dossier. Os valores herdados acompanham o contexto; as suas alterações locais foram preservadas.',
|
||||
);
|
||||
}
|
||||
}, [view, enabled, readOnly, contextId, consumer]);
|
||||
setReviewed(true);
|
||||
now.onReview?.(view.context.revision, true);
|
||||
}, [view, enabled, readOnly, contextId, consumer, props.values]);
|
||||
if (!contextId) return null;
|
||||
if (error)
|
||||
return (
|
||||
@@ -126,7 +104,7 @@ export function DossierPrefill(props: Props) {
|
||||
),
|
||||
);
|
||||
const differences = Object.keys(source).filter(
|
||||
(k) => text(props.values[k]) !== text(source[k]),
|
||||
(k) => k !== 'context_applicability_snapshot' && text(props.values[k]) !== text(source[k]),
|
||||
);
|
||||
const linkedRevision =
|
||||
consumer === 'simulator'
|
||||
@@ -152,6 +130,7 @@ export function DossierPrefill(props: Props) {
|
||||
. Mestres, declarações deste formulário e conteúdo já submetido
|
||||
mantêm-se separados.
|
||||
</p>
|
||||
<InvestmentContextAssessment contextId={contextId} raw={view.prefill.simulator?.context_applicability_snapshot} />
|
||||
{stale && (
|
||||
<p className="font-semibold" role="status">
|
||||
{linkedRevision > 0
|
||||
@@ -254,7 +233,17 @@ export function DossierPrefill(props: Props) {
|
||||
const patch: Record<string, unknown> = {};
|
||||
for (const k of selected)
|
||||
patch[k] = source[k] ?? '';
|
||||
props.onApply(patch, true);
|
||||
const scope = `dossier:${contextId}:${consumer}`;
|
||||
let raw = String(props.values.context_reuse ?? '');
|
||||
try {
|
||||
const metadata = JSON.parse(raw);
|
||||
if(metadata.scope === scope) {
|
||||
for(const key of selected) delete metadata.inherited?.[key];
|
||||
raw=JSON.stringify(metadata);
|
||||
}
|
||||
} catch { /* Legacy metadata does not grant ownership of other fields. */ }
|
||||
const adopted=inheritCompatibleFields(scope,{...props.values,...Object.fromEntries(selected.map(key=>[key,undefined]))},patch,raw,props.allowedFields);
|
||||
props.onApply({...patch,...(props.persistInheritance === false ? {} : {context_reuse:adopted.metadata})}, true);
|
||||
setSelected([]);
|
||||
setReviewed(false);
|
||||
props.onReview?.(view.context.revision, false);
|
||||
@@ -267,27 +256,7 @@ export function DossierPrefill(props: Props) {
|
||||
</button>
|
||||
</details>
|
||||
)}
|
||||
{!readOnly &&
|
||||
view.can_write &&
|
||||
props.onReview &&
|
||||
view.context.revision > 0 && (
|
||||
<label className="block">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={reviewed}
|
||||
onChange={(e) => {
|
||||
setReviewed(e.target.checked);
|
||||
props.onReview?.(
|
||||
view.context.revision,
|
||||
e.target.checked,
|
||||
);
|
||||
}}
|
||||
/>{' '}
|
||||
Conferi os dados e pressupostos deste formulário para o
|
||||
contexto v{view.context.revision}; os valores diferentes
|
||||
que conservei são declarações deste processo.
|
||||
</label>
|
||||
)}
|
||||
{!readOnly && reviewed && <p>Contexto v{view.context.revision} recuperado neste formulário, sem nova confirmação dos dados compatíveis. As edições locais conservam-se; as declarações e submissões formais mantêm os seus controlos próprios.</p>}
|
||||
<p className="text-xs">
|
||||
Associar uma referência não confirma incentivos, licenças, terra
|
||||
disponível, reserva ou autorização.
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
import {
|
||||
PreparationSummary,
|
||||
type Preparation,
|
||||
} from '@/components/private-investment-preparation';
|
||||
import { Link } from '@inertiajs/react';
|
||||
|
||||
type Snapshot = {
|
||||
preparation?: Preparation | null;
|
||||
context_revision: number;
|
||||
path?: {
|
||||
definition_version: number;
|
||||
steps: Array<{
|
||||
code: string;
|
||||
title: string;
|
||||
applicability: string;
|
||||
reason: string;
|
||||
state: string;
|
||||
context_review_required?: boolean;
|
||||
}>;
|
||||
};
|
||||
zone?: {
|
||||
title: string;
|
||||
href: string;
|
||||
version: number | string;
|
||||
fields?: Record<string, string>;
|
||||
analysis?: {
|
||||
conditions?: Array<{
|
||||
id: string;
|
||||
label: string;
|
||||
knowledge: string;
|
||||
source_reference?: string;
|
||||
valid_from?: string;
|
||||
valid_until?: string;
|
||||
}>;
|
||||
source?: {
|
||||
title: string;
|
||||
url: string;
|
||||
diploma?: string;
|
||||
article?: string;
|
||||
valid_from?: string;
|
||||
valid_until?: string;
|
||||
} | null;
|
||||
};
|
||||
} | null;
|
||||
fields?: Record<string, string>;
|
||||
};
|
||||
export function InvestmentContextAssessment({
|
||||
raw,
|
||||
contextId,
|
||||
}: {
|
||||
raw: unknown;
|
||||
contextId?: string | null;
|
||||
}) {
|
||||
let snapshot: Snapshot | null = null;
|
||||
try {
|
||||
const value = JSON.parse(String(raw ?? ''));
|
||||
if (value.version === 1) snapshot = value;
|
||||
} catch {
|
||||
/* Missing context remains explicit. */
|
||||
}
|
||||
if (!snapshot) return null;
|
||||
const fields = snapshot.fields ?? {};
|
||||
const zone = snapshot.zone;
|
||||
const regime = zone?.fields?.investment_regime ?? fields.investment_regime;
|
||||
const names: Record<string, string> = {
|
||||
zee: 'ZEE',
|
||||
zfi: 'ZFI',
|
||||
industrial_park: 'Parque industrial',
|
||||
};
|
||||
return (
|
||||
<section
|
||||
className="space-y-2 rounded border border-amber-400 p-3"
|
||||
aria-label="Aplicabilidade ao investimento"
|
||||
>
|
||||
<h3 className="font-semibold">
|
||||
Aplicabilidade ao investimento · contexto v
|
||||
{snapshot.context_revision}
|
||||
</h3>
|
||||
<p>
|
||||
Origem do investidor:{' '}
|
||||
{{
|
||||
national: 'nacional',
|
||||
foreign: 'estrangeiro',
|
||||
mixed: 'misto',
|
||||
}[fields.investor_origin] ?? 'informação em falta'}
|
||||
. Residência fiscal declarada:{' '}
|
||||
{fields.tax_residency_country || 'informação em falta'}. Estas
|
||||
condições são distintas; uma não determina a outra.
|
||||
</p>
|
||||
{zone ? (
|
||||
<>
|
||||
<p>
|
||||
<strong>
|
||||
Potencialmente aplicável — análise específica de{' '}
|
||||
{names[regime ?? ''] ?? 'zona seleccionada'}.
|
||||
</strong>{' '}
|
||||
<Link className="underline" href={zone.href}>
|
||||
{zone.title} · versão {zone.version} · consultar
|
||||
ficha e fundamentos
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
<p>
|
||||
A selecção identifica a referência consultada; não
|
||||
confirma o reconhecimento da entidade, actividade
|
||||
autorizada, licença ou acesso a benefícios. Consulte as
|
||||
condições documentadas na ficha e reúna a autorização ou
|
||||
evidência correspondente no dossier.
|
||||
</p>
|
||||
{zone.analysis?.source && (
|
||||
<p>
|
||||
Fundamento cadastrado:{' '}
|
||||
<a
|
||||
className="underline"
|
||||
href={zone.analysis.source.url}
|
||||
>
|
||||
{zone.analysis.source.diploma ||
|
||||
zone.analysis.source.title}{' '}
|
||||
{zone.analysis.source.article}
|
||||
</a>
|
||||
. Período cadastrado:{' '}
|
||||
{zone.analysis.source.valid_from ||
|
||||
'início por indicar'}{' '}
|
||||
a{' '}
|
||||
{zone.analysis.source.valid_until ||
|
||||
'sem termo indicado'}
|
||||
. A cobertura do investimento exige correspondência
|
||||
com estas condições.
|
||||
</p>
|
||||
)}
|
||||
{zone.analysis?.conditions?.length ? (
|
||||
<ul className="list-disc pl-5">
|
||||
{zone.analysis.conditions.map((condition) => (
|
||||
<li key={condition.id}>
|
||||
<strong>{condition.label}</strong>:{' '}
|
||||
{condition.knowledge === 'documented'
|
||||
? 'condição documentada; cumprimento pelo investimento por confirmar'
|
||||
: condition.knowledge === 'disputed'
|
||||
? 'condição com informação divergente'
|
||||
: 'informação em falta'}
|
||||
.{' '}
|
||||
{condition.source_reference && (
|
||||
<>
|
||||
Fundamento:{' '}
|
||||
{condition.source_reference}.
|
||||
</>
|
||||
)}{' '}
|
||||
{condition.valid_from && (
|
||||
<>Desde {condition.valid_from}.</>
|
||||
)}{' '}
|
||||
{condition.valid_until && (
|
||||
<>Até {condition.valid_until}.</>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<p>
|
||||
Condições específicas: informação estruturada em
|
||||
falta nesta referência. A ficha e os documentos
|
||||
continuam consultáveis; não se presume cumprimento.
|
||||
</p>
|
||||
)}
|
||||
<p role="status">
|
||||
Benefício fiscal deste enquadramento: indeterminado. Não
|
||||
existe neste consumidor uma regra executável ligada ao
|
||||
reconhecimento e condições da zona. No simulador, o IVA
|
||||
disponível corresponde apenas ao cenário geral sem
|
||||
benefício, sobre vendas declaradas compatíveis; não
|
||||
simula o regime especial. O cenário com benefício e o
|
||||
apuramento final estão indisponíveis.
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
<p>
|
||||
Enquadramento geral de preparação: sem ZEE, ZFI ou parque
|
||||
seleccionado. Isso não confirma a elegibilidade para uma
|
||||
operação fiscal. O cálculo mantém o âmbito e as exclusões da
|
||||
versão publicada.
|
||||
</p>
|
||||
)}
|
||||
<p>
|
||||
Confirmado neste quadro significa apenas dado recuperado do
|
||||
dossier; declarações e referências não são decisões jurídicas.
|
||||
Requisitos específicos não documentados permanecem
|
||||
indeterminados.
|
||||
</p>
|
||||
{snapshot.path && (
|
||||
<details>
|
||||
<summary>
|
||||
Passos adaptados pelo percurso existente · versão{' '}
|
||||
{snapshot.path.definition_version}
|
||||
</summary>
|
||||
<ul className="list-disc pl-5">
|
||||
{snapshot.path.steps.map((step) => (
|
||||
<li key={step.code}>
|
||||
{step.code} — {step.title}:{' '}
|
||||
{step.context_review_required
|
||||
? 'informação alterada; rever fundamento'
|
||||
: step.applicability ===
|
||||
'not_needed_for_preparation'
|
||||
? 'não aplicável à preparação declarada'
|
||||
: step.applicability === 'undetermined'
|
||||
? 'informação em falta'
|
||||
: ['completed', 'approved'].includes(
|
||||
step.state,
|
||||
)
|
||||
? 'preparação confirmada no percurso; não é decisão fiscal'
|
||||
: 'potencialmente aplicável'}
|
||||
. {step.reason}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</details>
|
||||
)}
|
||||
{snapshot.preparation?.enabled && (
|
||||
<PreparationSummary
|
||||
data={snapshot.preparation}
|
||||
caseId={contextId ?? undefined}
|
||||
/>
|
||||
)}
|
||||
{contextId && (
|
||||
<Link
|
||||
className="underline"
|
||||
href={`/investimentos/${contextId}/contexto/editar`}
|
||||
>
|
||||
Alterar contexto e comparar impacto antes de guardar
|
||||
</Link>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -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',
|
||||
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({
|
||||
data,
|
||||
references,
|
||||
@@ -75,6 +85,9 @@ export default function OpportunitySearchFilters({
|
||||
<Field key={key} label={labels[key]}>
|
||||
<select
|
||||
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] ?? '')}
|
||||
onChange={(e) =>
|
||||
change({
|
||||
@@ -86,12 +99,23 @@ export default function OpportunitySearchFilters({
|
||||
}
|
||||
>
|
||||
<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) => (
|
||||
<option key={o.value} value={o.value}>
|
||||
{o.label}
|
||||
</option>
|
||||
))}
|
||||
</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>}
|
||||
</Field>
|
||||
);
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
import PortalProductIdentity from '@/components/portal-product-identity';
|
||||
import { searchTerritoryHref } from '@/lib/search-territory';
|
||||
import { Link, router, usePage } from '@inertiajs/react';
|
||||
import {
|
||||
ChevronDown,
|
||||
ArrowUpRight,
|
||||
LayoutDashboard,
|
||||
LogOut,
|
||||
Menu,
|
||||
UserRound,
|
||||
X,
|
||||
} from 'lucide-react';
|
||||
import { useEffect, useId, useRef, useState } from 'react';
|
||||
import { Fragment, useEffect, useId, useRef, useState } from 'react';
|
||||
import { useIsMobile } from '@/hooks/use-mobile';
|
||||
import { useNavigationContext } from '@/components/navigation-context';
|
||||
import { TempoSocialLinks, useTempoUi } from '@/components/tempo-brand';
|
||||
import { tempoSocialLinks, useTempoUi } from '@/components/tempo-brand';
|
||||
import {
|
||||
TempoLanguageSelector,
|
||||
TempoWeather,
|
||||
@@ -52,6 +55,7 @@ export function PortalGroupedMenu() {
|
||||
scopedAdministration?: {label:string;href:string}[];
|
||||
}>();
|
||||
const { t, language, requestCount } = useTempoUi();
|
||||
const mobile = useIsMobile();
|
||||
const navigation = useNavigationContext();
|
||||
const groups = portalNavigation({
|
||||
context: navigation.view
|
||||
@@ -72,24 +76,34 @@ export function PortalGroupedMenu() {
|
||||
const currentItem = currentNavigationItem(groups, url);
|
||||
const [loggingOut, setLoggingOut] = useState(false);
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const institutionalId = useId();
|
||||
const navigationId = useId();
|
||||
const toolsId = useId();
|
||||
const interestId = useId();
|
||||
const toggle = useRef<HTMLButtonElement>(null);
|
||||
useEffect(() => router.on('navigate', () => setExpanded(false)), []);
|
||||
const items = (children: PortalNavItem[]) =>
|
||||
children.map((item) =>
|
||||
item.children ? (
|
||||
<DropdownMenuSub key={item.id}>
|
||||
<DropdownMenuSubTrigger className="tempo-menu-item font-semibold">
|
||||
{t(item.label)}
|
||||
</DropdownMenuSubTrigger>
|
||||
<DropdownMenuSubContent
|
||||
collisionPadding={12}
|
||||
className="tempo-dropdown max-h-[min(70vh,34rem)] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||
>
|
||||
mobile ? (
|
||||
<Fragment key={item.id}>
|
||||
<DropdownMenuLabel className="mt-2 border-t px-3 pt-3 text-xs text-slate-500">
|
||||
{t(item.label)}
|
||||
</DropdownMenuLabel>
|
||||
{items(item.children)}
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
</Fragment>
|
||||
) : (
|
||||
<DropdownMenuSub key={item.id}>
|
||||
<DropdownMenuSubTrigger className="tempo-menu-item font-semibold">
|
||||
{t(item.label)}
|
||||
</DropdownMenuSubTrigger>
|
||||
<DropdownMenuSubContent
|
||||
collisionPadding={12}
|
||||
className="tempo-dropdown tempo-submenu max-h-[min(70vh,34rem)] w-72 overflow-y-auto p-2"
|
||||
>
|
||||
{items(item.children)}
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
)
|
||||
) : (
|
||||
<DropdownMenuItem
|
||||
key={item.id}
|
||||
@@ -97,7 +111,7 @@ export function PortalGroupedMenu() {
|
||||
className="tempo-menu-item"
|
||||
>
|
||||
<Link
|
||||
href={item.href!}
|
||||
href={searchTerritoryHref(item.href!, url)}
|
||||
aria-current={
|
||||
currentItem === item.id ? 'page' : undefined
|
||||
}
|
||||
@@ -111,6 +125,8 @@ export function PortalGroupedMenu() {
|
||||
(group) =>
|
||||
!['home', 'discovery', 'realization', 'support'].includes(group.id),
|
||||
);
|
||||
const panelLabel = `${t('O meu painel')} — ${requestCount} ${t(requestCount === 1 ? 'pedido recebido' : 'pedidos recebidos')}`;
|
||||
const institutionalCurrent = url.split('?')[0] === '/contacto';
|
||||
return (
|
||||
<header
|
||||
className="tempo-header"
|
||||
@@ -120,245 +136,303 @@ export function PortalGroupedMenu() {
|
||||
if (
|
||||
event.key === 'Escape' &&
|
||||
expanded &&
|
||||
!event.defaultPrevented
|
||||
!event.defaultPrevented &&
|
||||
!(
|
||||
event.target instanceof Element &&
|
||||
event.target.closest('[role="menu"]')
|
||||
)
|
||||
) {
|
||||
setExpanded(false);
|
||||
toggle.current?.focus();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="tempo-header-layout">
|
||||
<div className="tempo-header-inner">
|
||||
<Link
|
||||
href="/"
|
||||
aria-label="InvesteMoz — início"
|
||||
className="tempo-logo-link"
|
||||
>
|
||||
<PortalProductIdentity />
|
||||
</Link>
|
||||
<nav
|
||||
id={institutionalId}
|
||||
aria-label="Navegação institucional"
|
||||
className="tempo-primary-navigation"
|
||||
>
|
||||
<ul>
|
||||
<li>
|
||||
<Link
|
||||
href="/"
|
||||
className="tempo-nav-trigger"
|
||||
aria-current={
|
||||
url.split('?')[0] === '/'
|
||||
? 'page'
|
||||
: undefined
|
||||
}
|
||||
data-current-group={
|
||||
url.split('?')[0] === '/' || undefined
|
||||
}
|
||||
>
|
||||
{t('Início')}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://revista.tempo.co.mz/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="tempo-nav-trigger"
|
||||
aria-label={`${t('Revista Tempo')} — ${t('Abre num novo separador')}`}
|
||||
>
|
||||
{t('Revista Tempo')}
|
||||
<ArrowUpRight
|
||||
size={14}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
{[
|
||||
['/sobre', 'Sobre nós'],
|
||||
['/contacto', 'Contacto'],
|
||||
].map(([href, label]) => (
|
||||
<li key={href}>
|
||||
<Link
|
||||
href={href}
|
||||
className="tempo-nav-trigger"
|
||||
aria-current={
|
||||
url.split('?')[0] === href
|
||||
? 'page'
|
||||
: undefined
|
||||
}
|
||||
data-current-group={
|
||||
url.split('?')[0] === href ||
|
||||
undefined
|
||||
}
|
||||
>
|
||||
{t(label)}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
<div id={toolsId} className="tempo-header-extras">
|
||||
<div className="tempo-header-utilities">
|
||||
<div className="flex items-center gap-1">
|
||||
<TempoWeather />
|
||||
<TempoLanguageSelector />
|
||||
</div>
|
||||
<TempoSocialLinks />
|
||||
</div>
|
||||
</div>
|
||||
<div className="tempo-header-actions">
|
||||
{props.auth?.user ? (
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger className="tempo-login-button">
|
||||
<UserRound size={16} aria-hidden="true" />
|
||||
<span className="max-w-24 truncate">
|
||||
{props.auth.user.name ||
|
||||
t('A minha área')}
|
||||
</span>
|
||||
<ChevronDown size={12} aria-hidden="true" />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent
|
||||
align="end"
|
||||
sideOffset={12}
|
||||
collisionPadding={12}
|
||||
className="tempo-dropdown max-h-[75vh] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||
>
|
||||
<DropdownMenuLabel className="truncate text-xs text-slate-500">
|
||||
{props.auth.user.email}
|
||||
</DropdownMenuLabel>
|
||||
{items(accountGroups)}
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
asChild
|
||||
className="tempo-menu-item text-red-700"
|
||||
>
|
||||
<Link
|
||||
href={logout()}
|
||||
as="button"
|
||||
type="button"
|
||||
disabled={loggingOut}
|
||||
data-test="portal-logout-button"
|
||||
onClick={() => router.flushAll()}
|
||||
onStart={() => setLoggingOut(true)}
|
||||
onFinish={() =>
|
||||
setLoggingOut(false)
|
||||
<div className="tempo-header-inner">
|
||||
<Link
|
||||
href="/"
|
||||
aria-label="Tempo — início"
|
||||
className="tempo-logo-link"
|
||||
>
|
||||
<img
|
||||
src="/images/logo/logo-vermelho.png"
|
||||
alt="Tempo"
|
||||
width="1787"
|
||||
height="564"
|
||||
className="tempo-header-logo"
|
||||
/>
|
||||
</Link>
|
||||
<nav
|
||||
id={navigationId}
|
||||
aria-label="Áreas do portal"
|
||||
className="tempo-primary-navigation"
|
||||
>
|
||||
<ul>
|
||||
<li>
|
||||
<Link
|
||||
href="/"
|
||||
className="tempo-nav-trigger"
|
||||
aria-current={
|
||||
url.split('?')[0] === '/'
|
||||
? 'page'
|
||||
: undefined
|
||||
}
|
||||
data-current-group={
|
||||
url.split('?')[0] === '/' || undefined
|
||||
}
|
||||
>
|
||||
{t('Início')}
|
||||
</Link>
|
||||
</li>
|
||||
{groups
|
||||
.filter((group) =>
|
||||
[
|
||||
'discovery',
|
||||
'realization',
|
||||
'support',
|
||||
].includes(group.id),
|
||||
)
|
||||
.map((group) => (
|
||||
<li key={group.id}>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger
|
||||
className="tempo-nav-trigger"
|
||||
data-current-group={
|
||||
current === group.id ||
|
||||
undefined
|
||||
}
|
||||
>
|
||||
<LogOut
|
||||
size={16}
|
||||
{t(group.label)}
|
||||
<ChevronDown
|
||||
size={14}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{loggingOut
|
||||
? 'A terminar sessão…'
|
||||
: t('Terminar sessão')}
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
) : (
|
||||
<Link href="/login" className="tempo-login-button">
|
||||
<UserRound size={15} aria-hidden="true" />
|
||||
{t('Entrar')}
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
<button
|
||||
ref={toggle}
|
||||
type="button"
|
||||
className="tempo-header-toggle"
|
||||
aria-label={
|
||||
expanded
|
||||
? 'Fechar menu e ferramentas'
|
||||
: 'Abrir menu e ferramentas'
|
||||
}
|
||||
aria-expanded={expanded}
|
||||
aria-controls={`${institutionalId} ${toolsId}`}
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
>
|
||||
{expanded ? (
|
||||
<X size={22} aria-hidden="true" />
|
||||
) : (
|
||||
<Menu size={22} aria-hidden="true" />
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
<div className="tempo-section-bar">
|
||||
<div className="tempo-section-inner">
|
||||
<Link
|
||||
href="/investidor/manifestacoes"
|
||||
className="tempo-panel-summary"
|
||||
>
|
||||
<span>{t('O meu painel')}</span>
|
||||
<span
|
||||
className="tempo-panel-count"
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
{current === group.id && (
|
||||
<span className="sr-only">
|
||||
Grupo actual
|
||||
</span>
|
||||
)}
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent
|
||||
align="start"
|
||||
sideOffset={12}
|
||||
collisionPadding={12}
|
||||
className="tempo-dropdown max-h-[min(75vh,36rem)] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||
>
|
||||
{items(group.children ?? [])}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</li>
|
||||
))}
|
||||
<li>
|
||||
<Link
|
||||
href="/sobre"
|
||||
className="tempo-nav-trigger"
|
||||
aria-current={
|
||||
url.split('?')[0] === '/sobre'
|
||||
? 'page'
|
||||
: undefined
|
||||
}
|
||||
data-current-group={
|
||||
url.split('?')[0] === '/sobre' || undefined
|
||||
}
|
||||
>
|
||||
{requestCount}{' '}
|
||||
{t(
|
||||
requestCount === 1
|
||||
? 'pedido recebido'
|
||||
: 'pedidos recebidos',
|
||||
)}
|
||||
</span>
|
||||
</Link>
|
||||
<nav
|
||||
aria-label="Áreas do portal"
|
||||
className="tempo-section-navigation"
|
||||
>
|
||||
<ul>
|
||||
{groups
|
||||
.filter((group) =>
|
||||
[
|
||||
'discovery',
|
||||
'realization',
|
||||
'support',
|
||||
].includes(group.id),
|
||||
)
|
||||
.map((group) => (
|
||||
<li key={group.id}>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger
|
||||
className="tempo-nav-trigger"
|
||||
data-current-group={
|
||||
current === group.id ||
|
||||
undefined
|
||||
{t('Sobre nós')}
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger
|
||||
className="tempo-nav-trigger"
|
||||
data-current-group={
|
||||
institutionalCurrent || undefined
|
||||
}
|
||||
>
|
||||
Tempo
|
||||
<ChevronDown size={14} aria-hidden="true" />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent
|
||||
align="start"
|
||||
sideOffset={12}
|
||||
collisionPadding={12}
|
||||
className="tempo-dropdown max-h-[75vh] w-64 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||
>
|
||||
<DropdownMenuItem
|
||||
asChild
|
||||
className="tempo-menu-item"
|
||||
>
|
||||
<a
|
||||
href="https://revista.tempo.co.mz/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label={`${t('Revista Tempo')} — ${t('Abre num novo separador')}`}
|
||||
>
|
||||
{t('Revista Tempo')}
|
||||
<ArrowUpRight
|
||||
size={14}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</a>
|
||||
</DropdownMenuItem>
|
||||
{[['/contacto', 'Contacto']].map(
|
||||
([href, label]) => (
|
||||
<DropdownMenuItem
|
||||
key={href}
|
||||
asChild
|
||||
className="tempo-menu-item"
|
||||
>
|
||||
<Link
|
||||
href={href}
|
||||
aria-current={
|
||||
url.split('?')[0] ===
|
||||
href
|
||||
? 'page'
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{t(group.label)}
|
||||
<ChevronDown
|
||||
size={14}
|
||||
{t(label)}
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
),
|
||||
)}
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuLabel className="text-xs text-slate-500">
|
||||
Revista Tempo
|
||||
</DropdownMenuLabel>
|
||||
{tempoSocialLinks.map(
|
||||
({ name, href, icon: Icon }) => (
|
||||
<DropdownMenuItem
|
||||
key={name}
|
||||
asChild
|
||||
className="tempo-menu-item"
|
||||
>
|
||||
<a
|
||||
href={href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
aria-label={`Revista Tempo — ${name}`}
|
||||
>
|
||||
<Icon
|
||||
size={16}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{current === group.id && (
|
||||
<span className="sr-only">
|
||||
Grupo actual
|
||||
</span>
|
||||
)}
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent
|
||||
align="start"
|
||||
sideOffset={8}
|
||||
collisionPadding={12}
|
||||
className="tempo-dropdown max-h-[min(75vh,36rem)] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||
>
|
||||
{items(
|
||||
group.children ?? [],
|
||||
)}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
<Link
|
||||
href="/manifestar-interesse"
|
||||
className="tempo-interest-button"
|
||||
>
|
||||
{t('Manifestar interesse')}
|
||||
</Link>
|
||||
{name}
|
||||
<ArrowUpRight
|
||||
size={12}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</a>
|
||||
</DropdownMenuItem>
|
||||
),
|
||||
)}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id={toolsId} className="tempo-header-extras">
|
||||
<div className="tempo-header-utilities">
|
||||
<div className="flex items-center gap-1">
|
||||
<TempoWeather />
|
||||
<TempoLanguageSelector />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="tempo-header-actions">
|
||||
<Link
|
||||
href="/investidor/manifestacoes"
|
||||
className="tempo-panel-summary"
|
||||
aria-label={panelLabel}
|
||||
title={panelLabel}
|
||||
>
|
||||
<LayoutDashboard size={19} aria-hidden="true" />
|
||||
<span className="tempo-panel-count" aria-hidden="true">
|
||||
{requestCount}
|
||||
</span>
|
||||
</Link>
|
||||
<span
|
||||
className="sr-only"
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
aria-atomic="true"
|
||||
>
|
||||
{panelLabel}
|
||||
</span>
|
||||
{props.auth?.user ? (
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger className="tempo-login-button">
|
||||
<UserRound size={16} aria-hidden="true" />
|
||||
<span className="max-w-24 truncate">
|
||||
{props.auth.user.name || t('A minha área')}
|
||||
</span>
|
||||
<ChevronDown size={12} aria-hidden="true" />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent
|
||||
align="end"
|
||||
sideOffset={12}
|
||||
collisionPadding={12}
|
||||
className="tempo-dropdown max-h-[75vh] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||
>
|
||||
<DropdownMenuLabel className="truncate text-xs text-slate-500">
|
||||
{props.auth.user.email}
|
||||
</DropdownMenuLabel>
|
||||
{items(accountGroups)}
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
asChild
|
||||
className="tempo-menu-item text-red-700"
|
||||
>
|
||||
<Link
|
||||
href={logout()}
|
||||
as="button"
|
||||
type="button"
|
||||
disabled={loggingOut}
|
||||
data-test="portal-logout-button"
|
||||
onClick={() => router.flushAll()}
|
||||
onStart={() => setLoggingOut(true)}
|
||||
onFinish={() => setLoggingOut(false)}
|
||||
>
|
||||
<LogOut size={16} aria-hidden="true" />
|
||||
{loggingOut
|
||||
? 'A terminar sessão…'
|
||||
: t('Terminar sessão')}
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
) : (
|
||||
<Link href="/login" className="tempo-login-button">
|
||||
<UserRound size={15} aria-hidden="true" />
|
||||
{t('Entrar')}
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
<Link
|
||||
id={interestId}
|
||||
href="/manifestar-interesse"
|
||||
className="tempo-interest-button"
|
||||
>
|
||||
{t('Manifestar interesse')}
|
||||
<ArrowUpRight size={15} aria-hidden="true" />
|
||||
</Link>
|
||||
<button
|
||||
ref={toggle}
|
||||
type="button"
|
||||
className="tempo-header-toggle"
|
||||
aria-label={
|
||||
expanded
|
||||
? 'Fechar menu e ferramentas'
|
||||
: 'Abrir menu e ferramentas'
|
||||
}
|
||||
aria-expanded={expanded}
|
||||
aria-controls={`${navigationId} ${toolsId} ${interestId}`}
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
>
|
||||
{expanded ? (
|
||||
<X size={22} aria-hidden="true" />
|
||||
) : (
|
||||
<Menu size={22} aria-hidden="true" />
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
|
||||
@@ -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,457 @@
|
||||
import { Link } from '@inertiajs/react';
|
||||
import { card, input } from '@/pages/investment/shared';
|
||||
|
||||
export type PreparationDocument = {
|
||||
document_id: string;
|
||||
file_name: string;
|
||||
status: string;
|
||||
malware_scan_status: string;
|
||||
};
|
||||
export type Preparation = {
|
||||
version: string;
|
||||
enabled: boolean;
|
||||
mode: string;
|
||||
period_covered: boolean;
|
||||
scope_covered: boolean;
|
||||
reason: string[];
|
||||
missing_fields: string[];
|
||||
missing_labels?: string[];
|
||||
authority: string;
|
||||
next: string;
|
||||
calculation_notice: string;
|
||||
notice: string;
|
||||
source: { url: string; sha256: string };
|
||||
authority_source: { reference: string; url: string };
|
||||
questions: Array<{
|
||||
key: string;
|
||||
label: string;
|
||||
type?: string;
|
||||
options?: Record<string, string>;
|
||||
when?: { field: string; equals: string };
|
||||
source: string;
|
||||
help?: string;
|
||||
}>;
|
||||
requirements: Array<{
|
||||
key: string;
|
||||
label: string;
|
||||
state: string;
|
||||
required: boolean;
|
||||
document_id: string | null;
|
||||
document: PreparationDocument | null;
|
||||
stage: string;
|
||||
reason: string;
|
||||
source: { reference: string; url: string; period: string };
|
||||
}>;
|
||||
};
|
||||
const states: Record<string, string> = {
|
||||
not_applicable: 'Não aplicável neste contexto',
|
||||
indeterminate: 'Informação em falta para decidir',
|
||||
missing: 'Documento por associar',
|
||||
associated: 'Documento associado — conteúdo por conferir',
|
||||
};
|
||||
export const preparationMode = (mode: string) =>
|
||||
({
|
||||
authorization: 'Pedido de autorização',
|
||||
registration: 'Pedido de mero registo',
|
||||
indeterminate: 'Enquadramento por determinar',
|
||||
})[mode] ?? mode;
|
||||
|
||||
export function PreparationSummary({
|
||||
data,
|
||||
caseId,
|
||||
}: {
|
||||
data: Preparation | null | undefined;
|
||||
caseId?: string;
|
||||
}) {
|
||||
if (!data) return null;
|
||||
return (
|
||||
<section
|
||||
id="private-investment-preparation"
|
||||
className={card + ' space-y-3'}
|
||||
aria-label="Preparação adaptada do investimento privado"
|
||||
>
|
||||
<h2 className="text-xl font-bold">
|
||||
Preparar o pedido de investimento privado
|
||||
</h2>
|
||||
{!data.enabled ? (
|
||||
<p>
|
||||
Use os dados deste dossier para identificar o pedido e os
|
||||
documentos aplicáveis. A preparação é opcional e não atribui
|
||||
benefícios.
|
||||
</p>
|
||||
) : (
|
||||
<>
|
||||
<p>
|
||||
<strong>{preparationMode(data.mode)}</strong> · recorte
|
||||
de 2026 ·{' '}
|
||||
{data.version.replace(
|
||||
'private-investment-preparation-',
|
||||
'',
|
||||
)}
|
||||
</p>
|
||||
<p>{data.next}</p>
|
||||
{data.missing_fields.length > 0 && (
|
||||
<p>
|
||||
Informação em falta:{' '}
|
||||
{(
|
||||
data.missing_labels ??
|
||||
data.missing_fields.map(
|
||||
(key) =>
|
||||
data.questions?.find(
|
||||
(q) => q.key === key,
|
||||
)?.label ??
|
||||
(
|
||||
{
|
||||
currency: 'Moeda do projecto',
|
||||
expected_start_date:
|
||||
'Data prevista de início',
|
||||
entity_stage:
|
||||
'Situação da entidade',
|
||||
} as Record<string, string>
|
||||
)[key] ??
|
||||
key,
|
||||
)
|
||||
).join('; ')}
|
||||
.
|
||||
</p>
|
||||
)}
|
||||
{!data.period_covered && (
|
||||
<p>
|
||||
Este incremento cobre pedidos com início previsto em
|
||||
2026. Uma data em falta ou fora desse recorte não
|
||||
permite determinar o pedido por este lote; os
|
||||
restantes trabalhos do dossier continuam
|
||||
disponíveis.
|
||||
</p>
|
||||
)}
|
||||
{!data.scope_covered && (
|
||||
<p>
|
||||
Declare a actividade efectiva. Prospecção,
|
||||
pesquisa/produção extractiva e investimento público
|
||||
ou exclusivamente social/sem fins lucrativos seguem
|
||||
enquadramentos próprios, fora deste lote.
|
||||
</p>
|
||||
)}
|
||||
{data.reason.map((reason) => (
|
||||
<p key={reason}>{reason}</p>
|
||||
))}
|
||||
<p>
|
||||
Encaminhamento indicativo: {data.authority}.{' '}
|
||||
<a
|
||||
className="underline"
|
||||
href={data.authority_source.url}
|
||||
>
|
||||
{data.authority_source.reference}
|
||||
</a>
|
||||
</p>
|
||||
<ul className="space-y-3">
|
||||
{data.requirements
|
||||
.filter((r) => r.state !== 'not_applicable')
|
||||
.map((r) => (
|
||||
<li key={r.key} className="rounded border p-3">
|
||||
<strong>{r.label}</strong> —{' '}
|
||||
{states[r.state]}.{' '}
|
||||
{r.document?.file_name && (
|
||||
<span>
|
||||
Ficheiro: {r.document.file_name}
|
||||
.{' '}
|
||||
</span>
|
||||
)}
|
||||
<p>
|
||||
{r.reason}{' '}
|
||||
<a
|
||||
className="underline"
|
||||
href={r.source.url}
|
||||
>
|
||||
Ver fundamento: {r.source.reference}
|
||||
</a>{' '}
|
||||
· {r.source.period}.
|
||||
</p>
|
||||
{caseId && (
|
||||
<Link
|
||||
className="underline"
|
||||
href={`/investimentos/${caseId}/contexto/editar#preparation-documents`}
|
||||
>
|
||||
Rever dados ou associar documento do
|
||||
dossier
|
||||
</Link>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<details>
|
||||
<summary>
|
||||
Exigências que não se aplicam — histórico preservado
|
||||
</summary>
|
||||
{data.requirements
|
||||
.filter((r) => r.state === 'not_applicable')
|
||||
.map((r) => (
|
||||
<p key={r.key}>
|
||||
{r.label}: {r.reason}{' '}
|
||||
{r.document_id && (
|
||||
<>
|
||||
Associação anterior mantida
|
||||
{r.document?.file_name
|
||||
? `: ${r.document.file_name}`
|
||||
: ''}
|
||||
.
|
||||
</>
|
||||
)}{' '}
|
||||
<a
|
||||
className="underline"
|
||||
href={r.source.url}
|
||||
>
|
||||
{r.source.reference}
|
||||
</a>
|
||||
</p>
|
||||
))}
|
||||
</details>
|
||||
<p>{data.calculation_notice}</p>
|
||||
<p>{data.notice}</p>
|
||||
</>
|
||||
)}
|
||||
<a className="underline" href={data.source.url}>
|
||||
Consultar o exemplar oficial e os fundamentos
|
||||
</a>
|
||||
{caseId && (
|
||||
<p>
|
||||
<Link
|
||||
className="underline"
|
||||
href={`/investimentos/${caseId}/contexto/editar#preparation-questions`}
|
||||
>
|
||||
Completar apenas os dados em falta ou editar declarações
|
||||
</Link>
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export function PreparationEditor({
|
||||
data,
|
||||
fields,
|
||||
changes,
|
||||
documents,
|
||||
links,
|
||||
onChange,
|
||||
onLink,
|
||||
disabled,
|
||||
}: {
|
||||
data: Preparation;
|
||||
fields: Record<string, string>;
|
||||
changes: Record<string, string>;
|
||||
documents: PreparationDocument[];
|
||||
links: Record<string, string | null>;
|
||||
onChange: (key: string, value: string) => void;
|
||||
onLink: (key: string, value: string | null) => void;
|
||||
disabled: boolean;
|
||||
}) {
|
||||
const values = { ...fields, ...changes };
|
||||
const active = values.investment_preparation === 'yes';
|
||||
const excluded = ['extractive', 'public_nonprofit'].includes(
|
||||
values.investment_activity_scope,
|
||||
);
|
||||
const applicable = (q: Preparation['questions'][number]) =>
|
||||
!q.when || values[q.when.field] === q.when.equals;
|
||||
// Keep a field in place while the user edits it; collapse only recovered answers.
|
||||
const known = (q: Preparation['questions'][number]) =>
|
||||
!!fields[q.key] && fields[q.key] !== 'unknown';
|
||||
const render = (q: Preparation['questions'][number]) => (
|
||||
<label className="grid gap-1" key={q.key} htmlFor={'prep-' + q.key}>
|
||||
{q.label}
|
||||
{q.options ? (
|
||||
<select
|
||||
id={'prep-' + q.key}
|
||||
className={input}
|
||||
disabled={disabled}
|
||||
value={values[q.key] ?? ''}
|
||||
onChange={(e) => onChange(q.key, e.target.value)}
|
||||
>
|
||||
<option value="">Por indicar</option>
|
||||
{Object.entries(q.options).map(([value, text]) => (
|
||||
<option key={value} value={value}>
|
||||
{text}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
) : (
|
||||
<input
|
||||
id={'prep-' + q.key}
|
||||
className={input}
|
||||
disabled={disabled}
|
||||
type="text"
|
||||
inputMode="decimal"
|
||||
value={values[q.key] ?? ''}
|
||||
onChange={(e) => onChange(q.key, e.target.value)}
|
||||
/>
|
||||
)}
|
||||
<span className="text-sm">
|
||||
{q.help} Fundamento: {q.source}.
|
||||
</span>
|
||||
</label>
|
||||
);
|
||||
const questions = data.questions.filter(
|
||||
(q) =>
|
||||
q.key !== 'investment_preparation' &&
|
||||
applicable(q) &&
|
||||
(!excluded || q.key === 'investment_activity_scope'),
|
||||
);
|
||||
const needed = questions.filter(
|
||||
(q) =>
|
||||
!known(q) &&
|
||||
(!data.enabled ||
|
||||
data.mode !== 'authorization' ||
|
||||
data.missing_fields.includes(q.key)),
|
||||
);
|
||||
return (
|
||||
<section
|
||||
id="preparation-questions"
|
||||
className={card + ' space-y-4'}
|
||||
aria-label="Dados do pedido de investimento privado"
|
||||
>
|
||||
<h2 className="text-xl font-bold">
|
||||
Dados em falta para preparar o pedido
|
||||
</h2>
|
||||
<p>
|
||||
Valores conhecidos são reutilizados. As alterações só são
|
||||
gravadas depois da comparação de impacto. Nacionalidade e
|
||||
residência não determinam a origem do capital nem a modalidade
|
||||
da empresa.
|
||||
</p>
|
||||
{render(data.questions[0])}
|
||||
{active && (
|
||||
<>
|
||||
{needed.map(render)}
|
||||
<details>
|
||||
<summary>
|
||||
Dados já declarados — consultar ou alterar
|
||||
</summary>
|
||||
<div className="space-y-3">
|
||||
{questions.filter(known).map(render)}
|
||||
</div>
|
||||
</details>
|
||||
<p>
|
||||
Data, moeda e situação da entidade usam as declarações
|
||||
acima.{' '}
|
||||
{data.missing_fields.filter((k) =>
|
||||
[
|
||||
'currency',
|
||||
'expected_start_date',
|
||||
'entity_stage',
|
||||
].includes(k),
|
||||
).length > 0 &&
|
||||
'Complete esses campos em falta antes de comparar.'}
|
||||
</p>
|
||||
<div id="preparation-documents" className="space-y-3">
|
||||
<h3 className="font-bold">
|
||||
Associar documentos já existentes no dossier
|
||||
</h3>
|
||||
<p>
|
||||
Carregue documentos pelo Balcão Virtual do mesmo
|
||||
dossier. A associação não aprova o conteúdo nem
|
||||
substitui a análise do pedido.
|
||||
</p>
|
||||
{data.requirements
|
||||
.filter((r) => r.required)
|
||||
.map((r) => (
|
||||
<label className="grid gap-1" key={r.key}>
|
||||
{r.label}
|
||||
<select
|
||||
className={input}
|
||||
disabled={disabled}
|
||||
value={
|
||||
Object.hasOwn(links, r.key)
|
||||
? (links[r.key] ?? '')
|
||||
: (r.document_id ?? '')
|
||||
}
|
||||
onChange={(e) =>
|
||||
onLink(
|
||||
r.key,
|
||||
e.target.value || null,
|
||||
)
|
||||
}
|
||||
>
|
||||
<option value="">Por associar</option>
|
||||
{documents.map((doc) => (
|
||||
<option
|
||||
key={doc.document_id}
|
||||
value={doc.document_id}
|
||||
>
|
||||
{doc.file_name} ·{' '}
|
||||
{{
|
||||
quarantined:
|
||||
'Em quarentena',
|
||||
active: 'Disponível',
|
||||
deleted: 'Removido',
|
||||
}[doc.status] ??
|
||||
'Estado por conferir'}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<span>
|
||||
{r.reason}{' '}
|
||||
<a
|
||||
className="underline"
|
||||
href={r.source.url}
|
||||
>
|
||||
{r.source.reference}
|
||||
</a>
|
||||
</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<p>
|
||||
Compare o impacto para actualizar o enquadramento, as perguntas
|
||||
e as exigências. Uma exigência que deixe de ser aplicável
|
||||
conserva o documento anterior no histórico.
|
||||
</p>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
export function PreparationImpact({
|
||||
before,
|
||||
after,
|
||||
}: {
|
||||
before: Preparation;
|
||||
after: Preparation;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
className="space-y-2 rounded border border-amber-400 p-3"
|
||||
aria-label="Impacto no pedido de investimento"
|
||||
>
|
||||
<h3 className="font-bold">Impacto no pedido e nos documentos</h3>
|
||||
<p>
|
||||
{preparationMode(before.mode)} → {preparationMode(after.mode)}.
|
||||
</p>
|
||||
<p>Próximo passo: {after.next}.</p>
|
||||
<ul className="list-disc pl-5">
|
||||
{after.requirements
|
||||
.filter(
|
||||
(r) =>
|
||||
before.requirements.find((b) => b.key === r.key)
|
||||
?.state !== r.state,
|
||||
)
|
||||
.map((r) => (
|
||||
<li key={r.key}>
|
||||
{r.label}:{' '}
|
||||
{
|
||||
states[
|
||||
before.requirements.find(
|
||||
(b) => b.key === r.key,
|
||||
)?.state ?? 'indeterminate'
|
||||
]
|
||||
}{' '}
|
||||
→ {states[r.state]}.{' '}
|
||||
{r.document_id && 'Vínculo documental preservado.'}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<p>{after.calculation_notice}</p>
|
||||
<PreparationSummary data={after} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ function MoneyInput({
|
||||
}
|
||||
|
||||
export function SimulationBusinessPlan({
|
||||
currency,
|
||||
currency: projectCurrency,
|
||||
snapshot,
|
||||
onCurrencyChange,
|
||||
onSnapshotChange,
|
||||
@@ -253,8 +253,10 @@ export function SimulationBusinessPlan({
|
||||
const plan = workingPlan ??
|
||||
restoreBusinessPlanSnapshot(snapshot) ?? {
|
||||
...emptyPlan,
|
||||
currency,
|
||||
currency: projectCurrency,
|
||||
};
|
||||
// A project edit is not a conversion or permission to relabel stored sales.
|
||||
const currency = plan.currency || projectCurrency;
|
||||
const update = (
|
||||
key: keyof BusinessFinancialPlanInput,
|
||||
value:
|
||||
@@ -858,6 +860,7 @@ export function SimulationBusinessPlan({
|
||||
<summary className="cursor-pointer text-lg font-semibold">
|
||||
Plano financeiro empresarial (pressupostos editáveis)
|
||||
</summary>
|
||||
{plan.currency && projectCurrency && plan.currency !== projectCurrency && <p role="alert">A projecção guardada está em {plan.currency}; o projecto está em {projectCurrency}. Os valores e a moeda de origem foram preservados. Reveja o enquadramento monetário antes de os reutilizar; não foi feita conversão.</p>}
|
||||
{snapshotError && (
|
||||
<p
|
||||
role="alert"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { SimulationPublishedIva, type PublishedIvaInput } from './simulation-published-iva';
|
||||
import { SimulationMonthlyIva } from './simulation-monthly-iva';
|
||||
import { inheritSimulatorFields } from '@/lib/context-inheritance';
|
||||
import {
|
||||
PublicDocumentContent,
|
||||
type PublicDocument,
|
||||
@@ -778,7 +779,7 @@ function SearchChoice({
|
||||
|
||||
export function SimulationForm() {
|
||||
const { auth } = usePage<{
|
||||
auth: { user: { email_verified_at?: string | null } | null };
|
||||
auth: { user: { id: number; email_verified_at?: string | null } | null };
|
||||
}>().props;
|
||||
const pageUrl = usePage().url;
|
||||
const draftContext = useMemo(() => {
|
||||
@@ -790,11 +791,12 @@ export function SimulationForm() {
|
||||
};
|
||||
}, [pageUrl]);
|
||||
const contextId = draftContext.context;
|
||||
const storageScope = contextId
|
||||
const projectScope = contextId
|
||||
? `:case:${contextId}`
|
||||
: draftContext.requestedDraft
|
||||
? `:draft:${draftContext.requestedDraft}`
|
||||
: '';
|
||||
const storageScope = `${auth?.user ? `:account:${auth.user.id}` : ':anonymous'}${projectScope}`;
|
||||
const draftKey = legacyDraftKey + storageScope;
|
||||
const draftCreateKey = legacyDraftCreateKey + storageScope;
|
||||
const draftIdKey = legacyDraftIdKey + storageScope;
|
||||
@@ -806,6 +808,7 @@ export function SimulationForm() {
|
||||
const canAssociateDraft = Boolean(auth?.user?.email_verified_at);
|
||||
const [draft, setDraft] = useState<SimulationDraft>({});
|
||||
const [ready, setReady] = useState(false);
|
||||
useEffect(() => { if (ready) setDraft(current => inheritSimulatorFields(current)); }, [draft, ready]);
|
||||
const [contextReview, setContextReview] = useState({
|
||||
revision: 0,
|
||||
reviewed: false,
|
||||
@@ -3611,7 +3614,7 @@ export function SimulationForm() {
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{current.id === 'tax' && <SimulationPublishedIva busy={isCalculating} onCalculate={runSimulation} />}
|
||||
{current.id === 'tax' && <SimulationPublishedIva draft={draft} onChange={change} busy={isCalculating} onCalculate={runSimulation} />}
|
||||
{current.id === 'tax' && (
|
||||
<div
|
||||
id="draft-tool-fiscal"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { InvestmentContextAssessment } from './investment-context-assessment';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { monthlyIvaInput, monthlyIvaKey, monthlySalesFromDraft, readMonthlyIvaRecord, readMonthlyIvaSettings, monthlyIvaCashTreatment, type MonthlyIvaInput, type MonthlyIvaSettings } from '@/lib/monthly-iva';
|
||||
import { fiscalQaRows } from '@/lib/fiscal-qa-preview';
|
||||
@@ -31,7 +32,7 @@ export function SimulationMonthlyIva({draft, busy, onCalculate, onChange}: {
|
||||
return () => { active = false; };
|
||||
}, [retry]);
|
||||
useEffect(() => {
|
||||
if (!settings.auto || !input || busy || !available || completed || attempt.current === key) return;
|
||||
if (!settings.auto || !input || input.currency !== 'MZN' || busy || !available || completed || attempt.current === key) return;
|
||||
const request = input;
|
||||
const pending = current && record && ['queued','running'].includes(record.execution.status) ? record.execution.id : null;
|
||||
const timer = window.setTimeout(() => {
|
||||
@@ -56,6 +57,7 @@ export function SimulationMonthlyIva({draft, busy, onCalculate, onChange}: {
|
||||
const snapshot = record?.execution.result_snapshot;
|
||||
const projection = snapshot?.monthly_projection as {rows?: Array<{date:string; sales_declared:string|null; net_sales:string|null; rate:string|null; vat:string|null; gross_sales:string|null; status:string}>} | undefined;
|
||||
return <section className="space-y-3 rounded border border-emerald-700 p-4" aria-label="IVA mensal das vendas projectadas">
|
||||
<InvestmentContextAssessment raw={draft.context_applicability_snapshot} />
|
||||
<h3 className="font-semibold">IVA mensal das vendas projectadas</h3>
|
||||
<p>{source}</p><p>Declare se os preços projectados são sem IVA ou com IVA incluído. Nenhuma taxa é fixada neste formulário; o servidor selecciona a versão publicada.</p>
|
||||
<label className="block">Primeiro mês da projecção<input type="month" value={settings.start} min="2026-01" max="2026-12" onChange={(event) => saveSettings({start:event.target.value})} className="block rounded border p-2" /></label>
|
||||
@@ -63,6 +65,7 @@ export function SimulationMonthlyIva({draft, busy, onCalculate, onChange}: {
|
||||
<label className="block"><input type="checkbox" checked={settings.declared} onChange={(event) => saveSettings({declared:event.target.checked})} /> Declaro que as vendas projectadas são tributáveis à taxa geral interna e não incluem as operações excluídas deste lote.</label>
|
||||
<p className="text-sm">Sem importações, taxas reduzidas, isenções, regimes especiais, deduções, reembolsos ou apuramento final. Valores com IVA incluído permanecem indeterminados neste lote; não se aplica a taxa ao preço bruto.</p>
|
||||
<p className="text-sm">{monthlyIvaCashTreatment}</p>
|
||||
{!!draft.currency && draft.currency !== "MZN" && <p role="alert">Moeda do projecto: {String(draft.currency)}. A regra disponível aceita apenas MZN. As vendas e a moeda são preservadas, sem conversão; o IVA mensal não pode ser determinado por esta versão.</p>}
|
||||
{inputError && <p role="alert">{inputError}</p>}
|
||||
{available === null && !error && <p role="status">A consultar a disponibilidade da versão publicada…</p>}
|
||||
{available === false && <p role="status">A versão publicada de IVA está indisponível neste ambiente para novas execuções. Os pressupostos e históricos mantêm-se.</p>}
|
||||
|
||||
@@ -10,16 +10,22 @@ export type PublishedIvaInput = MonthlyIvaInput | {
|
||||
scope_declared: boolean;
|
||||
};
|
||||
|
||||
export function SimulationPublishedIva({ busy, onCalculate }: {
|
||||
export function SimulationPublishedIva({ busy, onCalculate, draft, onChange }: {
|
||||
draft: Record<string, unknown>;
|
||||
onChange: (field: string, value: string) => void;
|
||||
busy: boolean;
|
||||
onCalculate: (input: PublishedIvaInput) => Promise<unknown>;
|
||||
}) {
|
||||
const [available, setAvailable] = useState(false);
|
||||
const [message, setMessage] = useState('A consultar disponibilidade do cálculo de IVA…');
|
||||
const [base, setBase] = useState('');
|
||||
const [date, setDate] = useState('');
|
||||
const [currency, setCurrency] = useState('');
|
||||
const [declared, setDeclared] = useState(false);
|
||||
const base = String(draft.published_iva_base ?? '');
|
||||
const date = String(draft.published_iva_date ?? '');
|
||||
const currency = String(draft.published_iva_currency ?? '');
|
||||
const declared = draft.published_iva_scope === 'yes';
|
||||
const setBase = (value: string) => onChange('published_iva_base', value);
|
||||
const setDate = (value: string) => onChange('published_iva_date', value);
|
||||
const setCurrency = (value: string) => onChange('published_iva_currency', value);
|
||||
const setDeclared = (value: boolean) => onChange('published_iva_scope', value ? 'yes' : 'no');
|
||||
const [error, setError] = useState('');
|
||||
useEffect(() => {
|
||||
let active = true;
|
||||
@@ -58,12 +64,13 @@ export function SimulationPublishedIva({ busy, onCalculate }: {
|
||||
<p className="text-sm">Cobertura: exigibilidade em 2026, operação interna à taxa geral. A base tributável é indicada por si; não é copiada do orçamento. Sem isenções, taxas reduzidas, bases especiais, importações, deduções, declaração ou pagamento. O cálculo não valida o enquadramento jurídico.</p>
|
||||
<fieldset disabled={busy} className="space-y-3">
|
||||
<label className="block">Base tributável líquida (decimal, com ponto)<input aria-label="Base tributável líquida" inputMode="decimal" value={base} onChange={(e) => setBase(e.target.value)} className="block rounded border p-2" /></label>
|
||||
<label className="block">Moeda da base<select aria-label="Moeda da base IVA" value={currency} onChange={(e) => setCurrency(e.target.value)} className="block rounded border p-2"><option value="">Seleccione</option><option value="MZN">MZN</option></select></label>
|
||||
<label className="block">Moeda da base<select aria-label="Moeda da base IVA" value={currency} onChange={(e) => setCurrency(e.target.value)} className="block rounded border p-2"><option value="">Seleccione</option><option value="MZN">MZN</option>{currency && currency !== "MZN" && <option value={currency}>{currency} — moeda declarada</option>}</select></label>
|
||||
<label className="block">Data de exigibilidade declarada<input aria-label="Data de exigibilidade IVA" type="date" min="2026-01-01" max="2026-12-31" value={date} onChange={(e) => setDate(e.target.value)} className="block rounded border p-2" /></label>
|
||||
<label className="block"><input type="checkbox" checked={declared} onChange={(e) => setDeclared(e.target.checked)} /> Declaro operação interna à taxa geral, base líquida já apurada e ausência das excepções acima.</label>
|
||||
<p className="text-sm">Sem esta declaração, o resultado fica indeterminado. O valor calculado conserva a precisão decimal; não é saldo a pagar.</p>
|
||||
<button type="button" disabled={!available || busy} onClick={() => void calculate()} className="rounded bg-emerald-800 px-4 py-2 text-white disabled:opacity-50">{busy ? 'A calcular…' : 'Calcular IVA e gravar'}</button>
|
||||
</fieldset>
|
||||
{currency && currency !== "MZN" && <p role="alert">Moeda: {currency}. A versão disponível aceita apenas MZN. O valor declarado foi preservado; não foi feita conversão. Este cálculo permanece indisponível para esta moeda.</p>}
|
||||
{error && <p role="alert">{error}</p>}
|
||||
</section>;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,16 @@ const navigation = [
|
||||
|
||||
export function TempoFooter() {
|
||||
const { t, language } = useTempoUi();
|
||||
const { portalInstitutionalContactEmail } = usePage<{ portalInstitutionalContactEmail?: string | null }>().props;
|
||||
const { portalInstitutionalContactEmail } = usePage<{
|
||||
portalInstitutionalContactEmail?: string | null;
|
||||
}>().props;
|
||||
return (
|
||||
<footer
|
||||
className="tempo-footer border-t border-white/5"
|
||||
lang={language}
|
||||
>
|
||||
<div className="mx-auto grid max-w-7xl grid-cols-1 gap-12 px-6 py-10 md:grid-cols-2 lg:grid-cols-5 lg:gap-16 lg:px-12">
|
||||
<div className="space-y-8">
|
||||
<div className="mx-auto grid max-w-7xl grid-cols-1 gap-6 px-6 py-6 md:grid-cols-2 lg:grid-cols-5 lg:gap-8 lg:px-12">
|
||||
<div className="space-y-4">
|
||||
<Link
|
||||
href="/"
|
||||
aria-label="InvesteMoz — início"
|
||||
@@ -37,9 +39,9 @@ export function TempoFooter() {
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-4">
|
||||
<h2 className="tempo-footer-heading">{t('Contactos')}</h2>
|
||||
<div className="space-y-5">
|
||||
<div className="space-y-2">
|
||||
{[
|
||||
['+258868010880', '+258 86 801 0880'],
|
||||
['+258833219644', '+258 83 321 9644'],
|
||||
@@ -58,21 +60,26 @@ export function TempoFooter() {
|
||||
</a>
|
||||
))}
|
||||
<a
|
||||
href={portalInstitutionalContactEmail ? `mailto:${portalInstitutionalContactEmail}` : '/apoio'}
|
||||
href={
|
||||
portalInstitutionalContactEmail
|
||||
? `mailto:${portalInstitutionalContactEmail}`
|
||||
: '/apoio'
|
||||
}
|
||||
className="tempo-contact-link"
|
||||
>
|
||||
<span className="tempo-contact-icon">
|
||||
<Mail size={16} aria-hidden="true" />
|
||||
</span>
|
||||
<strong className="min-w-0 text-sm font-medium [overflow-wrap:anywhere]">
|
||||
{portalInstitutionalContactEmail ?? t('Apoio ao investidor')}
|
||||
<strong className="min-w-0 text-[13px] leading-5 font-medium [overflow-wrap:anywhere]">
|
||||
{portalInstitutionalContactEmail ??
|
||||
t('Apoio ao investidor')}
|
||||
</strong>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<nav aria-label="Navegação do rodapé" className="space-y-8">
|
||||
<nav aria-label="Navegação do rodapé" className="space-y-4">
|
||||
<h2 className="tempo-footer-heading">{t('Navegação')}</h2>
|
||||
<ul className="space-y-4">
|
||||
<ul className="space-y-2">
|
||||
{navigation.map(([href, label]) => (
|
||||
<li key={href}>
|
||||
<Link href={href} className="tempo-footer-link">
|
||||
@@ -86,9 +93,9 @@ export function TempoFooter() {
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
<nav aria-label="Informação legal" className="space-y-8">
|
||||
<nav aria-label="Informação legal" className="space-y-4">
|
||||
<h2 className="tempo-footer-heading">Legal</h2>
|
||||
<ul className="space-y-4">
|
||||
<ul className="space-y-2">
|
||||
{[
|
||||
[
|
||||
'politica-de-privacidade',
|
||||
@@ -111,7 +118,7 @@ export function TempoFooter() {
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-4">
|
||||
<h2 className="tempo-footer-heading">Social</h2>
|
||||
<p className="text-xs leading-relaxed font-medium text-slate-300">
|
||||
{t(
|
||||
@@ -121,8 +128,8 @@ export function TempoFooter() {
|
||||
<TempoSocialLinks footer />
|
||||
</div>
|
||||
</div>
|
||||
<div className="border-t border-white/10 py-2">
|
||||
<div className="mx-auto flex max-w-7xl flex-col items-center justify-between gap-6 px-6 text-center text-[10px] tracking-[0.2em] text-slate-400 md:flex-row md:text-left md:text-xs">
|
||||
<div className="border-t border-white/10 py-1.5">
|
||||
<div className="mx-auto flex max-w-7xl flex-col items-center justify-between gap-1 px-6 text-center text-[10px] tracking-[0.1em] text-slate-400 md:flex-row md:text-left md:text-[11px]">
|
||||
<p>
|
||||
© {new Date().getFullYear()}{' '}
|
||||
<span className="text-[#ed1c24]">Tempo</span>.{' '}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import SearchFeedback from '@/components/search-feedback';
|
||||
import { searchTerritoryHref } from '@/lib/search-territory';
|
||||
import { Link, usePage } from '@inertiajs/react';
|
||||
import { createContext, useContext } from 'react';
|
||||
import { PortalGroupedMenu } from '@/components/portal-grouped-menu';
|
||||
@@ -24,6 +25,7 @@ export const portalLinks = [
|
||||
['/apoio', 'Apoio ao Investidor'],
|
||||
] as const;
|
||||
const names: Record<string, string> = {
|
||||
'/contextos-de-investimento': 'Contextos de investimento',
|
||||
'/sobre': 'Sobre nós',
|
||||
'/contacto': 'Contacto',
|
||||
'/politica-de-privacidade': 'Política de Privacidade',
|
||||
@@ -148,7 +150,7 @@ export default function PortalNavigation({
|
||||
{parent && (
|
||||
<>
|
||||
<Link
|
||||
href={parent}
|
||||
href={searchTerritoryHref(parent, url)}
|
||||
className="underline"
|
||||
>
|
||||
{names[parent]}
|
||||
@@ -175,11 +177,11 @@ export default function PortalNavigation({
|
||||
</div>
|
||||
<aside
|
||||
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
|
||||
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
|
||||
</a>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { searchTerritoryHref } from './search-territory.ts';
|
||||
/** Only a query string is carried; the return destination is always local. */
|
||||
export function catalogueDetailHref(path: string, query: string): string {
|
||||
return query
|
||||
@@ -8,5 +9,5 @@ export function catalogueReturnHref(base: string, pageUrl: string): string {
|
||||
const query = new URL(pageUrl, 'https://portal.invalid').searchParams.get(
|
||||
'catalogue_query',
|
||||
);
|
||||
return base + (query ? `?${new URLSearchParams(query).toString()}` : '');
|
||||
return searchTerritoryHref(base + (query ? `?${new URLSearchParams(query).toString()}` : ''), pageUrl);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
import { restoreBusinessPlanSnapshot } from './business-financial-plan.ts';
|
||||
const empty = (value: unknown) => value == null || value === '' || (Array.isArray(value) && value.length === 0);
|
||||
function canonical(value: unknown): unknown {
|
||||
if (Array.isArray(value)) return value.map(canonical);
|
||||
if (value && typeof value === 'object') return Object.fromEntries(Object.entries(value).sort(([a],[b])=>a.localeCompare(b)).map(([key,item])=>[key,canonical(item)]));
|
||||
return value;
|
||||
}
|
||||
// Change tracking only, never an authorization, integrity or legal-acceptance token. No personal values in metadata.
|
||||
function signature(value: unknown): string {
|
||||
const text=JSON.stringify(canonical(value)) ?? 'undefined';let hash=14695981039346656037n;
|
||||
for(let index=0;index<text.length;index++) hash=BigInt.asUintN(64,(hash^BigInt(text.charCodeAt(index)))*1099511628211n);
|
||||
return `${text.length}:${hash.toString(16)}`;
|
||||
}
|
||||
export function inheritCompatibleFields(scope:string, values:Record<string,unknown>, source:Record<string,unknown>, raw:unknown, allowed?:string[]): {patch:Record<string,unknown>; metadata:string; inherited:string[]; conflicts:string[]} {
|
||||
let previous:Record<string,string>={};
|
||||
try { const saved=JSON.parse(String(raw ?? ''));if(saved.version===1 && saved.scope===scope && saved.inherited && typeof saved.inherited==='object') previous=saved.inherited; } catch { /* Legacy inputs are retained, not overwritten. */ }
|
||||
const next={...previous};const patch:Record<string,unknown>={};const inherited:string[]=[];const conflicts:string[]=[];
|
||||
const geo=['province_id','district_id','admin_post_id','locality_id'];
|
||||
const geoConflict=geo.some(key=>(!empty(values[key]) || key in previous) && signature(values[key])!==signature(source[key]) && previous[key]!==signature(values[key]));
|
||||
for(const [key,value] of Object.entries(source)) {
|
||||
if ((allowed && !allowed.includes(key)) || (empty(value) && !(key in previous))) continue;
|
||||
const current=values[key];
|
||||
const track = (item:unknown) => key==='parcels' ? Object.fromEntries(geo.map(field=>[field,(item as Array<Record<string,unknown>>)?.[0]?.[field] ?? ''])) : item;
|
||||
const owned=previous[key]===signature(track(current));
|
||||
const vacant=key==='parcels' ? geo.every(field=>empty((current as Array<Record<string,unknown>>)?.[0]?.[field])) : empty(current);
|
||||
if ((geo.includes(key) && geoConflict) || (!owned && (!vacant || key in previous))) {
|
||||
if(signature(current)!==signature(value)) conflicts.push(key);
|
||||
continue;
|
||||
}
|
||||
if(key==='parcels') {
|
||||
const parcels=current as Array<Record<string,unknown>>|undefined;
|
||||
if(!owned && parcels?.length && geo.some(field=>!empty(parcels[0]?.[field]))) {conflicts.push(key);continue;}
|
||||
}
|
||||
if(signature(track(current))!==signature(track(value))) {
|
||||
if(key==='parcels') {
|
||||
const parcels=(current as Array<Record<string,unknown>>) ?? [];
|
||||
patch[key]=[{...parcels[0],...Object.fromEntries(geo.map(field=>[field,(value as Array<Record<string,unknown>>)[0]?.[field] ?? '']))},...parcels.slice(1)];
|
||||
} else patch[key]=value;
|
||||
}
|
||||
next[key]=signature(track(value));inherited.push(key);
|
||||
}
|
||||
return {patch,metadata:JSON.stringify({version:1,scope,inherited:next}),inherited,conflicts};
|
||||
}
|
||||
|
||||
export function inheritSimulatorFields<T extends Record<string,unknown>>(draft:T): T {
|
||||
const source:Record<string,unknown>={};
|
||||
const plan=draft.business_plan_snapshot ? restoreBusinessPlanSnapshot(String(draft.business_plan_snapshot)) : null;
|
||||
if(plan?.currency) source.currency=plan.currency;
|
||||
const currency=draft.currency || source.currency;
|
||||
if(currency) {source.fiscal_currency=currency;source.opportunity_currency=currency;source.published_iva_currency=currency;}
|
||||
if(draft.tax_residency_country) source.fiscal_residency_country=draft.tax_residency_country;
|
||||
if(draft.fiscal_reference_date) source.published_iva_date=draft.fiscal_reference_date;
|
||||
let settings:Record<string,unknown>={start:'',basis:'unknown',declared:false,auto:false};
|
||||
let settingsValid=!draft.monthly_iva_settings;
|
||||
try {const saved=JSON.parse(String(draft.monthly_iva_settings ?? ''));if(saved && !Array.isArray(saved) && typeof saved.start==='string' && ['net','included','unknown'].includes(saved.basis) && typeof saved.declared==='boolean' && typeof saved.auto==='boolean') {settings=saved;settingsValid=true;}} catch { /* Invalid stored inputs remain intact. */ }
|
||||
const start=String(draft.expected_start_date ?? '');
|
||||
if(/^\d{4}-\d{2}-\d{2}$/.test(start)) source.monthly_iva_start=start.slice(0,7);
|
||||
else if(/^\d{4}$/.test(String(draft.fiscal_period)) && draft.fiscal_periodicity==='monthly' && /^(0?[1-9]|1[0-2])$/.test(String(draft.fiscal_month))) source.monthly_iva_start=`${draft.fiscal_period}-${String(draft.fiscal_month).padStart(2,'0')}`;
|
||||
if(!settingsValid) delete source.monthly_iva_start;
|
||||
// Legacy drafts without a compatible source need no inheritance marker or autosave churn.
|
||||
if (!Object.keys(source).length && !draft.compatible_fields_snapshot) return draft;
|
||||
const values={...draft,monthly_iva_start:settings.start ?? ''};
|
||||
const patch=inheritCompatibleFields('simulator-compatible-fields',values,source,draft.compatible_fields_snapshot);
|
||||
const next:Record<string,unknown>={...draft,...patch.patch,compatible_fields_snapshot:patch.metadata};
|
||||
if('monthly_iva_start' in patch.patch) next.monthly_iva_settings=JSON.stringify({...settings,start:patch.patch.monthly_iva_start});
|
||||
delete next.monthly_iva_start;
|
||||
return JSON.stringify(next)===JSON.stringify(draft) ? draft : next as T;
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
import type {
|
||||
Preparation,
|
||||
PreparationDocument,
|
||||
} from '@/components/private-investment-preparation';
|
||||
function csrfToken(): string {
|
||||
return decodeURIComponent(
|
||||
document.cookie
|
||||
@@ -56,6 +60,8 @@ export type DossierContext = {
|
||||
dependency_hash?: string;
|
||||
};
|
||||
export type ContextView = {
|
||||
private_investment?: Preparation | null;
|
||||
preparation_documents?: PreparationDocument[];
|
||||
simulator_context_revision?: number | null;
|
||||
case: { id: string; title: string; version: number };
|
||||
context: DossierContext;
|
||||
@@ -73,6 +79,7 @@ export type ContextView = {
|
||||
notice: string;
|
||||
};
|
||||
export type ContextPlan = {
|
||||
private_investment?: { before: Preparation; after: Preparation } | null;
|
||||
preview_hash: string;
|
||||
version: number;
|
||||
revision: number;
|
||||
@@ -119,6 +126,20 @@ export async function contextApi<T>(
|
||||
return data as T;
|
||||
}
|
||||
export const contextFieldNames: Record<string, string> = {
|
||||
investment_form: 'Tipo do investimento',
|
||||
investment_preparation: 'Preparação do pedido',
|
||||
investment_activity_scope: 'Natureza da actividade',
|
||||
implementation_mode: 'Modalidade da empresa',
|
||||
capital_origin: 'Origem dos capitais',
|
||||
site_tenure: 'Utilização das instalações',
|
||||
project_concession: 'PPP ou concessão empresarial',
|
||||
significant_implications: 'Implicações significativas',
|
||||
land_extension: 'Extensão de terra',
|
||||
forest_concession: 'Concessão florestal',
|
||||
forest_concession_hectares: 'Área florestal em hectares',
|
||||
total_investment: 'Valor total do investimento',
|
||||
area_required: 'Área de terra requerida',
|
||||
area_unit: 'Unidade da área',
|
||||
title: 'Título do investimento',
|
||||
territory_id: 'Localização documentada',
|
||||
location_source: 'Origem da localização',
|
||||
@@ -134,4 +155,19 @@ export const contextFieldNames: Record<string, string> = {
|
||||
province: 'Província',
|
||||
district: 'Distrito',
|
||||
location: 'Localização',
|
||||
currency: 'Moeda do projecto',
|
||||
person_type: 'Tipo de pessoa',
|
||||
fiscal_period: 'Ano fiscal',
|
||||
fiscal_periodicity: 'Periodicidade',
|
||||
fiscal_month: 'Mês fiscal',
|
||||
fiscal_residency_country: 'País de residência fiscal declarado',
|
||||
activity_id: 'Actividade',
|
||||
project_type: 'Modalidade do investimento',
|
||||
maturity_stage: 'Fase do investimento',
|
||||
expected_start_date: 'Início previsto',
|
||||
investor_origin: 'Origem do investidor',
|
||||
entity_stage: 'Situação da entidade',
|
||||
tax_residency_country: 'Residência fiscal declarada',
|
||||
investment_regime: 'Enquadramento territorial consultado',
|
||||
special_zone_id: 'ZEE, ZFI ou parque',
|
||||
};
|
||||
|
||||
@@ -21,6 +21,7 @@ export function monthlySalesFromDraft(draft: Record<string, unknown>): { amounts
|
||||
if (draft.business_plan_snapshot) {
|
||||
const plan = restoreBusinessPlanSnapshot(String(draft.business_plan_snapshot));
|
||||
if (!plan) throw new Error('Não foi possível recuperar a projecção de vendas. Os dados guardados não foram substituídos.');
|
||||
if (draft.currency && plan.currency && draft.currency !== plan.currency) throw new Error(`A projecção de vendas está em ${plan.currency}, mas o projecto está em ${String(draft.currency)}. Reveja a moeda da projecção; os valores não foram convertidos nem reclassificados.`);
|
||||
return {amounts: monthlyProjectedSales(plan), source: 'Vendas por produto e mês do plano empresarial; mesmos pressupostos e representação monetária da projecção de vendas.'};
|
||||
}
|
||||
if (draft.cashflow_snapshot) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export type Sector = {
|
||||
url?: string;
|
||||
slug: string;
|
||||
name: string;
|
||||
specializations?: { id: number; name: string; slug: string; url: string }[];
|
||||
|
||||
@@ -444,7 +444,6 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
|
||||
id: 'discovery',
|
||||
label: 'Descoberta',
|
||||
children: [
|
||||
link('home', 'Início', '/'),
|
||||
link(
|
||||
'idea-entry',
|
||||
'Partir de uma ideia',
|
||||
|
||||
@@ -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]';
|
||||
@@ -277,6 +277,79 @@ function makeSections(
|
||||
}
|
||||
}
|
||||
|
||||
if (draft.context_applicability_snapshot) {
|
||||
try {
|
||||
const context = JSON.parse(
|
||||
String(draft.context_applicability_snapshot),
|
||||
);
|
||||
if (context.version === 1) {
|
||||
const section = sections.get('sources');
|
||||
const zone = context.zone;
|
||||
section?.rows.push({
|
||||
field: 'Contexto do investimento',
|
||||
value: `Revisão ${context.context_revision}; ${zone ? `${zone.title}, versão ${zone.version}` : 'sem ZEE, ZFI ou parque seleccionado'}`,
|
||||
origin: 'Referência do mesmo dossier no momento da gravação',
|
||||
classification:
|
||||
'Contexto versionado; não é reconhecimento jurídico',
|
||||
});
|
||||
section?.paragraphs.push(
|
||||
zone
|
||||
? 'Benefício fiscal da zona indeterminado: falta regra executável ligada às condições e reconhecimento. O IVA apresentado é apenas cenário geral sem benefício; não representa o regime especial nem o apuramento final.'
|
||||
: 'Cenário geral de preparação; sem confirmação automática de elegibilidade fiscal.',
|
||||
);
|
||||
const preparation = context.preparation;
|
||||
if (preparation?.enabled) {
|
||||
const modes: Record<string, string> = {
|
||||
authorization: 'Pedido de autorização',
|
||||
registration: 'Pedido de mero registo',
|
||||
indeterminate: 'Enquadramento por determinar',
|
||||
};
|
||||
section?.rows.push({
|
||||
field: 'Preparação do investimento privado',
|
||||
value: modes[preparation.mode] ?? 'Por determinar',
|
||||
origin: `Contexto congelado v${context.context_revision}; ${preparation.version}`,
|
||||
classification:
|
||||
'Declarações e requisitos de preparação; sem aprovação jurídica',
|
||||
});
|
||||
section?.paragraphs.push(
|
||||
preparation.next,
|
||||
preparation.calculation_notice,
|
||||
preparation.notice,
|
||||
);
|
||||
for (const requirement of preparation.requirements ?? [])
|
||||
section?.rows.push({
|
||||
field: requirement.label,
|
||||
value:
|
||||
requirement.state === 'not_applicable'
|
||||
? 'Não aplicável; histórico preservado'
|
||||
: requirement.state === 'associated'
|
||||
? `Associado: ${requirement.document?.file_name ?? 'documento do dossier'}; conteúdo por conferir`
|
||||
: requirement.state === 'missing'
|
||||
? 'Documento por associar'
|
||||
: 'Informação em falta para decidir',
|
||||
origin: `${requirement.reason} ${requirement.source?.reference ?? ''}; ${requirement.source?.url ?? ''}`,
|
||||
classification:
|
||||
'Preparação informativa — simulação, sem submissão à Administração',
|
||||
});
|
||||
}
|
||||
if (zone?.href)
|
||||
section?.rows.push({
|
||||
field: 'Ficha e fundamentos da zona',
|
||||
value: zone.href,
|
||||
origin: `Versão consultada ${zone.version}`,
|
||||
classification:
|
||||
'Referência consultável; condições por verificar',
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
sections
|
||||
.get('sources')
|
||||
?.paragraphs.push(
|
||||
'Não foi possível recuperar o contexto guardado; o enquadramento territorial permanece indeterminado.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
for (const [sectionName, field, value, origin] of rows.slice(1)) {
|
||||
// Questionnaire schema identifiers remain stored; they do not help the
|
||||
// reader assess the project and are not a business report field.
|
||||
@@ -346,9 +419,23 @@ function makeSections(
|
||||
}
|
||||
|
||||
const finance = sections.get('finance');
|
||||
if (finance && ['fiscal_rule_qa_preview', 'fiscal_rule_published'].includes(String(currentCalculation?.snapshot?.scenario_kind)) && currentCalculation?.snapshot) {
|
||||
for (const [field, value] of fiscalQaRows(currentCalculation.snapshot)) {
|
||||
finance.rows.push({ field, value, origin: 'Snapshot fiscal preservado; sem recálculo', classification: 'Cálculo exacto; ver estado da regra no snapshot; não é saldo a pagar' });
|
||||
if (
|
||||
finance &&
|
||||
['fiscal_rule_qa_preview', 'fiscal_rule_published'].includes(
|
||||
String(currentCalculation?.snapshot?.scenario_kind),
|
||||
) &&
|
||||
currentCalculation?.snapshot
|
||||
) {
|
||||
for (const [field, value] of fiscalQaRows(
|
||||
currentCalculation.snapshot,
|
||||
)) {
|
||||
finance.rows.push({
|
||||
field,
|
||||
value,
|
||||
origin: 'Snapshot fiscal preservado; sem recálculo',
|
||||
classification:
|
||||
'Cálculo exacto; ver estado da regra no snapshot; não é saldo a pagar',
|
||||
});
|
||||
}
|
||||
}
|
||||
if (finance && currentCalculation) {
|
||||
@@ -423,13 +510,22 @@ function makeSections(
|
||||
},
|
||||
{
|
||||
field: 'Fórmula e valores usados',
|
||||
value:
|
||||
['fiscal_rule_qa_preview', 'fiscal_rule_published'].includes(String(snapshot?.scenario_kind))
|
||||
? `Base tributável declarada × taxa cadastrada ÷ 100; cálculo decimal exacto, sem arredondamento. Ver regra e proveniência acima.`
|
||||
: snapshot && typeof snapshot.formula_version === 'string'
|
||||
? `Fórmula ${snapshot.formula_version}; base ${displayValue(snapshot.base, 'não disponível')}; taxa ${displayValue(snapshot.rate_percent, 'não disponível')}%; redução ${displayValue(snapshot.reduction_percent, 'não disponível')}%; moeda ${displayValue(snapshot.currency, 'não indicada')}`
|
||||
: 'A fórmula não foi identificada no snapshot; ver explicação da execução',
|
||||
origin: ['fiscal_rule_qa_preview', 'fiscal_rule_published'].includes(String(snapshot?.scenario_kind)) ? (snapshot?.scenario_kind === 'fiscal_rule_published' ? 'Versão publicada na admissão; sem validação jurídica da operação' : 'Snapshot QA de regra em rascunho; sem activação ou validação jurídica da operação') : 'Snapshot guardado; sem aplicação de regra legal',
|
||||
value: [
|
||||
'fiscal_rule_qa_preview',
|
||||
'fiscal_rule_published',
|
||||
].includes(String(snapshot?.scenario_kind))
|
||||
? `Base tributável declarada × taxa cadastrada ÷ 100; cálculo decimal exacto, sem arredondamento. Ver regra e proveniência acima.`
|
||||
: snapshot && typeof snapshot.formula_version === 'string'
|
||||
? `Fórmula ${snapshot.formula_version}; base ${displayValue(snapshot.base, 'não disponível')}; taxa ${displayValue(snapshot.rate_percent, 'não disponível')}%; redução ${displayValue(snapshot.reduction_percent, 'não disponível')}%; moeda ${displayValue(snapshot.currency, 'não indicada')}`
|
||||
: 'A fórmula não foi identificada no snapshot; ver explicação da execução',
|
||||
origin: [
|
||||
'fiscal_rule_qa_preview',
|
||||
'fiscal_rule_published',
|
||||
].includes(String(snapshot?.scenario_kind))
|
||||
? snapshot?.scenario_kind === 'fiscal_rule_published'
|
||||
? 'Versão publicada na admissão; sem validação jurídica da operação'
|
||||
: 'Snapshot QA de regra em rascunho; sem activação ou validação jurídica da operação'
|
||||
: 'Snapshot guardado; sem aplicação de regra legal',
|
||||
classification: 'Reutilização do resultado existente',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import { inheritSimulatorFields } from './context-inheritance.ts';
|
||||
import { csvCell } from './csv.js';
|
||||
import { fiscalQaRows } from './fiscal-qa-preview.ts';
|
||||
import { isApiSimulationResultSnapshotV1 } from './simulation-contract.ts';
|
||||
@@ -1530,7 +1531,7 @@ export function restoreSimulationDraft(
|
||||
}
|
||||
}
|
||||
}
|
||||
return draft as SimulationDraft;
|
||||
return inheritSimulatorFields(draft as SimulationDraft);
|
||||
}
|
||||
|
||||
export function simulationDraftFingerprint(draft: SimulationDraft): string {
|
||||
|
||||
@@ -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 { useInterestDraft } from '@/hooks/use-interest-draft';
|
||||
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 CountrySelect, { type Country } from '@/components/country-select';
|
||||
import type { Dispatch, FormEvent, ReactNode, SetStateAction } from 'react';
|
||||
import type { LucideIcon } from 'lucide-react';
|
||||
import { usePortalQuery } from '@/hooks/use-portal-query';
|
||||
import {
|
||||
PortalApiError,
|
||||
@@ -30,30 +38,20 @@ import type {
|
||||
Sector,
|
||||
} from '@/lib/portal-api';
|
||||
import {
|
||||
Search,
|
||||
Leaf,
|
||||
Zap,
|
||||
Hotel,
|
||||
Truck,
|
||||
Waves,
|
||||
Banknote,
|
||||
ArrowRight,
|
||||
ArrowLeft,
|
||||
MapPin,
|
||||
CheckCircle2,
|
||||
LogIn,
|
||||
FileText,
|
||||
Scale,
|
||||
Handshake,
|
||||
Calculator,
|
||||
ArrowRight,
|
||||
} from 'lucide-react';
|
||||
|
||||
type View = 'home' | 'opportunities' | 'detail' | 'interest';
|
||||
type OpportunityAction = (opportunity: Opportunity) => void;
|
||||
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({
|
||||
loading,
|
||||
@@ -68,7 +66,7 @@ function QueryStatus({
|
||||
return (
|
||||
<p
|
||||
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...
|
||||
</p>
|
||||
@@ -77,7 +75,7 @@ function QueryStatus({
|
||||
return (
|
||||
<div
|
||||
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>
|
||||
<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({
|
||||
opportunity,
|
||||
onView,
|
||||
@@ -392,7 +224,12 @@ function OpportunitiesView({
|
||||
|
||||
return (
|
||||
<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">
|
||||
Oportunidades de investimento
|
||||
</h1>
|
||||
@@ -705,19 +542,22 @@ function InterestForm({
|
||||
const pending = useRef(false);
|
||||
const submission = useRef<{ body: string; key: string } | null>(null);
|
||||
const [submitError, setSubmitError] = useState<string | null>(null);
|
||||
const draft = useInterestDraft<InterestFormData>('opportunity:' + (preselected?.reference ?? 'general'), {
|
||||
name: '',
|
||||
email: '',
|
||||
phone: '',
|
||||
investorType: '',
|
||||
country: '',
|
||||
declared_origin_country_code: '',
|
||||
sectorInterest: preselected?.sectorName ?? '',
|
||||
opportunityReference: preselected ? preselected.reference : '',
|
||||
investmentRange: '',
|
||||
message: '',
|
||||
privacyConsent: false,
|
||||
});
|
||||
const draft = useInterestDraft<InterestFormData>(
|
||||
'opportunity:' + (preselected?.reference ?? 'general'),
|
||||
{
|
||||
name: '',
|
||||
email: '',
|
||||
phone: '',
|
||||
investorType: '',
|
||||
country: '',
|
||||
declared_origin_country_code: '',
|
||||
sectorInterest: preselected?.sectorName ?? '',
|
||||
opportunityReference: preselected ? preselected.reference : '',
|
||||
investmentRange: '',
|
||||
message: '',
|
||||
privacyConsent: false,
|
||||
},
|
||||
);
|
||||
const { form, setForm } = draft;
|
||||
const [errors, setErrors] = useState<FormErrors>({});
|
||||
const [result, setResult] = useState<{ reference: string } | null>(null);
|
||||
@@ -779,7 +619,10 @@ function InterestForm({
|
||||
setResult({ reference: response.data.reference });
|
||||
onSubmitted();
|
||||
} 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) {
|
||||
setErrors(fieldErrors(error));
|
||||
setSubmitError(error.message);
|
||||
@@ -805,7 +648,13 @@ function InterestForm({
|
||||
A sua referência é <strong>{result.reference}</strong>. A
|
||||
equipa do portal irá analisar o pedido e poderá solicitar
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -1053,16 +902,20 @@ function Field({
|
||||
|
||||
function Footer() {
|
||||
return (
|
||||
<footer className="border-t border-slate-200 bg-slate-950 py-10 text-slate-400">
|
||||
<div className="mx-auto max-w-6xl px-5 text-sm">
|
||||
<p className="font-bold text-white">INVESTE Moçambique</p>
|
||||
<p className="mt-2 max-w-md">
|
||||
Portal do Investidor — conheça as oportunidades de
|
||||
investimento em Moçambique e manifeste o seu interesse.{' '}
|
||||
<a href="/acesso-gestao" className="underline">
|
||||
Acesso à gestão
|
||||
</a>
|
||||
</p>
|
||||
<footer
|
||||
aria-label="Portal do Investidor"
|
||||
className="border-t border-slate-200 bg-white"
|
||||
>
|
||||
<div className="mx-auto flex max-w-6xl justify-start px-5 py-2">
|
||||
<a
|
||||
href="/acesso-gestao"
|
||||
aria-label="Acesso à gestão"
|
||||
title="Acesso à gestão"
|
||||
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>
|
||||
</footer>
|
||||
);
|
||||
@@ -1120,11 +973,7 @@ export default function PortalInvestidorApp({
|
||||
|
||||
function handleHeroSearch(event: FormEvent<HTMLFormElement>) {
|
||||
event.preventDefault();
|
||||
router.get('/oportunidades', { q: heroQuery });
|
||||
}
|
||||
|
||||
function handleSelectSector(slug: string) {
|
||||
router.get('/sectores/' + encodeURIComponent(slug));
|
||||
router.get('/oportunidades', { q: heroQuery.trim() });
|
||||
}
|
||||
|
||||
function handleView(opportunity: Opportunity) {
|
||||
@@ -1140,121 +989,52 @@ export default function PortalInvestidorApp({
|
||||
return (
|
||||
<SectorContext.Provider value={sectors}>
|
||||
<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 />
|
||||
<main>
|
||||
{view === 'home' && (
|
||||
<>
|
||||
<Hero
|
||||
<PortalHero
|
||||
query={heroQuery}
|
||||
setQuery={setHeroQuery}
|
||||
onSearch={handleHeroSearch}
|
||||
stats={home.data?.data.stats}
|
||||
onNavigate={navigate}
|
||||
/>
|
||||
<section className="mx-auto max-w-6xl space-y-5 px-5 py-10">
|
||||
<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>
|
||||
<InvestmentContextCards />
|
||||
<QueryStatus
|
||||
loading={home.loading}
|
||||
error={home.error}
|
||||
retry={home.retry}
|
||||
/>
|
||||
{home.data && (
|
||||
<SectorGrid
|
||||
onSelectSector={handleSelectSector}
|
||||
<HomepageSectors
|
||||
sectors={sectors.map((sector) => ({
|
||||
...sector,
|
||||
description: sector.shortDescription,
|
||||
}))}
|
||||
/>
|
||||
)}
|
||||
|
||||
<section className="mx-auto max-w-6xl space-y-5 px-5 py-12">
|
||||
<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>
|
||||
<InvestmentSteps />
|
||||
|
||||
<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="mb-8 flex items-end justify-between">
|
||||
<h2 className="text-2xl font-black text-slate-900">
|
||||
<div className="mb-5 flex items-end justify-between">
|
||||
<h2 className={HOME_SECTION_HEADING}>
|
||||
Oportunidades em destaque
|
||||
</h2>
|
||||
<button
|
||||
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>
|
||||
</div>
|
||||
{home.data && featured.length === 0 && (
|
||||
@@ -1275,77 +1055,154 @@ export default function PortalInvestidorApp({
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section className="mx-auto grid max-w-6xl gap-6 px-5 py-12 md:grid-cols-2">
|
||||
<div className="space-y-4 rounded-xl border bg-white p-6">
|
||||
<h2 className="text-2xl font-black">
|
||||
Documentos essenciais
|
||||
</h2>
|
||||
{essentialResources.length > 0 && (
|
||||
<ul className="space-y-2">
|
||||
{essentialResources.map(
|
||||
(resource) => (
|
||||
<li key={resource.id}>
|
||||
<a
|
||||
className="underline"
|
||||
href={`/documentos/${resource.id}/download`}
|
||||
>
|
||||
{resource.title}
|
||||
</a>
|
||||
</li>
|
||||
),
|
||||
)}
|
||||
</ul>
|
||||
)}
|
||||
<p>
|
||||
Consulte legislação, referências e
|
||||
formulários publicados para preparar o
|
||||
seu investimento.
|
||||
</p>
|
||||
<a
|
||||
className="font-semibold text-emerald-800 underline"
|
||||
href="/documentos"
|
||||
>
|
||||
Abrir biblioteca documental
|
||||
</a>
|
||||
<p>
|
||||
<section
|
||||
className={`${HOME_SECTION} grid gap-4 sm:gap-5 md:grid-cols-2`}
|
||||
>
|
||||
<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]">
|
||||
<FileText
|
||||
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">
|
||||
Documentos essenciais
|
||||
</h2>
|
||||
<p className="text-sm leading-relaxed text-slate-600 sm:text-base">
|
||||
Consulte legislação, referências
|
||||
e formulários publicados para
|
||||
preparar o seu investimento.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-auto flex flex-col gap-2 px-6 pb-6">
|
||||
<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"
|
||||
>
|
||||
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>
|
||||
</p>
|
||||
</div>
|
||||
<div className="space-y-4 rounded-xl bg-emerald-900 p-6 text-white">
|
||||
<h2 className="text-2xl font-black">
|
||||
Apoio ao Investidor
|
||||
</h2>
|
||||
<p>
|
||||
Peça orientação à equipa, proponha uma
|
||||
parceria ou acompanhe o seu pedido.
|
||||
</p>
|
||||
<a
|
||||
className="font-semibold underline"
|
||||
href="/apoio"
|
||||
>
|
||||
Contactar Apoio ao Investidor
|
||||
</a>
|
||||
<p>
|
||||
{essentialResources.length > 0 && (
|
||||
<div className="mt-2 rounded-xl bg-slate-50/80 p-4">
|
||||
<p className="mb-2 text-xs font-semibold tracking-wide text-slate-500 uppercase">
|
||||
Destaques
|
||||
</p>
|
||||
<ul className="space-y-1.5">
|
||||
{essentialResources
|
||||
.slice(0, 3)
|
||||
.map((resource) => (
|
||||
<li
|
||||
key={
|
||||
resource.id
|
||||
}
|
||||
>
|
||||
<a
|
||||
className="inline-flex items-center gap-2 text-sm text-slate-700 underline-offset-4 hover:text-slate-900 hover:underline"
|
||||
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
|
||||
className="underline"
|
||||
href="/parcerias"
|
||||
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="/apoio"
|
||||
>
|
||||
Bolsa de Parcerias
|
||||
</a>{' '}
|
||||
·{' '}
|
||||
<a
|
||||
className="underline"
|
||||
href="/simulador-fiscal"
|
||||
>
|
||||
Simulador Fiscal
|
||||
Contactar Apoio ao Investidor
|
||||
<ArrowRight
|
||||
className="h-4 w-4"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 gap-2 sm:grid-cols-2">
|
||||
<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>
|
||||
</>
|
||||
)}
|
||||
|
||||