Parcourir la source

reports - modifiche titoli

ferrari il y a 2 mois
Parent
commit
9d20b68195

+ 17 - 1
public/css/chart-reports.css

@@ -432,6 +432,7 @@
 
 .table-cell.net {
     font-weight: 600;
+    white-space: nowrap;
 }
 
 .table-row.positive .table-cell.net {
@@ -613,6 +614,11 @@
     font-weight: 600;
 }
 
+.course-table .table-cell.earned {
+    justify-content: flex-end;
+    font-weight: 600;
+}
+
 .course-table .table-cell.delta.positive {
     color: #10b981;
 }
@@ -629,9 +635,19 @@
     justify-content: center;
     font-weight: 600;
     font-size: 0.8rem;
+    color: #10b981;
+}
+
+.course-table .table-cell.earned.positive {
+    color: #10b981;
+}
+
+.course-table .table-cell.earned.neutral {
+    color: #6b7280;
 }
 
-/* .course-table .table-cell.percentage.good {
+/*
+.course-table .table-cell.percentage.good {
     color: #059669;
 }
 

+ 0 - 15
public/css/new_style.css

@@ -870,24 +870,9 @@ body .dashboard-container .participation-fill {
     height: 100%;
     transition: width 0.3s ease;
     border-radius: 10px;
-}
-
-body .dashboard-container .participation-fill.padel {
-    background: #ffd700;
-}
-
-body .dashboard-container .participation-fill.tennis {
     background: #8b4cf7;
 }
 
-body .dashboard-container .participation-fill.pallavolo {
-    background: #ff6b35;
-}
-
-body .dashboard-container .participation-fill.yoga {
-    background: var(--color-verde);
-}
-
 body .dashboard-container .chart-title {
     font-size: 16px;
     font-weight: 600;

+ 22 - 21
resources/views/livewire/reports.blade.php

@@ -63,7 +63,7 @@
 
         <div class="chart-row">
             <div class="dashboard-card chart-card">
-                <div class="dashboard-card-title">Causali Performanti - <span id="causals-season-title">{{ $seasonFilter }}</span></div>
+                <div class="dashboard-card-title">Redditività per Causale - <span id="causals-season-title">{{ $seasonFilter }}</span></div>
                 <div class="chart-body">
                     <div style="display: grid; grid-template-columns: 1fr 700px; gap: 1rem; align-items: start;">
                         <div class="causals-table-container" id="causals-table">
@@ -95,7 +95,7 @@
 
     <div class="chart-row">
         <div class="dashboard-card chart-card modern-course-card">
-            <div class="dashboard-card-title">Analisi Corsi</div>
+            <div class="dashboard-card-title">Analisi incassi corsi</div>
             <div class="chart-body">
                 <div class="course-controls">
                     <div class="control-group">
@@ -135,8 +135,8 @@
     </div>
 </div>
 
-<script>
-    window.ReportsChartManager = window.ReportsChartManager || {
+    <script>
+        window.ReportsChartManager = window.ReportsChartManager || {
             charts: {},
             currentSeason: null,
 
@@ -288,7 +288,7 @@
                                 callbacks: {
                                     label: function (context) {
                                         return context.dataset.label + ': €' +
-                                            new Intl.NumberFormat('it-IT').format(context.parsed.y);
+                                            new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(context.parsed.y);
                                     }
                                 }
                             },
@@ -303,7 +303,7 @@
                                 grid: { color: 'rgba(0, 0, 0, 0.05)' },
                                 ticks: {
                                     callback: function (value) {
-                                        return '€' + new Intl.NumberFormat('it-IT').format(value);
+                                        return '€' + new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(value);
                                     }
                                 }
                             }
@@ -744,7 +744,7 @@
                                 },
                                 ticks: {
                                     callback: function (value) {
-                                        return '€' + new Intl.NumberFormat('it-IT').format(value);
+                                        return '€' + new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(value);
                                     }
                                 }
                             }
@@ -769,7 +769,7 @@
                                 callbacks: {
                                     label: function (context) {
                                         return context.dataset.label + ': €' +
-                                            new Intl.NumberFormat('it-IT').format(context.parsed.y);
+                                            new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(context.parsed.y);
                                     }
                                 }
                             }
@@ -886,11 +886,11 @@
                                         bottomLeft: 0,
                                         bottomRight: 0,
                                     },
-                                    borderSkipped: true,
+                                    // borderSkipped: true,
                                     data: earnedData,
                                     type: 'bar',
                                     barThickness: "flex",
-                                    barPercentage: 0.65,
+                                    barPercentage: 0.50,
                                     categoryPercentage: 0.25,
                                     order: 1,
                                     participantData: participantData,
@@ -908,11 +908,11 @@
                                         bottomLeft: 0,
                                         bottomRight: 0,
                                     },
-                                    borderSkipped: true,
+                                    // borderSkipped: true,
                                     data: totalData,
                                     type: 'bar',
                                     barThickness: "flex",
-                                    barPercentage: 0.65,
+                                    barPercentage: 0.50,
                                     categoryPercentage: 0.25,
                                     order: 2,
                                     participantData: participantData,
@@ -1026,14 +1026,14 @@
                                             let index = item.dataIndex;
                                             let monthNameExtended = item.dataset["monthNamesExtended"] ? item.dataset["monthNamesExtended"][index] : 0;
 
-                                            // return item.label + '\n' + 'TOTALE ATTESO: €' + new Intl.NumberFormat('it-IT').format(sum);
-                                            return monthNameExtended + '\n' + 'TOTALE ATTESO: €' + new Intl.NumberFormat('it-IT').format(sum);
+                                            // return item.label + '\n' + 'TOTALE ATTESO: €' + new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(sum);
+                                            return monthNameExtended + '\n' + 'TOTALE ATTESO: €' + new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(sum);
                                         },
                                         // labelTextColor: function(tooltipItems) {
                                         //     return tooltipItems.dataset.backgroundColor;
                                         // },
                                         label: function (tooltipItems) {
-                                            let label = tooltipItems.dataset.label + ': €' + new Intl.NumberFormat('it-IT').format(tooltipItems.parsed.y);
+                                            let label = tooltipItems.dataset.label + ': €' + new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(tooltipItems.parsed.y);
 
                                             return label;
                                         },
@@ -1082,7 +1082,7 @@
                 let tableHtml = `<div class="course-table">
                                     <div class="table-header">
                                         <div class="table-cell month">MESE</div>
-                                        <div class="table-cell percentage">%<br/>INCASSATO</div>
+                                        <div class="table-cell percentage">TOT. INCASSATO</div>
                                         <div class="table-cell delta">TOT. DA INCASSARE</div>
                                         <div class="table-cell suspended">SOSPESI</div>
                                     </div>`;
@@ -1111,14 +1111,15 @@
                     }
 
                     // Delta styling: positive when delta is 0 (fully paid), negative when there's missing amount
-                    const deltaClass = (total > 0 && delta === 0) ? 'positive' :
-                        (delta > 0) ? 'negative' : 'neutral';
+                    const deltaClass = (total > 0 && delta === 0) ? 'positive' : (delta > 0) ? 'negative' : 'neutral';
+                    const earnedClass = (earned > 0) ? 'positive' : 'neutral';
 
                     tableHtml += `
             <div class="table-row">
                 <div class="table-cell month">${row.month}</div>
-                <div class="table-cell percentage ${percentageClass}">${percentageDisplay}</div>
-                <div class="table-cell delta ${deltaClass}">€${new Intl.NumberFormat('it-IT').format(delta)}</div>
+                <!-- <div class="table-cell percentage ${percentageClass}">${percentageDisplay}</div> -->
+                <div class="table-cell earned ${earnedClass}">€${new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(earned)}</div>
+                <div class="table-cell delta ${deltaClass}">€${new Intl.NumberFormat('it-IT', {minimumFractionDigits: 2, maximumFractionDigits: 2}).format(delta)}</div>
                 <div class="table-cell suspended">${row.suspended}</div>
             </div>
         `;
@@ -1170,5 +1171,5 @@
                 }, 200);
             });
         });
-</script>
+    </script>
 </div>