añade opcion mana con permisos
gitea/salix/master This commit looks good Details

This commit is contained in:
Javi Gallego 2019-04-11 12:44:43 +02:00 committed by Joan Sanchez
parent bed6721643
commit 1e90b5ae00
1 changed files with 1 additions and 1 deletions

View File

@ -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)