This commit is contained in:
@@ -658,7 +658,7 @@ export default {
|
||||
|
||||
//add only if not already in the collection (accidental double click)
|
||||
//de-lodash
|
||||
// if (!window.$gz._.find(item.filter.items, filterItem)) {
|
||||
// if (!window.$gz. _.find(item.filter.items, filterItem)) {
|
||||
|
||||
//some fits better here as it only test for truthiness and returns immediately on true
|
||||
//also the item is unique and display doesn't need to be compared for equality it's irrelevant
|
||||
@@ -1297,8 +1297,9 @@ function initDataObject(vm) {
|
||||
//Pass 1, iterate the listview first
|
||||
for (let i = 0; i < vm.effectiveListView.length; i++) {
|
||||
let lvItem = vm.effectiveListView[i];
|
||||
|
||||
let fld = window.$gz._.find(vm.fieldDefinitions, ["fieldKey", lvItem.fld]);
|
||||
//de-lodash
|
||||
//let fld = window.$gz. _.find(vm.fieldDefinitions, ["fieldKey", lvItem.fld]);
|
||||
let fld = vm.fieldDefinitions.find(z => z.fieldKey == lvItem.fld);
|
||||
let o = {
|
||||
key: fld.fieldKey,
|
||||
title: vm.$ay.t(fld.tKey),
|
||||
@@ -1344,7 +1345,9 @@ function initDataObject(vm) {
|
||||
let fld = vm.fieldDefinitions[i];
|
||||
|
||||
//is this field already in ret array?
|
||||
if (null == window.$gz._.find(ret, ["key", fld.fieldKey])) {
|
||||
//de-lodash
|
||||
// if (null == window.$gz. _.find(ret, ["key", fld.fieldKey])) {
|
||||
if (null == ret.find(z => z.key == fld.fieldKey)) {
|
||||
//nope, so add it
|
||||
let o = {
|
||||
key: fld.fieldKey,
|
||||
@@ -1433,23 +1436,34 @@ function getDisplayForFilter(
|
||||
) {
|
||||
//BLANKS FILTER
|
||||
if (filterOperator == "=" && filterValue == "*NULL*") {
|
||||
return window.$gz._.find(vm.selectLists.stringFilterOperators, {
|
||||
id: "*NOVALUE*"
|
||||
}).name;
|
||||
//de-lodash
|
||||
// return window.$gz. _.find(vm.selectLists.stringFilterOperators, {
|
||||
// id: "*NOVALUE*"
|
||||
// }).name;
|
||||
return vm.selectLists.stringFilterOperators.find(z => z.id == "*NOVALUE*")
|
||||
.name;
|
||||
}
|
||||
// NONBLANKS FILTER
|
||||
if (filterOperator == "!=" && filterValue == "*NULL*") {
|
||||
return window.$gz._.find(vm.selectLists.stringFilterOperators, {
|
||||
id: "*HASVALUE*"
|
||||
}).name;
|
||||
//de-lodash
|
||||
// return window.$gz. _.find(vm.selectLists.stringFilterOperators, {
|
||||
// id: "*HASVALUE*"
|
||||
// }).name;
|
||||
return vm.selectLists.stringFilterOperators.find(z => z.id == "*HASVALUE*")
|
||||
.name;
|
||||
}
|
||||
|
||||
//DATE RELATIVE TOKEN FILTER
|
||||
if (uiFieldDataType === 1 && filterValue[0] == "*") {
|
||||
let valueDisplay = window.$gz._.find(vm.selectLists.dateFilterTokens, {
|
||||
id: filterValue
|
||||
}).name;
|
||||
let opDisplay = filterOperator;
|
||||
//de-lodash
|
||||
// let valueDisplay = window.$gz. _.find(vm.selectLists.dateFilterTokens, {
|
||||
// id: filterValue
|
||||
// }).name;
|
||||
|
||||
let valueDisplay = vm.selectLists.dateFilterTokens.find(
|
||||
z => z.id == filterValue
|
||||
).name;
|
||||
|
||||
return filterOperator + " " + valueDisplay;
|
||||
}
|
||||
|
||||
@@ -1490,9 +1504,14 @@ function getDisplayForFilter(
|
||||
}
|
||||
|
||||
//Operator
|
||||
let opDisplay = window.$gz._.find(vm.selectLists.stringFilterOperators, {
|
||||
id: filterOperator
|
||||
}).name;
|
||||
//de-lodash
|
||||
// let opDisplay = window.$gz. _.find(vm.selectLists.stringFilterOperators, {
|
||||
// id: filterOperator
|
||||
// }).name;
|
||||
|
||||
let opDisplay = vm.selectLists.stringFilterOperators.find(
|
||||
z => z.id == filterOperator
|
||||
).name;
|
||||
|
||||
return opDisplay + ' "' + valueDisplay + '"';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user