This commit is contained in:
2020-02-21 21:57:01 +00:00
parent 3172289068
commit f9c018011f

View File

@@ -746,11 +746,10 @@ export default {
this, this,
item.uiFieldDataType, item.uiFieldDataType,
filterItem.op, filterItem.op,
filterItem.value filterItem.value,
item.enumType
); );
//add only if not already in the collection (accidental double click) //add only if not already in the collection (accidental double click)
console.log("addFilterCondition::find is:");
console.log(window.$gz._.find);
if (!window.$gz._.find(item.filter.items, filterItem)) { if (!window.$gz._.find(item.filter.items, filterItem)) {
item.filter.items.push(filterItem); item.filter.items.push(filterItem);
window.$gz.form.setFormState({ window.$gz.form.setFormState({
@@ -1372,17 +1371,7 @@ function getDisplayForFilter(
enumType enumType
) { ) {
var ret = ""; var ret = "";
//debugger;
//DATE RELATIVE FILTER
if (uiFieldDataType === 1) {
if (filterValue != "*select*") {
var valueDisplay = window.$gz._.find(vm.pickLists.dateFilterTokens, {
id: filterValue
}).name;
var opDisplay = filterOperator;
return filterOperator + " " + valueDisplay;
}
}
//BLANKS FILTER //BLANKS FILTER
if (filterOperator == "=" && filterValue == "*NULL*") { if (filterOperator == "=" && filterValue == "*NULL*") {
@@ -1397,6 +1386,15 @@ function getDisplayForFilter(
}).name; }).name;
} }
//DATE RELATIVE TOKEN FILTER
if (uiFieldDataType === 1 && filterValue[0] == "*") {
var valueDisplay = window.$gz._.find(vm.pickLists.dateFilterTokens, {
id: filterValue
}).name;
var opDisplay = filterOperator;
return filterOperator + " " + valueDisplay;
}
//VALUE FILTER //VALUE FILTER
//Nothing more to do if there isn't both a value AND an operator at this point //Nothing more to do if there isn't both a value AND an operator at this point
if (filterOperator == null || filterValue == null) { if (filterOperator == null || filterValue == null) {