ferrari 4 месяцев назад
Родитель
Сommit
3d9d684243

+ 1 - 1
app/Http/Livewire/Member.php

@@ -497,7 +497,7 @@ class Member extends Component
         }
 
         // Anni dal 2025 al 2040
-        for ($anno = 2025; $anno <= 2040; $anno++) {
+        for ($anno = 2025; $anno <= 2037; $anno++) {
             // Festività fisse
             $this->festivita[] = "$anno-01-01"; // Capodanno
             $this->festivita[] = "$anno-01-06"; // Epifania

+ 51 - 51
app/Http/Livewire/Reports.php

@@ -518,57 +518,57 @@ class Reports extends Component
             ];
         }
 
-        $rates = \App\Models\Rate::whereHas('member_course', function ($query) use ($courseId) {
-            $query->where('course_id', $courseId);
-        })->with('member_course')->get();
-
-        if ($rates->isEmpty()) {
-            return [
-                'labels' => [],
-                'datasets' => [],
-                'tableData' => [],
-                'isEmpty' => true,
-                'message' => 'Nessun dato disponibile per questo corso nella stagione ' . $this->seasonFilter
-            ];
-        }
-
-        $hasData = false;
-
-        foreach ($rates as $rate) {
-            $totalPrice = (float)($rate->price ?? 0);
-
-            if ($rate->months) {
-                $monthsData = json_decode($rate->months, true);
-
-                if (is_array($monthsData) && count($monthsData) > 0) {
-                    $pricePerMonth = $totalPrice / count($monthsData);
-
-                    foreach ($monthsData as $month) {
-                        $monthNumber = (int)$month;
-
-                        if (isset($monthlyData[$monthNumber])) {
-                            $monthlyData[$monthNumber]['total'] += $pricePerMonth;
-                            $monthlyData[$monthNumber]['participants']++;
-                            $hasData = true;
-
-                            if (!is_null($rate->record_id) && $rate->record_id !== '') {
-                                $monthlyData[$monthNumber]['earned'] += $pricePerMonth;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        if (!$hasData) {
-            return [
-                'labels' => [],
-                'datasets' => [],
-                'tableData' => [],
-                'isEmpty' => true,
-                'message' => 'Nessun pagamento registrato per questo corso nella stagione ' . $this->seasonFilter
-            ];
-        }
+        // $rates = \App\Models\Rate::whereHas('member_course', function ($query) use ($courseId) {
+        //     $query->where('course_id', $courseId);
+        // })->with('member_course')->get();
+
+        // if ($rates->isEmpty()) {
+        //     return [
+        //         'labels' => [],
+        //         'datasets' => [],
+        //         'tableData' => [],
+        //         'isEmpty' => true,
+        //         'message' => 'Nessun dato disponibile per questo corso nella stagione ' . $this->seasonFilter
+        //     ];
+        // }
+
+        // $hasData = false;
+
+        // foreach ($rates as $rate) {
+        //     $totalPrice = (float)($rate->price ?? 0);
+
+        //     if ($rate->months) {
+        //         $monthsData = json_decode($rate->months, true);
+
+        //         if (is_array($monthsData) && count($monthsData) > 0) {
+        //             $pricePerMonth = $totalPrice / count($monthsData);
+
+        //             foreach ($monthsData as $month) {
+        //                 $monthNumber = (int)$month;
+
+        //                 if (isset($monthlyData[$monthNumber])) {
+        //                     $monthlyData[$monthNumber]['total'] += $pricePerMonth;
+        //                     $monthlyData[$monthNumber]['participants']++;
+        //                     $hasData = true;
+
+        //                     if (!is_null($rate->record_id) && $rate->record_id !== '') {
+        //                         $monthlyData[$monthNumber]['earned'] += $pricePerMonth;
+        //                     }
+        //                 }
+        //             }
+        //         }
+        //     }
+        // }
+
+        // if (!$hasData) {
+        //     return [
+        //         'labels' => [],
+        //         'datasets' => [],
+        //         'tableData' => [],
+        //         'isEmpty' => true,
+        //         'message' => 'Nessun pagamento registrato per questo corso nella stagione ' . $this->seasonFilter
+        //     ];
+        // }
 
         $labels = [];
         $earnedData = [];

+ 18 - 0
public/css/style.css

@@ -16776,6 +16776,24 @@ div.dt-container div.dt-length label {
       margin-left: 0 !important;
     }
   }
+
+body #card--dashboard > .btn--ui:has(i[class*="fa-arrow-left"]) {
+  position: absolute;
+  top: 0;
+  margin: 0 !important;
+  left: 0;
+  border: none;
+  padding: 10px;
+  width: 40px;
+  height: 40px;
+  border-radius: 0 !important;
+  color: #0c6197;
+}
+
+body #card--dashboard > .btn--ui:has(i[class*="fa-arrow-left"]):hover {
+  color: white;
+  background-color: #0c6197 !important;
+}
   /* END CSS Ferrari - Modifiche UI */
 
 body div.dt-button-background {

+ 3 - 3
resources/views/livewire/reports.blade.php

@@ -105,7 +105,7 @@
             </div>
         </div>
 
-        @if(false)
+        {{-- @if(false) --}}
         <div class="chart-row">
             <div class="chart-card modern-course-card">
                 <div class="chart-header">
@@ -149,7 +149,7 @@
                 </div>
             </div>
         </div>
-        @endif
+        {{-- @endif --}}
     </div>
 
     <script>
@@ -534,7 +534,7 @@
             <div class="table-header">
                 <div class="table-cell causale">Causale</div>
                 <div class="table-cell euro">Importo</div>
-                <div class="table-cell percent">%</div>
+                <!-- <div class="table-cell percent">%</div> -->
             </div>
     `;