From 3e05fee2490cae3c94fd38a45a46a772b2a71e65 Mon Sep 17 00:00:00 2001 From: lemuel Date: Wed, 17 Aug 2022 18:27:08 -0500 Subject: [PATCH] error hora tope --- src/prestamo/prestamo.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/prestamo/prestamo.service.ts b/src/prestamo/prestamo.service.ts index 7c58d61..ad3c70b 100644 --- a/src/prestamo/prestamo.service.ts +++ b/src/prestamo/prestamo.service.ts @@ -192,17 +192,18 @@ export class PrestamoService { throw new ConflictException( 'No hay un equipo de cómputo que cumpla con las caracteríasticas solicitadas o ya no hay equipos disponibles en este momento. Intenta más tarde o cambia las características.', ); + console.log('hola'); return this.equipoService.update(equipo, null, 2); }) .then(({ equipo }) => this.repository.save( this.repository.create({ equipo, - fecha_inicio: ahora.toDate(), + fecha_inicio: ahora.format(), hora_max_recoger: ahora > horaMax && ahora < horaExtra - ? horaTope - : ahora.add(modulo.institucion.tiempo_recoger, 'm').toDate(), + ? horaTope.format() + : ahora.add(modulo.institucion.tiempo_recoger, 'm').format(), operadorEntrega: sistema, operadorRegreso: sistema, usuario,