parti_coinvolte.blade.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. @php
  2. use App\Helpers\PoliziaUtils;
  3. use App\Helpers\DateHelper;
  4. @endphp
  5. <!DOCTYPE html>
  6. <html>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <style>
  9. body {
  10. font-family: Helvetica, sans-serif;
  11. color: rgb(80, 80, 80);
  12. font-size: 13px;
  13. }
  14. *,
  15. table,
  16. table tr,
  17. table tr td {
  18. text-transform: uppercase !important;
  19. }
  20. .table-content {
  21. border: solid 1px #333;
  22. padding: 10px 0;
  23. border-collapse: collapse;
  24. }
  25. .tr-title td {
  26. font-weight: bold;
  27. }
  28. .veicolo-title-cell {
  29. font-weight: bold;
  30. border: 0 none !important;
  31. padding: 0px;
  32. }
  33. .veicolo-content-cell {
  34. border: 0 none !important;
  35. padding: 0px;
  36. }
  37. .tr-sub-title {
  38. font-size: 0.9em;
  39. }
  40. .bold {
  41. font-weight: bold;
  42. }
  43. .no-border {
  44. border: 0 none !important;
  45. }
  46. .footer {
  47. text-align: center;
  48. }
  49. span.signature {
  50. width: 100% !important;
  51. height: 1px !important;
  52. display: block;
  53. border-bottom: 1px solid #333333;
  54. }
  55. .page-break {
  56. page-break-after: always;
  57. }
  58. .total-pages:before {
  59. content: counter(pages);
  60. }
  61. </style>
  62. <body>
  63. <x-verbale.intestazione.index_pc :data="$data" />
  64. <x-verbale.header.header :data="$data" />
  65. <p></p>
  66. <p align="center">
  67. Verbale redatto con sistemi meccanizzati ed archiviato in formato elettronico da personale autorizzato dal
  68. comando in intestazione.
  69. </p>
  70. <div class="page-break"></div>
  71. <x-verbale.veicoli.index :data="$data" />
  72. @php
  73. $vehicles = collect($data['parti_coinvolte'])->filter(function ($item) {
  74. return $item->conducente_o_pedone == 2;
  75. });
  76. $pedestrians = collect($data['parti_coinvolte'])->filter(function ($item) {
  77. return $item->conducente_o_pedone == 1;
  78. });
  79. $vehicleNumber = 0;
  80. @endphp
  81. @foreach ($vehicles as $idx => $parte)
  82. @if($idx > 0)
  83. <div class="page-break"></div>
  84. @endif
  85. @php
  86. $datiVeicolo = $data['datiVeicolo'][$parte->progressive];
  87. $datiPasseggeri = App\Models\ReportDataPasseggeri::with('passeggero_value')
  88. ->where('report_id', $data['record']->id)
  89. ->get()
  90. ->groupBy('progressive');
  91. $datiInfortunati = App\Models\ReportDataInfortunati::with('infortunato_value')
  92. ->where('report_id', $data['record']->id)
  93. ->get()
  94. ->groupBy('progressive');
  95. @endphp
  96. <table width="100%">
  97. <tr>
  98. <td width="100%" valign="top" align="center" style="border:none!important">
  99. <h2>DATI VEICOLO</h2>
  100. </td>
  101. </tr>
  102. </table>
  103. <x-verbale.veicolo.dettaglio :parte="$parte" :datiVeicolo="$datiVeicolo" :vehicleNumber="$vehicleNumber" />
  104. @php $vehicleNumber++; @endphp
  105. <x-verbale.veicolo.proprietario :datiVeicolo="$datiVeicolo" />
  106. <x-verbale.veicolo.conducente :datiVeicolo="$datiVeicolo" />
  107. @if ($datiVeicolo?->polizze > 0)
  108. <x-verbale.veicolo.assicurazione :datiVeicolo="$datiVeicolo" />
  109. @endif
  110. @endforeach
  111. </table>
  112. </body>
  113. </html>