This commit is contained in:
@@ -658,7 +658,7 @@ export default {
|
|||||||
|
|
||||||
//add only if not already in the collection (accidental double click)
|
//add only if not already in the collection (accidental double click)
|
||||||
//de-lodash
|
//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
|
//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
|
//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
|
//Pass 1, iterate the listview first
|
||||||
for (let i = 0; i < vm.effectiveListView.length; i++) {
|
for (let i = 0; i < vm.effectiveListView.length; i++) {
|
||||||
let lvItem = vm.effectiveListView[i];
|
let lvItem = vm.effectiveListView[i];
|
||||||
|
//de-lodash
|
||||||
let fld = window.$gz._.find(vm.fieldDefinitions, ["fieldKey", lvItem.fld]);
|
//let fld = window.$gz. _.find(vm.fieldDefinitions, ["fieldKey", lvItem.fld]);
|
||||||
|
let fld = vm.fieldDefinitions.find(z => z.fieldKey == lvItem.fld);
|
||||||
let o = {
|
let o = {
|
||||||
key: fld.fieldKey,
|
key: fld.fieldKey,
|
||||||
title: vm.$ay.t(fld.tKey),
|
title: vm.$ay.t(fld.tKey),
|
||||||
@@ -1344,7 +1345,9 @@ function initDataObject(vm) {
|
|||||||
let fld = vm.fieldDefinitions[i];
|
let fld = vm.fieldDefinitions[i];
|
||||||
|
|
||||||
//is this field already in ret array?
|
//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
|
//nope, so add it
|
||||||
let o = {
|
let o = {
|
||||||
key: fld.fieldKey,
|
key: fld.fieldKey,
|
||||||
@@ -1433,23 +1436,34 @@ function getDisplayForFilter(
|
|||||||
) {
|
) {
|
||||||
//BLANKS FILTER
|
//BLANKS FILTER
|
||||||
if (filterOperator == "=" && filterValue == "*NULL*") {
|
if (filterOperator == "=" && filterValue == "*NULL*") {
|
||||||
return window.$gz._.find(vm.selectLists.stringFilterOperators, {
|
//de-lodash
|
||||||
id: "*NOVALUE*"
|
// return window.$gz. _.find(vm.selectLists.stringFilterOperators, {
|
||||||
}).name;
|
// id: "*NOVALUE*"
|
||||||
|
// }).name;
|
||||||
|
return vm.selectLists.stringFilterOperators.find(z => z.id == "*NOVALUE*")
|
||||||
|
.name;
|
||||||
}
|
}
|
||||||
// NONBLANKS FILTER
|
// NONBLANKS FILTER
|
||||||
if (filterOperator == "!=" && filterValue == "*NULL*") {
|
if (filterOperator == "!=" && filterValue == "*NULL*") {
|
||||||
return window.$gz._.find(vm.selectLists.stringFilterOperators, {
|
//de-lodash
|
||||||
id: "*HASVALUE*"
|
// return window.$gz. _.find(vm.selectLists.stringFilterOperators, {
|
||||||
}).name;
|
// id: "*HASVALUE*"
|
||||||
|
// }).name;
|
||||||
|
return vm.selectLists.stringFilterOperators.find(z => z.id == "*HASVALUE*")
|
||||||
|
.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
//DATE RELATIVE TOKEN FILTER
|
//DATE RELATIVE TOKEN FILTER
|
||||||
if (uiFieldDataType === 1 && filterValue[0] == "*") {
|
if (uiFieldDataType === 1 && filterValue[0] == "*") {
|
||||||
let valueDisplay = window.$gz._.find(vm.selectLists.dateFilterTokens, {
|
//de-lodash
|
||||||
id: filterValue
|
// let valueDisplay = window.$gz. _.find(vm.selectLists.dateFilterTokens, {
|
||||||
}).name;
|
// id: filterValue
|
||||||
let opDisplay = filterOperator;
|
// }).name;
|
||||||
|
|
||||||
|
let valueDisplay = vm.selectLists.dateFilterTokens.find(
|
||||||
|
z => z.id == filterValue
|
||||||
|
).name;
|
||||||
|
|
||||||
return filterOperator + " " + valueDisplay;
|
return filterOperator + " " + valueDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1490,9 +1504,14 @@ function getDisplayForFilter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Operator
|
//Operator
|
||||||
let opDisplay = window.$gz._.find(vm.selectLists.stringFilterOperators, {
|
//de-lodash
|
||||||
id: filterOperator
|
// let opDisplay = window.$gz. _.find(vm.selectLists.stringFilterOperators, {
|
||||||
}).name;
|
// id: filterOperator
|
||||||
|
// }).name;
|
||||||
|
|
||||||
|
let opDisplay = vm.selectLists.stringFilterOperators.find(
|
||||||
|
z => z.id == filterOperator
|
||||||
|
).name;
|
||||||
|
|
||||||
return opDisplay + ' "' + valueDisplay + '"';
|
return opDisplay + ' "' + valueDisplay + '"';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user