This commit is contained in:
@@ -28,8 +28,9 @@ export default {
|
||||
//////////////////////////////////
|
||||
//
|
||||
// Used by forms to fetch selection list data
|
||||
// Sorts alphabetically by default but can be turned off with do not sort
|
||||
//
|
||||
getSelectionList(enumKey) {
|
||||
getSelectionList(enumKey, doNotSort) {
|
||||
enumKey = enumKey.toLowerCase();
|
||||
let e = window.$gz.store.state.enums[enumKey];
|
||||
if (!e) {
|
||||
@@ -42,7 +43,12 @@ export default {
|
||||
window.$gz._.forOwn(e, function(value, key) {
|
||||
ret.push({ id: Number(key), name: value });
|
||||
});
|
||||
return ret;
|
||||
|
||||
if (doNotSort == true) {
|
||||
return ret;
|
||||
} else {
|
||||
return window.$gz._.sortBy(ret, "name");
|
||||
}
|
||||
},
|
||||
///////////////////////////////////
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user