verticale.blade.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. @php
  2. $verticaleAreas = [
  3. 'segnaletica_verticale_1',
  4. 'segnaletica_verticale_2',
  5. 'segnaletica_verticale_3',
  6. 'segnaletica_verticale_4'
  7. ];
  8. @endphp
  9. @foreach ($verticaleAreas as $area)
  10. @php
  11. $viaKey = $area . '_via';
  12. $direzioneKey = $area . '_direzione';
  13. $limiteVelocitaKey = $area . '_limite_velocita';
  14. $pannelloIntegrativoKey = $area . '_pannello_integrativo';
  15. $altroKey = $area . '_altro';
  16. @endphp
  17. @if ($data['record']->{$viaKey} != '')
  18. <table width="100%" class="table-title">
  19. <tr>
  20. <td align="center">
  21. <h2>SEGNALETICA VERTICALE</h2>
  22. </td>
  23. </tr>
  24. </table>
  25. <table class="table-content" width="100%">
  26. <tr>
  27. <td width="100%" align="center">
  28. <b>VIA DI RIFERIMENTO:</b>
  29. {{ optional($data['record']->{$viaKey . '_value'})->TOPONIMO }}
  30. {{ optional($data['record']->{$viaKey . '_value'})->DESCRIZIONE }}
  31. </td>
  32. </tr>
  33. @if ($data['record']->{$direzioneKey} != '')
  34. <tr>
  35. <td width="100%" align="center">
  36. DIREZIONE: {{ $data['record']->{$direzioneKey} }}
  37. </td>
  38. </tr>
  39. @endif
  40. @if (count($data[$area]) > 0)
  41. <tr class="tr-title">
  42. <td align="center">
  43. <b>DETTAGLIO SEGNALETICA VERTICALE:</b>
  44. </td>
  45. </tr>
  46. @foreach ($data[$area] as $segnaletica_verticale)
  47. <tr>
  48. <td align="center">
  49. {{ optional($segnaletica_verticale->segnaletica_verticale)->name }}
  50. </td>
  51. </tr>
  52. @endforeach
  53. @endif
  54. @if ($data['record']->{$limiteVelocitaKey} != '')
  55. <tr>
  56. <td width="100%" align="center">
  57. LIMITE DI VELOCITÀ: {{ $data['record']->{$limiteVelocitaKey} }}
  58. </td>
  59. </tr>
  60. @endif
  61. @if ($data['record']->{$pannelloIntegrativoKey} != '')
  62. <tr>
  63. <td width="100%" align="center">
  64. PANNELLO INTEGRATIVO: {{ $data['record']->{$pannelloIntegrativoKey} }}
  65. </td>
  66. </tr>
  67. @endif
  68. @if ($data['record']->{$altroKey} != '')
  69. <tr>
  70. <td width="100%" align="center">
  71. {{ $data['record']->{$altroKey} }}
  72. </td>
  73. </tr>
  74. @endif
  75. </table>
  76. @endif
  77. @endforeach