Luca Parisio hace 9 meses
padre
commit
4df41521e2
Se han modificado 1 ficheros con 10 adiciones y 8 borrados
  1. 10 8
      resources/views/livewire/course_member_two.blade.php

+ 10 - 8
resources/views/livewire/course_member_two.blade.php

@@ -37,15 +37,17 @@
                         <td>{{date("d/m/Y", strtotime($record->date_from))}} - {{date("d/m/Y", strtotime($record->date_to))}}                                                                </td>                            
                         @if($_GET["type"] != "custom")
                         <td>
-                            @foreach(json_decode($record->when) as $xx => $x)
-                                @if($xx > 0)
-                                    <br>
-                                @endif
-                                @foreach($x->day as $zz => $d)
-                                    {{$zz > 0 ? '-' : ''}}{{$d}}
+                            @if($record->when != null)
+                                @foreach(json_decode($record->when) as $xx => $x)
+                                    @if($xx > 0)
+                                        <br>
+                                    @endif
+                                    @foreach($x->day as $zz => $d)
+                                        {{$zz > 0 ? '-' : ''}}{{$d}}
+                                    @endforeach
+                                    h {{$x->from}} - {{$x->to}}
                                 @endforeach
-                                h {{$x->from}} - {{$x->to}}
-                            @endforeach
+                            @endif
                         </td>       
                         @endif                     
                         <td>{{$record->getins->name ?? ""}}</td>