listo antes de agregar passcode
This commit is contained in:
@@ -63,7 +63,6 @@ export class JwtStrategyService extends PassportStrategy(Strategy) {
|
||||
);
|
||||
}
|
||||
user.operador = operador;
|
||||
console.log(user.operador);
|
||||
});
|
||||
// Este objeto retornado se encuentra en el objeto request
|
||||
// (El ojbeto que recibe toda la información de la petición)
|
||||
|
||||
@@ -5,6 +5,7 @@ import { FindOptionsWhere, Like, Repository } from 'typeorm';
|
||||
import { Multa } from './entity/multa.entity';
|
||||
import { FullInformacionMultaView } from './entity/views/full-informacion-multa.view';
|
||||
import { InformacionMultaView } from './entity/views/informacion-multa.view';
|
||||
import { Modulo } from '../modulo/entity/modulo.entity';
|
||||
import { Operador } from '../operador/entity/operador.entity';
|
||||
import { Prestamo } from '../prestamo/entity/prestamo.entity';
|
||||
import { Usuario } from '../usuario/entity/usuario.entity';
|
||||
@@ -33,6 +34,7 @@ export class MultaService {
|
||||
|
||||
async create(
|
||||
operadorMulta: Operador,
|
||||
modulo: Modulo,
|
||||
prestamo: Prestamo,
|
||||
descripcion: string,
|
||||
retraso?: number,
|
||||
|
||||
@@ -755,7 +755,7 @@ export class PrestamoService {
|
||||
const tardanza = Math.trunc(ahora.diff(moment(prestamo.hora_fin)) / 60000);
|
||||
// Minutos que se tardo entre el tiempo configurable de la institución
|
||||
const semanasCastigo = Math.trunc(
|
||||
tardanza / operadorRegreso.institucion.tiempo_entrega,
|
||||
tardanza / modulo.institucion.tiempo_entrega,
|
||||
);
|
||||
|
||||
this.validacionBasicaPrestamo(prestamo);
|
||||
@@ -782,6 +782,7 @@ export class PrestamoService {
|
||||
if (id_institucion_infraccion)
|
||||
await this.multaService.create(
|
||||
operadorRegreso,
|
||||
modulo,
|
||||
prestamo,
|
||||
`${mensajeTardanza} ${descripcion}`,
|
||||
semanasCastigo,
|
||||
@@ -791,6 +792,7 @@ export class PrestamoService {
|
||||
else
|
||||
await this.multaService.create(
|
||||
operadorRegreso,
|
||||
modulo,
|
||||
prestamo,
|
||||
mensajeTardanza,
|
||||
semanasCastigo,
|
||||
@@ -800,6 +802,7 @@ export class PrestamoService {
|
||||
// el usuario solo solo daño el equipo
|
||||
await this.multaService.create(
|
||||
operadorRegreso,
|
||||
modulo,
|
||||
prestamo,
|
||||
descripcion,
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user