update servicio actualizar status si se manda carta termino o informe global
This commit is contained in:
@@ -79,6 +79,11 @@ const update = async (body, files) => {
|
||||
);
|
||||
return Servicio.update(dataUpdate, { where: { idServicio } });
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (dataUpdate.cartaTermino || dataUpdate.informeGlobal)
|
||||
return validar.validarPreTermino(idServicio);
|
||||
return false;
|
||||
})
|
||||
.then((res) => ({
|
||||
message: 'Se guardo correctamente los cambios de este servicio.',
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user