Commit 86200717 authored by Pavel Mashliakovskiy's avatar Pavel Mashliakovskiy 🤹🏻

Merge branch 'lookups_getEnum' into 'master'

`lookups`: new helper method `getEnum`

See merge request !819
parents d47671c9 20323e11
Pipeline #21723 skipped with stage
......@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- in case `accept` prop is not empty then allowed file types displayed after `placeholder`
- `v-model` support
- `UToolbar`: handler for `showAccessRights` action added for entites with aclRls mixin
- `lookups` new helper method `getEnum`. It has 2 params `eGroup`, `code`. Example: `this.$lookups.getEnum('AUDIT', 'INSERT')`
### Changed
......
......@@ -209,7 +209,18 @@ const lookupsModule = {
* @param {number} ID
* @returns {*}
*/
getDescriptionById: instance.getDescriptionById
getDescriptionById: instance.getDescriptionById,
/**
* Helper for short calling of enum values
*
* @param {string} eGroup
* @param {string} code
* @returns {string|null}
*/
getEnum (eGroup, code) {
return instance.get(ENUM_ENTITY, { eGroup, code })
}
}
module.exports = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment