This commit is contained in:
@@ -30,7 +30,7 @@ export default {
|
|||||||
// Used by forms to fetch selection list data
|
// Used by forms to fetch selection list data
|
||||||
// Sorts alphabetically by default but can be turned off with do not sort
|
// Sorts alphabetically by default but can be turned off with do not sort
|
||||||
//
|
//
|
||||||
getSelectionList(enumKey) {
|
getSelectionList(enumKey, noSort) {
|
||||||
enumKey = enumKey.toLowerCase();
|
enumKey = enumKey.toLowerCase();
|
||||||
let e = window.$gz.store.state.enums[enumKey];
|
let e = window.$gz.store.state.enums[enumKey];
|
||||||
if (!e) {
|
if (!e) {
|
||||||
@@ -42,19 +42,14 @@ export default {
|
|||||||
}
|
}
|
||||||
let ret = [];
|
let ret = [];
|
||||||
|
|
||||||
//de-lodash
|
|
||||||
// //turn it into an array suitable for selection lists
|
|
||||||
// window.$gz. _.forOwn(e, function(value, key) {
|
|
||||||
// ret.push({ id: Number(key), name: value });
|
|
||||||
// });
|
|
||||||
//return window.$gz. _.sortBy(ret, "name");
|
|
||||||
|
|
||||||
//turn it into an array suitable for selection lists
|
//turn it into an array suitable for selection lists
|
||||||
for (const [key, value] of Object.entries(e)) {
|
for (const [key, value] of Object.entries(e)) {
|
||||||
ret.push({ id: Number(key), name: value });
|
ret.push({ id: Number(key), name: value });
|
||||||
}
|
}
|
||||||
//sort by name
|
//sort by name
|
||||||
ret.sort(window.$gz.util.sortByKey("name"));
|
if (!noSort) {
|
||||||
|
ret.sort(window.$gz.util.sortByKey("name"));
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
export default {
|
export default {
|
||||||
async created() {
|
async created() {
|
||||||
await window.$gz.enums.fetchEnumList("AyaDaysOfWeek");
|
await window.$gz.enums.fetchEnumList("AyaDaysOfWeek");
|
||||||
this.daysOfWeek = window.$gz.enums.getSelectionList("AyaDaysOfWeek");
|
this.daysOfWeek = window.$gz.enums.getSelectionList("AyaDaysOfWeek", true);
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -2180,7 +2180,10 @@ async function populateSelectionLists(vm) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await window.$gz.enums.fetchEnumList("PMTimeUnit"); //prefetch
|
await window.$gz.enums.fetchEnumList("PMTimeUnit"); //prefetch
|
||||||
vm.selectLists.pmTimeUnits = window.$gz.enums.getSelectionList("PMTimeUnit");
|
vm.selectLists.pmTimeUnits = window.$gz.enums.getSelectionList(
|
||||||
|
"PMTimeUnit",
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
await window.$gz.enums.fetchEnumList("LoanUnitRateUnit"); //prefetch
|
await window.$gz.enums.fetchEnumList("LoanUnitRateUnit"); //prefetch
|
||||||
vm.selectLists.loanUnitRateUnits = window.$gz.enums.getSelectionList(
|
vm.selectLists.loanUnitRateUnits = window.$gz.enums.getSelectionList(
|
||||||
|
|||||||
Reference in New Issue
Block a user