90 lines
4.4 KiB
PHP
90 lines
4.4 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
body { font-family: DejaVu Sans, sans-serif; font-size: 12px; color: #1f2937; }
|
|
h1, h2, h3 { margin: 0 0 8px; }
|
|
.section { margin-bottom: 18px; }
|
|
.box { border: 1px solid #cbd5e1; padding: 10px; border-radius: 6px; }
|
|
.grid { width: 100%; border-collapse: collapse; }
|
|
.grid td, .grid th { border: 1px solid #cbd5e1; padding: 6px 8px; vertical-align: top; }
|
|
.muted { color: #64748b; }
|
|
.small { font-size: 10px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="section">
|
|
<h1>Modulo anagrafe condominiale</h1>
|
|
<p class="muted">Generato il {{ $generatedAt->format('d/m/Y H:i') }}. Il dichiarante si impegna a comunicare entro 30 giorni le variazioni rilevanti per l'anagrafe condominiale.</p>
|
|
</div>
|
|
|
|
<div class="section box">
|
|
<h2>Dati del dichiarante</h2>
|
|
<table class="grid">
|
|
<tr><th width="30%">Cognome e nome</th><td>{{ trim((string) ($persona?->cognome ?? '') . ' ' . (string) ($persona?->nome ?? '')) ?: ($utente?->name ?? 'Da compilare') }}</td></tr>
|
|
<tr><th>Codice fiscale</th><td>{{ $persona?->codice_fiscale ?? '____________________________' }}</td></tr>
|
|
<tr><th>Partita IVA</th><td>{{ $persona?->partita_iva ?? '____________________________' }}</td></tr>
|
|
<tr><th>Data nascita</th><td>{{ optional($persona?->data_nascita)->format('d/m/Y') ?? '____________________________' }}</td></tr>
|
|
<tr><th>Residenza</th><td>{{ $persona?->residenza_via ?? '______________________________________________________________' }}</td></tr>
|
|
<tr><th>Telefono</th><td>{{ $persona?->telefono_principale ?? '____________________________' }}</td></tr>
|
|
<tr><th>Email principale</th><td>{{ $persona?->email_principale ?? ($utente?->email ?? '____________________________') }}</td></tr>
|
|
<tr><th>PEC</th><td>{{ $persona?->email_pec ?? '____________________________' }}</td></tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="section box">
|
|
<h2>Email aggiuntive</h2>
|
|
<table class="grid">
|
|
<tr>
|
|
<th>Email</th>
|
|
<th>Tipo</th>
|
|
<th>Attiva</th>
|
|
</tr>
|
|
@forelse ($emailRows as $row)
|
|
<tr>
|
|
<td>{{ $row['email'] ?: '____________________________' }}</td>
|
|
<td>{{ $row['tipo_email'] ?: 'secondaria' }}</td>
|
|
<td>{{ ! empty($row['email']) ? (! empty($row['attiva']) ? 'Si' : 'No') : '___' }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="3">Nessun recapito aggiuntivo indicato.</td></tr>
|
|
@endforelse
|
|
</table>
|
|
</div>
|
|
|
|
<div class="section box">
|
|
<h2>Unità immobiliari e recapiti per servizio</h2>
|
|
@forelse ($unitaImmobiliari as $unita)
|
|
@php $matrix = $serviceContactMatrix[$unita->id] ?? []; @endphp
|
|
<h3>{{ $unita->stabile->denominazione ?? 'Stabile' }} · {{ $unita->denominazione ?? ('Unità #' . $unita->id) }}</h3>
|
|
<table class="grid" style="margin-bottom: 12px;">
|
|
<tr>
|
|
<th width="35%">Servizio</th>
|
|
<th>Recapito</th>
|
|
</tr>
|
|
@foreach ($matrix as $row)
|
|
<tr>
|
|
<td>{{ $row['label'] }}</td>
|
|
<td>{{ $row['value'] ?: collect($row['resolved'] ?? [])->pluck('email')->implode(', ') ?: '____________________________' }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</table>
|
|
@empty
|
|
<p>Nessuna unità collegata al profilo.</p>
|
|
@endforelse
|
|
</div>
|
|
|
|
<div class="section box">
|
|
<h2>Dichiarazione e firma</h2>
|
|
<p>Il sottoscritto dichiara che i dati riportati sono aggiornati e si impegna a comunicare entro 30 giorni ogni variazione utile alla gestione condominiale e all'anagrafe.</p>
|
|
<table style="width: 100%; margin-top: 22px;">
|
|
<tr>
|
|
<td width="50%">Data ____________________________</td>
|
|
<td width="50%">Firma ____________________________</td>
|
|
</tr>
|
|
</table>
|
|
<p class="small muted" style="margin-top: 16px;">Per chi non dispone di strumenti elettronici il modulo può essere stampato, firmato e consegnato allo studio.</p>
|
|
</div>
|
|
</body>
|
|
</html> |