|
|
@@ -1,217 +1,69 @@
|
|
|
@php
|
|
|
- $localizazioneIncidenteMap = [
|
|
|
- 1 => "NELL'ABITATO",
|
|
|
- 2 => "FUORI DALL'ABITATO"
|
|
|
- ];
|
|
|
-
|
|
|
- $visibilitaMap = [
|
|
|
- 1 => 'BUONA',
|
|
|
- 2 => 'LIMITATA'
|
|
|
- ];
|
|
|
-
|
|
|
- $trafficoMap = [
|
|
|
- 1 => 'NORMALE',
|
|
|
- 2 => 'SCARSO',
|
|
|
- 3 => 'INTENSO'
|
|
|
- ];
|
|
|
+ $hasData = isset($data['record']->localizzazione_incidente) && $data['record']->localizzazione_incidente != null ||
|
|
|
+ isset($data['record']->condizioni_atmosferiche) && $data['record']->condizioni_atmosferiche != '' ||
|
|
|
+ isset($data['record']->traffico) && $data['record']->traffico != '' ||
|
|
|
+ isset($data['tipo_strada']) && count($data['tipo_strada']) > 0 ||
|
|
|
+ isset($data['record']->tipo_strada_specifica) && $data['record']->tipo_strada_specifica != '';
|
|
|
@endphp
|
|
|
|
|
|
-<table width="100%" class="table-title">
|
|
|
- <tr>
|
|
|
- <td align="center">
|
|
|
- <h2>CAMPO DEL SINISTRO</h2>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
-</table>
|
|
|
-
|
|
|
-<table class="table-content" width="100%">
|
|
|
- @if ($data['record']->sinistro_ora != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>ORA INTERVENTO:</b>
|
|
|
- {{ $data['record']->sinistro_ora }}:{{ $data['record']->sinistro_minuti }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->localizzazione_incidente != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>LOCALIZZAZIONE INCIDENTE:</b>
|
|
|
- {{ $localizazioneIncidenteMap[$data['record']->localizzazione_incidente] ?? '' }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->localizzazione_incidente_altro != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- {{ $data['record']->localizzazione_incidente_altro }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->nomenclatura_strada != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>NOMENCLATURA:</b>
|
|
|
- @php
|
|
|
- $nomenclaturaParts = array_filter([
|
|
|
- optional($data['record']->nomenclatura)->name,
|
|
|
- $data['record']->nomenclatura_strada_numero,
|
|
|
- $data['record']->nomenclatura_strada_altro
|
|
|
- ]);
|
|
|
- @endphp
|
|
|
- {{ implode(', ', $nomenclaturaParts) }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if (!isset($data['record']->condizioni_atmosferiche))
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>CONDIZIONI ATMOSFERICHE:</b>
|
|
|
- {{ $data['record']->condizioniatmosferiche }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->condizioni_atmosferiche_altro != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- {{ $data['record']->condizioni_atmosferiche_altro }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->pavimentazione != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>PAVIMENTAZIONE:</b>
|
|
|
- {{ optional($data['record']->pavimentazione_value)->name }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->pavimentazione_altro != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- {{ $data['record']->pavimentazione_altro }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->condizione_strada != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>CONDIZIONE STRADA:</b>
|
|
|
- {{ optional($data['record']->condizione_strada_value)->name }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->condizione_strada_altro != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- {{ $data['record']->condizione_strada_altro }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->fondo_stradale != '')
|
|
|
+@if ($hasData)
|
|
|
+ <table width="100%" class="table-title">
|
|
|
<tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>FONDO STRADALE:</b>
|
|
|
- {{ optional($data['record']->fondo_stradale_value)->name }}
|
|
|
+ <td align="center">
|
|
|
+ <h2>CAMPO DEL SINISTRO</h2>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- @endif
|
|
|
+ </table>
|
|
|
|
|
|
- @if ($data['record']->fondo_stradale_specifica != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- {{ $data['record']->fondo_stradale_specifica }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
|
|
|
- @if (count($data['condizioni_luce']) > 0)
|
|
|
- <tr class="tr-title">
|
|
|
- <td width="100%" align="center">
|
|
|
- CONDIZIONI DI LUCE:
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @foreach ($data['condizioni_luce'] as $condizioni_luce)
|
|
|
+ <table width="100%">
|
|
|
+ @if (isset($data['record']->localizzazione_incidente) && $data['record']->localizzazione_incidente !== null)
|
|
|
<tr>
|
|
|
- <td align="center">
|
|
|
- {{ optional($condizioni_luce->condizioni_luce)->name }}
|
|
|
+ <td width="100%" align="center">
|
|
|
+ <b>LOCALIZZAZIONE INCIDENTE:</b>
|
|
|
+ {{ $localizazioneIncidenteMap[$data['record']->localizzazione_incidente] ?? '' }}
|
|
|
</td>
|
|
|
</tr>
|
|
|
- @endforeach
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->visibilita != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>VISIBILITA':</b>
|
|
|
- {{ $visibilitaMap[$data['record']->visibilita] ?? '' }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->visibilita_specifica != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- {{ $data['record']->visibilita_specifica }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->particolarita_strada != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>PARTICOLARITA' STRADA:</b>
|
|
|
- {{ optional($data['record']->particolarita_strada_value)->name }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->particolarita_strada_specifica != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- {{ $data['record']->particolarita_strada_specifica }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
-
|
|
|
- @if ($data['record']->traffico != '')
|
|
|
- <tr>
|
|
|
- <td width="100%" align="center">
|
|
|
- <b>TRAFFICO:</b>
|
|
|
- {{ $trafficoMap[$data['record']->traffico] ?? '' }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endif
|
|
|
+ @endif
|
|
|
|
|
|
- @if (count($data['tipo_strada']) > 0)
|
|
|
- <tr class="tr-title">
|
|
|
- <td width="100%" align="center">
|
|
|
- TIPO STRADA:
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @foreach ($data['tipo_strada'] as $tipo_strada)
|
|
|
+ @if (isset($data['record']->condizioni_atmosferiche) && $data['record']->condizioni_atmosferiche != '')
|
|
|
<tr>
|
|
|
- <td align="center">
|
|
|
- {{ optional($tipo_strada->tipo_strada)->name }}
|
|
|
+ <td width="100%" align="center">
|
|
|
+ <b>CONDIZIONI ATMOSFERICHE:</b>
|
|
|
+ {{ $data['record']->condizioni_atmosferiche }}
|
|
|
</td>
|
|
|
</tr>
|
|
|
- @endforeach
|
|
|
- @if ($data['record']->tipo_strada_specifica != '')
|
|
|
+ @endif
|
|
|
+
|
|
|
+ @if (isset($data['record']->traffico) && $data['record']->traffico != '')
|
|
|
<tr>
|
|
|
<td width="100%" align="center">
|
|
|
- {{ $data['record']->tipo_strada_specifica }}
|
|
|
+ <b>TRAFFICO:</b>
|
|
|
+ {{ $trafficoMap[$data['record']->traffico] ?? '' }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ @if (isset($data['tipo_strada']) && count($data['tipo_strada']) > 0)
|
|
|
+ <tr class="tr-title">
|
|
|
+ <td width="100%" align="center">
|
|
|
+ TIPO STRADA:
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ @foreach ($data['tipo_strada'] as $tipo_strada)
|
|
|
+ <tr>
|
|
|
+ <td align="center">
|
|
|
+ {{ optional($tipo_strada->tipo_strada)->name }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ @if (isset($data['record']->tipo_strada_specifica) && $data['record']->tipo_strada_specifica != '')
|
|
|
+ <tr>
|
|
|
+ <td width="100%" align="center">
|
|
|
+ {{ $data['record']->tipo_strada_specifica }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endif
|
|
|
@endif
|
|
|
- @endif
|
|
|
-</table>
|
|
|
+ </table>
|
|
|
+@endif
|