error hora tope

This commit is contained in:
lemuel 2022-08-17 18:27:08 -05:00
parent fdad0bbe88
commit 3e05fee249

View File

@ -192,17 +192,18 @@ export class PrestamoService {
throw new ConflictException( 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.', '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); return this.equipoService.update(equipo, null, 2);
}) })
.then(({ equipo }) => .then(({ equipo }) =>
this.repository.save( this.repository.save(
this.repository.create({ this.repository.create({
equipo, equipo,
fecha_inicio: ahora.toDate(), fecha_inicio: ahora.format(),
hora_max_recoger: hora_max_recoger:
ahora > horaMax && ahora < horaExtra ahora > horaMax && ahora < horaExtra
? horaTope ? horaTope.format()
: ahora.add(modulo.institucion.tiempo_recoger, 'm').toDate(), : ahora.add(modulo.institucion.tiempo_recoger, 'm').format(),
operadorEntrega: sistema, operadorEntrega: sistema,
operadorRegreso: sistema, operadorRegreso: sistema,
usuario, usuario,