From 1e90b5ae004a72f8c63679d6eec89592ead0a7bf Mon Sep 17 00:00:00 2001 From: jgallego Date: Thu, 11 Apr 2019 12:44:43 +0200 Subject: [PATCH] =?UTF-8?q?a=C3=B1ade=20opcion=20mana=20con=20permisos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/claim/back/methods/claim/updateClaim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/claim/back/methods/claim/updateClaim.js b/modules/claim/back/methods/claim/updateClaim.js index d177ac050..66b409d09 100644 --- a/modules/claim/back/methods/claim/updateClaim.js +++ b/modules/claim/back/methods/claim/updateClaim.js @@ -41,7 +41,7 @@ module.exports = Self => { let notModifiable = ['id', 'responsibility', 'isChargedToMana']; let changedFields = diff(oldClaim, params); let changedFieldsPicked = pick(changedFields, notModifiable); - let statesViables = ['Gestionado', 'Pendiente', 'Anulado']; + let statesViables = ['Gestionado', 'Pendiente', 'Anulado', 'Mana']; let oldState = await models.ClaimState.findOne({where: {id: oldClaim.claimStateFk}}); let newState = await models.ClaimState.findOne({where: {id: params.claimStateFk}}); let canChangeState = statesViables.includes(oldState.description)