index.blade.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {{-- resources/views/components/testimoni/index.blade.php --}}
  2. @php
  3. use App\Helpers\VerbaleHelper;
  4. $hasValidWitnesses = isset($data['testi_oculari']) &&
  5. count($data['testi_oculari']) > 0 &&
  6. collect($data['testi_oculari'])->some(fn($teste) => $teste->testi_oculari > 0);
  7. @endphp
  8. @if ($hasValidWitnesses)
  9. <table width="100%">
  10. <tr>
  11. <td width="100%" valign="top" align="center">
  12. <h2>TESTE OCULARI</h2>
  13. </td>
  14. </tr>
  15. <tr><td></td></tr>
  16. </table>
  17. @foreach ($data['testi_oculari'] as $i => $teste)
  18. @if ($teste->testi_oculari > 0)
  19. <table class="table-content" width="100%">
  20. <tr>
  21. <td width="20%" align="center" style="font-size: 20px;">
  22. <table>
  23. <tr class="tr-sub-title">
  24. <td class="bold">TESTE</td>
  25. </tr>
  26. </table>
  27. </td>
  28. <td width="80%">
  29. <table>
  30. <tr>
  31. <td width="25%" class="veicolo-title-cell">COGNOME E NOME</td>
  32. <td width="15%" class="veicolo-content-cell">
  33. {{ @$teste->teste->lastname }} {{ @$teste->teste->firstname }}
  34. </td>
  35. <td width="15%" class="veicolo-title-cell">NATO A</td>
  36. <td width="20%" class="veicolo-content-cell">
  37. {{ @$teste->teste->birth_town_id_value->title }}
  38. </td>
  39. </tr>
  40. @if ($teste->teste->birth_date != '')
  41. <tr>
  42. <td width="15%" class="veicolo-title-cell">NATO IL</td>
  43. <td width="25%" class="veicolo-content-cell">
  44. {{ App\Helpers\DateHelper::formatDate(@$teste->teste->birth_date) }}
  45. </td>
  46. </tr>
  47. @endif
  48. @if ($teste->stato_testi_oculari != '')
  49. <tr>
  50. <td width="25%" class="veicolo-title-cell">STATO TESTE</td>
  51. <td width="70%" class="veicolo-content-cell">
  52. {{ VerbaleHelper::getStatusText($teste->stato_testi_oculari,VerbaleHelper::getWitnessStatusMap()) }}
  53. </td>
  54. </tr>
  55. @endif
  56. <tr><td></td></tr>
  57. </table>
  58. </td>
  59. </tr>
  60. </table>
  61. @endif
  62. @endforeach
  63. @endif