Skip to content

Commit

Permalink
Refactor Pagos component to display alumno's name in the table
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelmarain committed Oct 16, 2024
1 parent 46396e7 commit 082783b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Pago = {
};

type Alumno = {
nombre: string;
total: number;
pagos: Pago[];
};
Expand Down Expand Up @@ -97,7 +98,7 @@ export default function Pagos() {
<Tbody>
{Object.keys(data.alumnos).map((dni) => (
<Tr key={dni}>
<Td textAlign="center" ></Td>
<Td textAlign="center" > {data.alumnos[dni].nombre}</Td>
<Td textAlign="center" >{new Intl.NumberFormat('es-ES').format(parseInt(dni))}</Td>
<Td textAlign="center" >{ "$ " + new Intl.NumberFormat('es-ES').format(data.alumnos[dni].total)}</Td>
<Td textAlign="center" >
Expand Down

0 comments on commit 082783b

Please sign in to comment.