fuckin amazon
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user