listo laboratorio movil

This commit is contained in:
2022-10-31 01:32:16 -06:00
parent 0e153eb2f5
commit be7e3454cb
7 changed files with 29 additions and 6 deletions
+4 -4
View File
@@ -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',
],
},
})
@@ -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,
}),
);
}
@@ -8,6 +8,9 @@ export class CarritoMotivoOutputDto {
@Expose()
fecha_creacion;
@Expose()
laboratorioMovil;
@Expose()
motivo;
@@ -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;
+7 -1
View File
@@ -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,
);
}
}
+7 -1
View File
@@ -222,7 +222,12 @@ export class CarritoService {
});
}
async update(operador: Operador, attrs: Partial<Carrito>, motivo: string) {
async update(
operador: Operador,
attrs: Partial<Carrito>,
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.' }));
+3
View File
@@ -13,6 +13,9 @@ export class UpdateCarritoDto {
@IsBoolean()
activo: boolean;
@IsBoolean()
laboratorioMovil: boolean;
@IsString()
@IsNotEmpty()
@MaxLength(250)