From 67a23bcef06a6ea1afe0bc67d280fde8e4796b67 Mon Sep 17 00:00:00 2001 From: xXpuma99Xx <51341582+xXpuma99Xx@users.noreply.github.com> Date: Tue, 18 Jan 2022 06:45:12 -0600 Subject: [PATCH] update servicio actualizar status si se manda carta termino o informe global --- server/controller/Servicio/update.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/controller/Servicio/update.js b/server/controller/Servicio/update.js index 4043ecb..cbac17f 100644 --- a/server/controller/Servicio/update.js +++ b/server/controller/Servicio/update.js @@ -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.', }));