sincronizacion con main y demas

This commit is contained in:
Olivia Mestre Llobell 2026-02-06 19:37:43 +01:00
parent a9cd1da63d
commit 40a1cbe66b
2 changed files with 6 additions and 6 deletions

View File

@ -15,9 +15,9 @@ const STATUS_COLORS = {
}; };
const DEFAULT_DATA = { const DEFAULT_DATA = {
draft: 1200.50, draft: 3,
unpaid: 3400.00, unpaid: 5,
paid: 8500.75 paid: 12
}; };
export function renderInvoiceStatusChart(data = DEFAULT_DATA) { export function renderInvoiceStatusChart(data = DEFAULT_DATA) {
@ -46,6 +46,7 @@ export function renderInvoiceStatusChart(data = DEFAULT_DATA) {
options: { options: {
responsive: true, responsive: true,
maintainAspectRatio: true, maintainAspectRatio: true,
aspectRatio: 1.5,
plugins: { plugins: {
legend: { legend: {
position: 'bottom', position: 'bottom',
@ -59,8 +60,7 @@ export function renderInvoiceStatusChart(data = DEFAULT_DATA) {
tooltip: { tooltip: {
callbacks: { callbacks: {
label: (ctx) => { label: (ctx) => {
const value = ctx.parsed.toLocaleString('es-ES', { minimumFractionDigits: 2 }); return ` ${ctx.label}: ${ctx.parsed}`;
return ` ${ctx.label}: ${value} €`;
} }
} }
} }

View File

@ -12,7 +12,7 @@ const statsConfig = [
<line x1="12" y1="17" x2="12" y2="21"></line> <line x1="12" y1="17" x2="12" y2="21"></line>
</svg>`, </svg>`,
iconBg: '#374151', iconBg: '#374151',
valueColor: '#3b82f6', valueColor: '#1f2937',
subtitle: 'Este mes', subtitle: 'Este mes',
formatValue: (val) => `${val.toLocaleString('es-ES', { minimumFractionDigits: 2 })} €` formatValue: (val) => `${val.toLocaleString('es-ES', { minimumFractionDigits: 2 })} €`
}, },