Minor corrections to translation and graphics on the main page

This commit is contained in:
NW 2025-08-17 10:37:34 +00:00
parent 220c2f8d62
commit 4116114d4b
2 changed files with 9 additions and 5 deletions

View File

@ -323,7 +323,7 @@
<div> <div>
<label class="block text-gray-700 text-sm font-bold mb-2" <label class="block text-gray-700 text-sm font-bold mb-2"
>Sobre * €</label >Envelope * €</label
> >
<input <input
type="number" type="number"

View File

@ -401,15 +401,19 @@ function createCharts() {
(sum, r) => sum + (Number(r.totalExpenses) || 0), (sum, r) => sum + (Number(r.totalExpenses) || 0),
0 0
); );
const totalEnvelope = reports.reduce(
(sum, r) => sum + (Number(r.envelope) || 0),
0
);
appState.expensesChartInstance = new Chart(expensesCtx, { appState.expensesChartInstance = new Chart(expensesCtx, {
type: "doughnut", type: "doughnut",
data: { data: {
labels: ["Salarios", "Otros gastos"], labels: ["Salarios", "Otros gastos", "Envelope"],
datasets: [ datasets: [
{ {
data: [totalWages, totalInternal], data: [totalWages, totalInternal, totalEnvelope],
backgroundColor: ["#F59E0B", "#EF4444"], backgroundColor: ["#F59E0B", "#EF4444", "#3B82F6"],
}, },
], ],
}, },
@ -930,7 +934,7 @@ function showReportModal(report, isAdmin = false) {
<div class="flex justify-between"><strong>Gastos totales:</strong> <span>${safeToFixed( <div class="flex justify-between"><strong>Gastos totales:</strong> <span>${safeToFixed(
report.totalExpenses report.totalExpenses
)}</span></div> )}</span></div>
<div class="flex justify-between"><strong>Sobre:</strong> <span>${safeToFixed( <div class="flex justify-between"><strong>Envelope:</strong> <span>${safeToFixed(
report.envelope report.envelope
)}</span></div> )}</span></div>
<div class="flex justify-between border-t pt-2 text-lg font-bold text-blue-700"> <div class="flex justify-between border-t pt-2 text-lg font-bold text-blue-700">