diff --git a/server/controller/Prestamo/activos.js b/server/controller/Prestamo/activos.js index 0573811..f5e2f47 100644 --- a/server/controller/Prestamo/activos.js +++ b/server/controller/Prestamo/activos.js @@ -52,6 +52,7 @@ const activos = async (body) => { ], limit: 25, offset: 25 * (pagina - 1), + order: [['createdAt', 'DESC']], }); }) .then((res) => { diff --git a/server/controller/Prestamo/historial.js b/server/controller/Prestamo/historial.js index 78f854e..93793ea 100644 --- a/server/controller/Prestamo/historial.js +++ b/server/controller/Prestamo/historial.js @@ -58,7 +58,7 @@ const historial = async (body) => { ], limit: 25, offset: 25 * (pagina - 1), - // order: [['createdAt', 'DESC']], + order: [['createdAt', 'DESC']], }).then((res) => { for (let i = 0; i < res.rows.length; i++) { delete res.rows[i].dataValues.idUsuario; diff --git a/server/controller/Prestamo/historialEquipo.js b/server/controller/Prestamo/historialEquipo.js index 33f0f91..7e42de5 100644 --- a/server/controller/Prestamo/historialEquipo.js +++ b/server/controller/Prestamo/historialEquipo.js @@ -20,6 +20,7 @@ const historialEquipo = async (body) => { ], limit: 25, offset: 25 * (pagina - 1), + order: [['createdAt', 'DESC']], }).then((res) => { for (let i = 0; i < res.rows.length; i++) { delete res.rows[i].dataValues.idUsuario; diff --git a/server/controller/Prestamo/historialUsuario.js b/server/controller/Prestamo/historialUsuario.js index 22808a9..be3e9a3 100644 --- a/server/controller/Prestamo/historialUsuario.js +++ b/server/controller/Prestamo/historialUsuario.js @@ -31,6 +31,7 @@ const historialUsuario = async (body) => { ], limit: 25, offset: 25 * (pagina - 1), + order: [['createdAt', 'DESC']], }).then((res) => { for (let i = 0; i < res.rows.length; i++) { delete res.rows[i].dataValues.idOperadorEntrega;