| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- {{-- resources/views/components/testimoni/index.blade.php --}}
- @php
- use App\Helpers\VerbaleHelper;
- $hasValidWitnesses = isset($data['testi_oculari']) &&
- count($data['testi_oculari']) > 0 &&
- collect($data['testi_oculari'])->some(fn($teste) => $teste->testi_oculari > 0);
- @endphp
- @if ($hasValidWitnesses)
- <style>
- .striped-table {
- width: 100%;
- border-collapse: collapse;
- }
- .striped-table th, .striped-table td {
- border: 1px solid #000;
- padding: 8px;
- }
- .striped-table tr:nth-child(even) {
- background-color: #f2f2f2;
- }
- .striped-table tr:nth-child(odd) {
- background-color: #fff;
- }
- </style>
- <table width="100%">
- <tr>
- <td width="100%" valign="top" align="center">
- <h2>TESTE OCULARI</h2>
- </td>
- </tr>
- </table>
- @foreach ($data['testi_oculari'] as $i => $teste)
- @if ($teste->testi_oculari > 0)
- <table class="table-content striped-table" width="100%">
- <tr>
- <td width="20%" align="center" style="font-size: 20px;">
- <table>
- <tr class="tr-sub-title">
- <td class="bold" style="border: none!important">TESTE</td>
- </tr>
- </table>
- </td>
- <td width="80%">
- <table class="striped-table">
- <tr>
- <td width="40%" class="veicolo-title-cell" style="padding-bottom: 10px !important;">COGNOME E NOME:</td>
- <td width="60%" class="veicolo-content-cell" style="padding-bottom: 10px !important;">
- {{ @$teste->teste->lastname }} {{ @$teste->teste->firstname }}
- </td>
- </tr>
- @if ($teste->teste->birth_date != '')
- <tr>
- <td width="25%" class="veicolo-title-cell" style="padding-bottom: 10px !important;">NATO A:</td>
- <td width="25%" class="veicolo-content-cell" style="padding-bottom: 10px !important;">
- {{ @$teste->teste->birth_town_id_value->title }}
- </td>
- <td width="25%" class="veicolo-title-cell" style="padding-bottom: 10px !important;">NATO IL:</td>
- <td width="25%" class="veicolo-content-cell" style="padding-bottom: 10px !important;">
- {{ App\Helpers\DateHelper::formatDate(@$teste->teste->birth_date) }}
- </td>
- </tr>
- @endif
- @if ($teste->stato_testi_oculari != '')
- <tr>
- <td width="30%" class="veicolo-title-cell" style="padding-bottom: 10px !important;">STATO TESTE:</td>
- <td width="70%" class="veicolo-content-cell" style="padding-bottom: 10px !important;">
- {{ VerbaleHelper::getStatusText($teste->stato_testi_oculari,VerbaleHelper::getWitnessStatusMap()) }}
- </td>
- </tr>
- @endif
- </table>
- </td>
- </tr>
- </table>
- @endif
- @endforeach
- @endif
|