This commit is contained in:
2021-02-08 22:20:56 +00:00
parent 8dd8747c1f
commit af2d581f58

View File

@@ -7,10 +7,8 @@
>
<v-card>
<v-card-title>{{ tableColumnData.text }}</v-card-title>
<!-- <v-card-subtitle class="mt-1">sub title text</v-card-subtitle> -->
<v-card-text>
<!-- activefilter:{{ activeFilter }} <br /><br />
editItemFilter:{{ editItem.filter }} -->
<!-- FILTER CONTROL -->
<template v-if="editItem.isFilterable">
<div class="pt-6">
@@ -493,9 +491,6 @@ export default {
);
//add only if not already in the collection (accidental double click)
//de-lodash
// if (!window.$gz. _.find(editItem.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
//so only the op and the value need to be checked
@@ -549,10 +544,6 @@ async function initForm(vm) {
await fetchTranslatedText(vm);
populateSelectionLists(vm);
await populateFieldDefinitions(vm);
// await fetchTranslatedFieldNames(vm);
// await setEffectiveListView(vm);
// await fetchEnums(vm);
}
////////////////////
@@ -839,13 +830,6 @@ function populateSelectionLists(vm) {
////////////////////
//
function initEditItem(vm) {
/*
activefilter:{ "id": 1, "concurrency": 5029405, "userId": 1, "name": "-", "public": false, "defaultFilter": true, "listKey": "TestWidgetDataList",
"filter": "[{\"column\":\"widgetname\",\"any\":false,\"items\":[{\"op\":\">\",\"value\":\"A\"}]},{\"column\":\"widgetserial\",\"any\":false,\"items\":[{\"op\":\">\",\"value\":\"50\"}]},{\"column\":\"widgetdollaramount\",\"any\":false,\"items\":[{\"op\":\">\",\"value\":9}]}]" }
editItemFilter:{ "any": false, "items": [] }
*/
if (vm.fieldDefinitions == null) {
throw new Error(
"ay-data-list::initEditItem - fieldDefinitions are not set"
@@ -882,7 +866,6 @@ editItemFilter:{ "any": false, "items": [] }
o.tempFilterValue = [];
} else {
//should be a comma delimited string, turn into array
console.log("nitEditItem tag filter items=", o.filter.items);
o.tempFilterValue = o.filter.items[0].split(",");
}
}
@@ -918,30 +901,17 @@ function getDisplayForFilter(
) {
//BLANKS FILTER
if (filterOperator == "=" && filterValue == "*NULL*") {
//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*") {
//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] == "*") {
//de-lodash
// let valueDisplay = window.$gz. _.find(vm.selectLists.dateFilterTokens, {
// id: filterValue
// }).name;
let valueDisplay = vm.selectLists.dateFilterTokens.find(
z => z.id == filterValue
).name;
@@ -952,11 +922,6 @@ function getDisplayForFilter(
//VALUE FILTER
//Nothing more to do if there isn't both a value AND an operator at this point
if (filterOperator == null || filterValue == null) {
// if (window.$gz.dev) {
// throw new Error(
// "ay-data-list-column-view::getDisplayForFilter Value filter missing one ore more of Operator, Value"
// );
// }
return "";
}
@@ -986,11 +951,6 @@ function getDisplayForFilter(
}
//Operator
//de-lodash
// let opDisplay = window.$gz. _.find(vm.selectLists.stringFilterOperators, {
// id: filterOperator
// }).name;
let opDisplay = vm.selectLists.stringFilterOperators.find(
z => z.id == filterOperator
).name;