diff --git a/frontend/src/components/MercadoAgroCardWidget.tsx b/frontend/src/components/MercadoAgroCardWidget.tsx index f64656b..3455e7c 100644 --- a/frontend/src/components/MercadoAgroCardWidget.tsx +++ b/frontend/src/components/MercadoAgroCardWidget.tsx @@ -10,7 +10,7 @@ import CloseIcon from '@mui/icons-material/Close'; import type { CotizacionGanado } from '../models/mercadoModels'; import { useApiData } from '../hooks/useApiData'; -import { formatCurrency, formatInteger } from '../utils/formatters'; +import { formatCurrency, formatInteger, formatDateOnly } from '../utils/formatters'; import { AgroHistoricalChartWidget } from './AgroHistoricalChartWidget'; // El subcomponente ahora tendrá un botón para el gráfico. @@ -61,17 +61,24 @@ const AgroCard = ({ registro, onChartClick }: { registro: CotizacionGanado, onCh ${formatCurrency(registro.mediano)} - - - - {formatInteger(registro.cabezas)} - Cabezas - - - - {formatInteger(registro.kilosTotales)} - Kilos + {/* Pie de la tarjeta */} + + + + + {formatInteger(registro.cabezas)} + Cabezas + + + + {formatInteger(registro.kilosTotales)} + Kilos + + + + Dato Registrado el {formatDateOnly(registro.fechaRegistro)} + ); diff --git a/frontend/src/components/MercadoAgroWidget.tsx b/frontend/src/components/MercadoAgroWidget.tsx index 1c27d4a..4770da3 100644 --- a/frontend/src/components/MercadoAgroWidget.tsx +++ b/frontend/src/components/MercadoAgroWidget.tsx @@ -6,7 +6,6 @@ import type { CotizacionGanado } from '../models/mercadoModels'; import { useApiData } from '../hooks/useApiData'; import { formatCurrency, formatInteger, formatFullDateTime } from '../utils/formatters'; -// --- V INICIO DE LA MODIFICACIÓN V --- // El sub-componente ahora solo necesita renderizar la tarjeta de móvil. // La fila de la tabla la haremos directamente en el componente principal. const AgroDataCard = ({ row }: { row: CotizacionGanado }) => { @@ -56,7 +55,6 @@ const AgroDataCard = ({ row }: { row: CotizacionGanado }) => { ); }; -// --- ^ FIN DE LA MODIFICACIÓN ^ --- export const MercadoAgroWidget = () => {