fuckin amazon

This commit is contained in:
arturo
2020-09-17 01:42:30 -05:00
52 changed files with 99 additions and 7564 deletions
+3 -2
View File
@@ -56,6 +56,7 @@ export class PrestamoController {
prestamo.equipo = equipo
prestamo.usuario = usuario
prestamo.tipo = 'equipo'
const m = moment()
.add({ hours: 2, minutes: 35 })
.toLocaleString()
@@ -127,14 +128,14 @@ export class PrestamoController {
res.status(400).json({ err: 'Operador no encontrado' })
}
if (!prestamo.usuario.interno) {
if (prestamo.usuario.tipoUsuario.nombre === 'usuario_externo') {
prestamo.mesa.activo = false
}
prestamo.activo = false
prestamo.equipo.activo = false
prestamo.operadorRegreso = operador
try {
if (!prestamo.usuario.interno) {
if (prestamo.usuario.tipoUsuario.nombre === 'usuario_externo') {
await mesaRepository.save(prestamo.mesa)
}
await equipoRepository.save(prestamo.equipo)