diff --git a/src/app.gateway.ts b/src/app.gateway.ts index 30e4317..8697a5e 100644 --- a/src/app.gateway.ts +++ b/src/app.gateway.ts @@ -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', ], }, }) diff --git a/src/carrito-motivo/carrito-motivo.service.ts b/src/carrito-motivo/carrito-motivo.service.ts index bf6d7d2..59bdb42 100644 --- a/src/carrito-motivo/carrito-motivo.service.ts +++ b/src/carrito-motivo/carrito-motivo.service.ts @@ -21,6 +21,7 @@ export class CarritoMotivoService { operador: Operador, status: boolean, motivo: string, + laboratorioMovil: boolean, ) { const ahora = moment(); @@ -32,6 +33,7 @@ export class CarritoMotivoService { motivo, operador, status, + laboratorioMovil, }), ); } diff --git a/src/carrito-motivo/dto/output/carrito-motivo.dto.ts b/src/carrito-motivo/dto/output/carrito-motivo.dto.ts index 629d731..693ae0f 100644 --- a/src/carrito-motivo/dto/output/carrito-motivo.dto.ts +++ b/src/carrito-motivo/dto/output/carrito-motivo.dto.ts @@ -8,6 +8,9 @@ export class CarritoMotivoOutputDto { @Expose() fecha_creacion; + @Expose() + laboratorioMovil; + @Expose() motivo; diff --git a/src/carrito-motivo/entity/carrito-motivo.entity.ts b/src/carrito-motivo/entity/carrito-motivo.entity.ts index 8f3f21e..9367d8f 100644 --- a/src/carrito-motivo/entity/carrito-motivo.entity.ts +++ b/src/carrito-motivo/entity/carrito-motivo.entity.ts @@ -16,6 +16,9 @@ export class CarritoMotivo { @Column({ type: Date, nullable: false }) fecha_creacion: Date; + @Column({ type: Boolean, nullable: false, default: false }) + laboratorioMovil: boolean; + @Column({ type: String, nullable: false, length: 250 }) motivo: string; diff --git a/src/carrito/carrito.controller.ts b/src/carrito/carrito.controller.ts index 9b75065..e47d169 100644 --- a/src/carrito/carrito.controller.ts +++ b/src/carrito/carrito.controller.ts @@ -184,6 +184,12 @@ export class CarritoController { this.validarUsuarioService.validarAdminOperador(operador); delete data.motivo; - return this.carritoService.update(operador, data, body.motivo); + delete data.laboratorioMovil; + return this.carritoService.update( + operador, + data, + body.motivo, + body.laboratorioMovil, + ); } } diff --git a/src/carrito/carrito.service.ts b/src/carrito/carrito.service.ts index e8a78a3..58bc298 100644 --- a/src/carrito/carrito.service.ts +++ b/src/carrito/carrito.service.ts @@ -222,7 +222,12 @@ export class CarritoService { }); } - async update(operador: Operador, attrs: Partial, motivo: string) { + async update( + operador: Operador, + attrs: Partial, + motivo: string, + laboratorioMovil: boolean, + ) { return this.findById(attrs.id_carrito) .then(async (carrito) => { // Valido que el carrito pertenezca a la institución del operador @@ -245,6 +250,7 @@ export class CarritoService { operador, attrs.activo, motivo, + laboratorioMovil, ), ) .then((_) => ({ message: 'Se guardaron los cambios correctamente.' })); diff --git a/src/carrito/dto/input/update.dto.ts b/src/carrito/dto/input/update.dto.ts index 84b8d4a..ab17dfc 100644 --- a/src/carrito/dto/input/update.dto.ts +++ b/src/carrito/dto/input/update.dto.ts @@ -13,6 +13,9 @@ export class UpdateCarritoDto { @IsBoolean() activo: boolean; + @IsBoolean() + laboratorioMovil: boolean; + @IsString() @IsNotEmpty() @MaxLength(250)