listo
This commit is contained in:
+4
-4
@@ -10,14 +10,14 @@ import { Socket, Server } from 'socket.io';
|
||||
@WebSocketGateway({
|
||||
cors: {
|
||||
origin: [
|
||||
'http://localhost:3176',
|
||||
'http://localhost:3186',
|
||||
// 'http://localhost:3176',
|
||||
// 'http://localhost:3186',
|
||||
// 'http://132.248.80.196:3155',
|
||||
// 'http://132.248.80.196:3185',
|
||||
// 'https://pmodulospcpuma.unam.mx',
|
||||
// 'https://pmodulospcpuma.unam.mx:3015',
|
||||
// 'https://modulospcpuma.unam.mx',
|
||||
// 'https://modulospcpuma.unam.mx:3015',
|
||||
'https://modulospcpuma.unam.mx',
|
||||
'https://modulospcpuma.unam.mx:3015',
|
||||
],
|
||||
},
|
||||
})
|
||||
|
||||
@@ -75,7 +75,7 @@ export class PrestamoService {
|
||||
motivo: string,
|
||||
modulo: Modulo,
|
||||
) {
|
||||
const ahora = moment().add(14, 'h');
|
||||
const ahora = moment();
|
||||
const prestamo = await this.findById(id_prestamo);
|
||||
|
||||
this.validacionBasicaPrestamo(prestamo);
|
||||
@@ -104,7 +104,7 @@ export class PrestamoService {
|
||||
}
|
||||
|
||||
async cancelarUsuario(usuario: Usuario) {
|
||||
const ahora = moment().add(14, 'h');
|
||||
const ahora = moment();
|
||||
const prestamo = await this.prestamoInfoByUsuario(usuario);
|
||||
|
||||
this.validacionBasicaPrestamo(prestamo);
|
||||
@@ -139,7 +139,7 @@ export class PrestamoService {
|
||||
id_programa?: number,
|
||||
id_tipo_entrada?: number,
|
||||
) {
|
||||
const ahora = moment().add(14, 'h');
|
||||
const ahora = moment();
|
||||
const ahoraStr = ahora.format('YYYY-MM-DD');
|
||||
const sistema = { id_operador: 1 };
|
||||
const modulo = await this.moduloService.findFullInfoById(id_modulo);
|
||||
@@ -256,7 +256,7 @@ export class PrestamoService {
|
||||
}
|
||||
|
||||
async desactivarPrestamos() {
|
||||
const ahora = moment().add(14, 'h');
|
||||
const ahora = moment();
|
||||
|
||||
// Busco todos los préstamos activos y que esten apartadoss
|
||||
return this.informacionPrestamoView
|
||||
@@ -294,7 +294,7 @@ export class PrestamoService {
|
||||
modulo: Modulo,
|
||||
id_prestamo: number,
|
||||
) {
|
||||
const ahora = moment().add(14, 'h');
|
||||
const ahora = moment();
|
||||
const ahoraStr = ahora.format('YYYY-MM-DD');
|
||||
const prestamo = await this.findById(id_prestamo);
|
||||
const institucionDia =
|
||||
@@ -779,7 +779,7 @@ export class PrestamoService {
|
||||
descripcion?: string,
|
||||
id_institucion_infraccion?: number,
|
||||
) {
|
||||
const ahora = moment().add(14, 'h');
|
||||
const ahora = moment();
|
||||
// La resta ahora - hora_fin nos da la cantidad de tiempo que se paso el usuario
|
||||
// en entregar el equipo a tiempo. Si es negativa es que fue antes de la hora_fin
|
||||
const tardanza = Math.trunc(ahora.diff(moment(prestamo.hora_fin)) / 60000);
|
||||
|
||||
Reference in New Issue
Block a user