feat: múltiples mejoras y correcciones
- Agrega SecMapa con visualización geográfica de siniestros - Actualiza exportación a PDF con nuevas secciones - Corrige colores de interfaz (modo claro/oscuro) - Corrige cálculo de víctimas fatales en SecSintesis usando campo 'fallecidos' - Corrige serie histórica para reflejar año filtrado correctamente
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
// src/components/ui/ChartCard.jsx
|
||||
const HEIGHTS = {
|
||||
sm: 'h-[300px]',
|
||||
md: 'h-[360px]',
|
||||
lg: 'h-[420px]',
|
||||
sm: 'h-[300px]',
|
||||
md: 'h-[360px]',
|
||||
lg: 'h-[420px]',
|
||||
auto: '',
|
||||
}
|
||||
|
||||
@@ -15,10 +14,13 @@ export default function ChartCard({
|
||||
className = '',
|
||||
contentClassName = '',
|
||||
}) {
|
||||
const isFixed = height !== 'auto'
|
||||
|
||||
return (
|
||||
<section
|
||||
data-pdf-block // ← única línea nueva
|
||||
className={`rounded-[28px] border border-opsv-border bg-opsv-surface p-6 shadow-sm overflow-hidden ${className}`}
|
||||
data-pdf-block
|
||||
className={`rounded-[28px] border border-opsv-border bg-opsv-surface p-6 shadow-sm ${className}`}
|
||||
// ← overflow-hidden ELIMINADO del section
|
||||
>
|
||||
{(kicker || title || subtitle) && (
|
||||
<header className="mb-5">
|
||||
@@ -39,7 +41,12 @@ export default function ChartCard({
|
||||
)}
|
||||
</header>
|
||||
)}
|
||||
<div className={`min-w-0 w-full ${HEIGHTS[height]} ${contentClassName}`}>
|
||||
{/* overflow-hidden solo en el div del contenido cuando altura es fija */}
|
||||
<div
|
||||
className={`min-w-0 w-full ${HEIGHTS[height]} ${
|
||||
isFixed ? 'overflow-hidden' : ''
|
||||
} ${contentClassName}`}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -4,35 +4,24 @@ export default function KPICard({
|
||||
color,
|
||||
unit,
|
||||
variation,
|
||||
centered = false,
|
||||
}) {
|
||||
const formattedValue =
|
||||
typeof value === 'number' ? value.toLocaleString('es-AR') : value
|
||||
|
||||
return (
|
||||
<div className="rounded-[28px] border border-opsv-border bg-opsv-surface p-6 shadow-sm">
|
||||
<div
|
||||
className={`flex items-start justify-between gap-4 ${
|
||||
centered ? 'flex-col items-center text-center' : ''
|
||||
}`}
|
||||
>
|
||||
<div className={centered ? 'flex flex-col items-center' : ''}>
|
||||
<div className="flex flex-col items-center text-center gap-4">
|
||||
<div className="flex flex-col items-center">
|
||||
<div
|
||||
className="text-3xl font-black text-opsv-navy"
|
||||
style={color ? { color } : undefined}
|
||||
>
|
||||
{formattedValue}
|
||||
{unit ? (
|
||||
<span className="text-base font-semibold text-opsv-muted">
|
||||
{' '}
|
||||
{unit}
|
||||
</span>
|
||||
<span className="text-base font-semibold text-opsv-muted"> {unit}</span>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
<p className="mt-3 text-sm text-opsv-muted">
|
||||
{label}
|
||||
</p>
|
||||
<p className="mt-3 text-sm text-opsv-muted">{label}</p>
|
||||
</div>
|
||||
|
||||
{variation ? (
|
||||
|
||||
Reference in New Issue
Block a user