47 lines
4.0 KiB
PHP
47 lines
4.0 KiB
PHP
<!doctype html>
|
|
<html lang="pt-MZ">
|
|
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Recibo {{ $record->protocol }} — InvesteMoz</title>
|
|
<style>
|
|
@page { size:A4; margin:18mm; } * { box-sizing:border-box; }
|
|
body { margin:0; background:#f3f6f5; color:#172e29; font:16px/1.5 Arial,sans-serif; }
|
|
main { max-width:960px; margin:24px auto; padding:36px; background:white; }
|
|
header { border-bottom:3px solid #176858; padding-bottom:16px; } h1 { font-size:28px; margin:8px 0; }
|
|
h2 { font-size:21px; margin:28px 0 12px; break-after:avoid; } .brand { color:#176858; font-weight:bold; font-size:22px; }
|
|
.notice { padding:14px; border-left:4px solid #b57918; background:#fff7e6; }
|
|
table { width:100%; border-collapse:collapse; table-layout:fixed; } th,td { border:1px solid #cbd8d3; padding:10px; text-align:left; vertical-align:top; overflow-wrap:anywhere; white-space:pre-wrap; }
|
|
th { width:32%; background:#edf4f1; } tr { break-inside:avoid; } thead { display:table-header-group; }
|
|
nav { display:flex; flex-wrap:wrap; gap:20px; margin-bottom:24px; } button,a { font:inherit; color:#125a4b; } button { padding:8px 16px; cursor:pointer; }
|
|
p { overflow-wrap:anywhere; }
|
|
footer { margin-top:28px; border-top:1px solid #cbd8d3; padding-top:12px; }
|
|
@media(max-width:600px) { main { margin:0; padding:18px; } th { width:40%; } }
|
|
@media print { body { background:white; font-size:10.5pt; } main { margin:0; padding:0; max-width:none; } nav { display:none; } a { color:inherit; } }
|
|
</style></head>
|
|
<body><main>
|
|
@if(app()->environment('testing') && str_starts_with((string)($snapshot['payload']['title'] ?? ''), 'SINTÉTICO'))
|
|
<p class="notice"><strong>SINTÉTICO — QA · Exemplo fictício, sem validade oficial.</strong></p>
|
|
@endif
|
|
<nav aria-label="Acções do recibo"><button type="button" onclick="window.print()">Imprimir / guardar como PDF</button><a href="{{ url('/balcao-virtual/pedidos/'.$record->id) }}">Voltar ao pedido</a><a href="{{ url('/balcao-virtual/pedidos/'.$record->id.'/recibo') }}">Descarregar original técnico (TXT)</a></nav>
|
|
<header><div class="brand">InvesteMoz</div><h1>Recibo de submissão interna</h1><p><strong>Protocolo: {{ $record->protocol }}</strong></p><p>Submetido em {{ \Illuminate\Support\Carbon::parse($record->submitted_at, 'UTC')->setTimezone('Africa/Maputo')->format('d/m/Y H:i') }} (CAT, UTC+2) · Versão {{ $record->version }}</p></header>
|
|
<h2>Resumo</h2><p>{{ $definition['title'] ?? 'Pedido no Balcão Virtual' }}</p><p class="notice">Este recibo comprova a submissão interna no portal. Não confirma aprovação, financiamento, licença ou recepção por uma entidade externa. Os dados abaixo são os declarados no momento da submissão.</p>
|
|
<h2>Dados submetidos</h2><table><caption>Informação declarada pelo requerente</caption><tbody>
|
|
@foreach(($snapshot['payload'] ?? []) as $key => $value)
|
|
@php
|
|
$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 && 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)');
|
|
}
|
|
@endphp
|
|
<tr><th scope="row">{{ $field['label'] ?? \Illuminate\Support\Str::headline($key) }}</th><td>{{ $display }}</td></tr>
|
|
@endforeach
|
|
</tbody></table>
|
|
<h2>Suportes documentais</h2>
|
|
@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
|
|
<p>Sem documentos associados nesta submissão.</p>
|
|
@endforelse
|
|
<footer>Fonte: submissão guardada no Balcão Virtual · Conteúdo privado, sujeito às permissões do pedido.</footer>
|
|
</main></body></html>
|