From bea50f6a3bda9111a3432acf3258b8543f076fda Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 20 Jul 2021 23:16:43 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 8 ++- .../components/data-table-filter-control.vue | 56 ++++++++++++++++++- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 7eaaa642..ed2467bc 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -453,12 +453,14 @@ todo: many biz objects are not using new PUT methodology CURRENTLY DOING: more misc stuff below to complete workorder!!! -create a view "viewaworkorder" which includes age calculated as interval and aliased as "expage" -change all workorder lists to use a view as the top workorder level and add the expage column as done in test version +X create a view "viewaworkorder" which includes age calculated as interval and aliased as "expage" +X change all workorder lists to use a view as the top workorder level and add the expage column as done in test version implement interval / duration filter for use in grids, definitely can support greater than / less than and between equals is probably useless so don't implement at all -implement at the back end as criteriabuilder for intervals (type 16) +implement at the back end as criteriabuilder for intervals (type 15) done when can filter and view workorder* lists by age / duration +select serial,createddate, expwoage from viewaworkorder +where expwoage > interval '4 months 15 days' diff --git a/ayanova/src/components/data-table-filter-control.vue b/ayanova/src/components/data-table-filter-control.vue index 991ce99d..66b762a6 100644 --- a/ayanova/src/components/data-table-filter-control.vue +++ b/ayanova/src/components/data-table-filter-control.vue @@ -260,6 +260,42 @@ >$ayiPlus + + +
+ + + + + $ayiPlus +
@@ -341,7 +377,8 @@ export default { boolFilterOperators: [], decimalFilterOperators: [], tagFilterOperators: [], - enumFilterOperators: [] + enumFilterOperators: [], + intervalFilterOperators: [] }, formState: { ready: false, @@ -825,6 +862,20 @@ function populateSelectionLists(vm) { { name: vm.$ay.t("GridRowFilterDropDownNotEquals"), id: "!=" } ] ); + + vm.selectLists.intervalFilterOperators.push( + ...[ + // { name: vm.$ay.t("GridRowFilterDropDownEquals"), id: "=" }, + { name: vm.$ay.t("GridRowFilterDropDownGreaterThan"), id: ">" }, + { + name: vm.$ay.t("GridRowFilterDropDownGreaterThanOrEqualTo"), + id: ">=" + }, + { name: vm.$ay.t("GridRowFilterDropDownLessThan"), id: "<" }, + { name: vm.$ay.t("GridRowFilterDropDownLessThanOrEqualTo"), id: "<=" } + //{ name: vm.$ay.t("GridRowFilterDropDownNotEquals"), id: "!=" } + ] + ); } //////////////////// @@ -945,6 +996,9 @@ function getDisplayForFilter( case 10: //ENUM translate valueDisplay = window.$gz.enums.get(enumType, filterValue); break; + case 15: //INTERVAL / DURATION translate + valueDisplay = window.$gz.locale.durationLocalized(filterValue); + break; default: valueDisplay = filterValue; break;