|
|
@@ -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>
|