Parcourir la source

Fix lista pagamenti

Luca Parisio il y a 9 mois
Parent
commit
a8b45cacec

+ 9 - 0
app/Http/Livewire/CourseList.php

@@ -316,6 +316,15 @@ class CourseList extends Component
                             //$totals[$i][$cls] = $p;
                     }
                 }
+                else
+                {
+                    if (!isset($totals[$i]))
+                    {
+                        $totals[$i]['green'] = 0;
+                        $totals[$i]['orange'] = 0;
+                        $totals[$i]['yellow'] = 0;
+                    }
+                }
             }
 
             $sub = $x->subscribed ? "Y" : "N";

+ 8 - 5
resources/views/livewire/course_list.blade.php

@@ -233,12 +233,15 @@
                         <th class="sticky-col-header first-col" style="border-bottom:none;"></th>
                         <th class="sticky-col-header second-col" style="border-bottom:none;"></th>
                         <th class="sticky-col-header third-col" style="border-bottom:none;"></th>
+                        
                         @foreach($totS as $yyy)
-                            @if (isset($yyy))
-                                <th style="padding-left:5px !important;padding-right:5px !important;border-bottom:none;">{!!$yyy!!}</th>
-                            @else
-                                <th style="padding-left:5px !important;padding-right:5px !important;border-bottom:none;">aa</th>
-                            @endif
+                            <th style="padding-left:5px !important;padding-right:5px !important;border-bottom:none;">
+                                @if (isset($yyy))
+                                    {!!$yyy!!}
+                                @else
+                                    &nbsp;
+                                @endif
+                            </th>
                         @endforeach
 
                         <!--<th style="padding-left:5px !important;padding-right:5px !important;"></th>