|
|
@@ -2597,6 +2597,21 @@
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
+ @php
|
|
|
+ // Get the data using the models
|
|
|
+ $datiCintureSicurezza = App\Models\ReportDataCintureSicurezza::where('report_id', $data['record']->id)
|
|
|
+ ->byProgressive($parte->progressive)
|
|
|
+ ->first();
|
|
|
+
|
|
|
+ $datiCasco = App\Models\ReportDataUsoDelCasco::where('report_id', $data['record']->id)
|
|
|
+ ->byProgressive($parte->progressive)
|
|
|
+ ->first();
|
|
|
+
|
|
|
+ $datiCascoOmologazione = App\Models\ReportDataUsoDelCascoOmologazione::where('report_id', $data['record']->id)
|
|
|
+ ->byProgressive($parte->progressive)
|
|
|
+ ->first();
|
|
|
+ @endphp
|
|
|
+
|
|
|
<table class="table-content" width="100%">
|
|
|
<tr>
|
|
|
<td width="20%" align="center" style="font-size: 20px;">
|
|
|
@@ -2608,56 +2623,59 @@
|
|
|
</td>
|
|
|
<td width="80%">
|
|
|
<table>
|
|
|
- @if (count($datiCintureSicurezza) > 0)
|
|
|
- @for ($i = 1; $i <= 4; $i++)
|
|
|
+ @if ($datiCintureSicurezza)
|
|
|
+ @for ($i = 0; $i <= 3; $i++)
|
|
|
<tr>
|
|
|
- <td width="100%" class=""><b>CINTURE SICUREZZA
|
|
|
- PASSEGGERO{{ @$i }}</b>
|
|
|
- {{ @$datiCintureSicurezza['passeggeri_' . $i] == 1 ? 'SI' : ($datiCintureSicurezza['passeggeri_' . $i] == 2 ? 'NO' : 'NON RILEVATO') }}
|
|
|
+ <td width="100%" class=""><b>CINTURE SICUREZZA PASSEGGERO{{ $i + 1 }}</b>
|
|
|
+ @php
|
|
|
+ $fieldName = "passeggeri_{$i}";
|
|
|
+ $value = $datiCintureSicurezza->$fieldName;
|
|
|
+ @endphp
|
|
|
+ {{ $value == 1 ? 'SI' : ($value == 2 ? 'NO' : 'NON RILEVATO') }}
|
|
|
</td>
|
|
|
</tr>
|
|
|
@endfor
|
|
|
- @endif
|
|
|
|
|
|
- @if (count($datiCintureSicurezza) == 0)
|
|
|
- <tr>
|
|
|
- <td width="100%" class="">ASSENTI</td>
|
|
|
- </tr>
|
|
|
- @else
|
|
|
- <tr>
|
|
|
- <td width="100%" class=""><b>USO CASCO
|
|
|
- </b>
|
|
|
- {{ @$datiCasco->passeggeri == 1 ? 'SI' : ($datiCasco->passeggeri == 2 ? 'NO' : 'NON RILEVATO') }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
+ @if ($datiCasco)
|
|
|
+ <tr>
|
|
|
+ <td width="100%" class=""><b>USO CASCO</b>
|
|
|
+ {{ $datiCasco->passeggeri == 1 ? 'SI' : ($datiCasco->passeggeri == 2 ? 'NO' : 'NON RILEVATO') }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endif
|
|
|
|
|
|
- <tr>
|
|
|
- <td width="100%" class=""><b>CASCO OMOLOGAZIONE
|
|
|
- </b>
|
|
|
- {{ @$datiCascoOmologazione->passeggeri }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
+ @if ($datiCascoOmologazione)
|
|
|
+ <tr>
|
|
|
+ <td width="100%" class=""><b>CASCO OMOLOGAZIONE</b>
|
|
|
+ {{ $datiCascoOmologazione->passeggeri ?? 'NON RILEVATO' }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endif
|
|
|
|
|
|
- <tr>
|
|
|
- <td width="100%" class=""><b>SISTEMA RITENUTA MINORI
|
|
|
- </b>
|
|
|
- {{ @$datiVeicolo->sistema_ritenuta_minori == 1 ? 'SI' : ($datiVeicolo->sistema_ritenuta_minori == 2 ? 'NO' : 'NON RILEVATO') }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @if ($datiVeicolo->sistema_ritenuta_minori == 1)
|
|
|
+ @if (!empty($datiVeicolo))
|
|
|
<tr>
|
|
|
- <td width="100%" class=""><b>SISTEMA RITENUTA MINORI OMOLOGAZIONE
|
|
|
- </b>
|
|
|
- {{ @$datiVeicolo->sistema_ritenuta_minori_omologazione }}
|
|
|
+ <td width="100%" class=""><b>SISTEMA RITENUTA MINORI</b>
|
|
|
+ {{ $datiVeicolo->sistema_ritenuta_minori == 1 ? 'SI' : ($datiVeicolo->sistema_ritenuta_minori == 2 ? 'NO' : 'NON RILEVATO') }}
|
|
|
</td>
|
|
|
</tr>
|
|
|
+
|
|
|
+ @if($datiVeicolo->sistema_ritenuta_minori == 1)
|
|
|
+ <tr>
|
|
|
+ <td width="100%" class=""><b>SISTEMA RITENUTA MINORI OMOLOGAZIONE</b>
|
|
|
+ {{ $datiVeicolo->sistema_ritenuta_minori_omologazione ?? 'NON RILEVATO' }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endif
|
|
|
@endif
|
|
|
+ @else
|
|
|
+ <tr>
|
|
|
+ <td width="100%" class="">ASSENTI</td>
|
|
|
+ </tr>
|
|
|
@endif
|
|
|
</table>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
-
|
|
|
<table class="table-content" width="100%">
|
|
|
<tr>
|
|
|
<td width="20%" align="center" style="font-size: 20px;">
|