feat: consolidar desenvolvimentos do portal InvestMoz
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
$field = $definition['fields'][$key] ?? [];
|
||||
$empty = $value === null || $value === '' || $value === [];
|
||||
$display = $empty ? 'Não informado' : (is_bool($value) ? ($value ? 'Sim' : 'Não') : (is_scalar($value) ? ($field['options'][(string) $value] ?? (string) $value) : json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)));
|
||||
if (!$empty && ($field['type'] ?? null) === 'multiselect' && is_array($value)) {
|
||||
$display = implode(' · ', array_map(fn ($code) => $field['options'][$code] ?? $code, $value));
|
||||
}
|
||||
if (!$empty && ($field['type'] ?? null) === 'consent') {
|
||||
$display = ['accepted' => 'Aceite', 'declined' => 'Recusado'][$value] ?? 'Resposta conservada sem classificação';
|
||||
}
|
||||
if (!$empty && ($field['type'] ?? null) === 'attachment' && is_array($value)) {
|
||||
$display = implode(' · ', array_column($snapshot['field_attachments'][$key]['files'] ?? [], 'file_name')) ?: 'Selecção documental conservada; consulte o original técnico.';
|
||||
}
|
||||
if (!$empty && in_array($key, ['investment_amount', 'own_finance', 'other_finance'], true) && is_numeric($value)) {
|
||||
$display = number_format((float)$value, 2, ',', ' ').' '.(($snapshot['payload']['currency'] ?? '') ?: '(moeda não informada)');
|
||||
}
|
||||
|
||||
@@ -43,7 +43,23 @@ footer { margin-top:28px; border-top:1px solid #cbd8d3; padding-top:12px; }
|
||||
@include('desk.receipt-answers', ['answers' => $inactiveAnswers])
|
||||
</tbody></table>
|
||||
@endif
|
||||
@if(!empty($snapshot['field_declarations']))
|
||||
<h2>Declarações registadas nesta submissão</h2>
|
||||
<p>Estas escolhas correspondem ao texto da versão do formulário utilizada. Não substituem os controlos de acesso, outras autorizações ou decisões oficiais.</p>
|
||||
<table><caption>Texto e escolha efectivamente submetidos</caption><tbody>
|
||||
@foreach($snapshot['field_declarations'] as $declaration)
|
||||
<tr><th scope="row">{{ $declaration['label'] }}</th><td>{{ $declaration['statement'] }}<br><strong>{{ $declaration['answer'] === 'accepted' ? 'Aceite' : 'Recusado' }}</strong><br>Registado em {{ $declaration['declared_at'] }} · SHA-256 {{ $declaration['statement_sha256'] }}</td></tr>
|
||||
@endforeach
|
||||
</tbody></table>
|
||||
@endif
|
||||
<h2>Suportes documentais</h2>
|
||||
@foreach(($snapshot['field_attachments'] ?? []) as $attachment)
|
||||
<h3>{{ $attachment['label'] }}</h3>
|
||||
<p>{{ $attachment['applicable'] ? 'Pergunta aplicável à submissão.' : 'Resposta conservada de pergunta não aplicável; não é evidência aplicável.' }} Limites desta versão: {{ $attachment['limits']['max_size_kb'] }} KB por ficheiro · {{ $attachment['limits']['max_files'] }} ficheiro(s).</p>
|
||||
@foreach($attachment['files'] as $file)
|
||||
<p>{{ $file['file_name'] }} · Versão {{ $file['version_no'] ?? 'não informada' }} · {{ $file['size_bytes'] }} bytes · {{ $file['source_reference'] }}<br>SHA-256 {{ $file['sha256'] }} · {{ $file['usable_at_submission'] ? 'Disponibilidade, integridade e segurança verificadas para esta submissão interna.' : 'Disponibilidade não validada como evidência aplicável nesta submissão.' }}</p>
|
||||
@endforeach
|
||||
@endforeach
|
||||
@forelse(($snapshot['documents'] ?? []) as $document)
|
||||
<p>{{ data_get($document, 'source_reference') ?: 'Referência não informada' }} · Versão {{ data_get($document, 'version_no') ?? 'Não informada' }}</p>
|
||||
@empty
|
||||
|
||||
Reference in New Issue
Block a user