Skip to content

Commit

Permalink
addAction (#470)
Browse files Browse the repository at this point in the history
* addAction

* minimal change

* minimal change
  • Loading branch information
elsiosanchez committed Apr 29, 2020
1 parent efe5f49 commit b45619f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/ADempiere/Form/formMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ export default {
withOutColumnNames,
isChangedAllValues: true
})
},
addAction(action) {
this.$store.dispatch('addAction', {
name: action.name,
action: action.action,
containerUuid: this.metadata.containerUuid
})
}
}
}
3 changes: 3 additions & 0 deletions src/store/modules/ADempiere/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ const contextMenu = {
references
})
},
addAction({ state }, newAction) {
newAction.push(state.contextMenu.actions)
},
/**
* TODO: Verify tableName params to change in constant
* @param {number} recordId
Expand Down

0 comments on commit b45619f

Please sign in to comment.