This commit is contained in:
2021-07-20 23:16:43 +00:00
parent 9fccad3dc8
commit bea50f6a3b
2 changed files with 60 additions and 4 deletions

View File

@@ -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'

View File

@@ -260,6 +260,42 @@
><v-icon large>$ayiPlus</v-icon></v-btn
>
</div>
<!-- INTERVAL / DURATION BUILDER -->
<div v-if="editItem.uiFieldDataType === 15">
<v-select
v-model="editItem.tempFilterOperator"
:items="selectLists.intervalFilterOperators"
item-text="name"
item-value="id"
:label="$ay.t('Filter')"
prepend-icon="$ayiFilter"
></v-select>
<!-- :show-seconds="false" -->
<gz-duration-picker
v-if="editItem.tempFilterOperator != null"
v-model="editItem.tempFilterValue"
:clearable="!formState.readOnly"
:readonly="formState.readOnly"
></gz-duration-picker>
<!-- <v-text-field
v-if="
editItem.tempFilterOperator != null &&
editItem.tempFilterOperator != '*NOVALUE*' &&
editItem.tempFilterOperator != '*HASVALUE*'
"
v-model="editItem.tempFilterValue"
:clearable="!formState.readOnly"
type="number"
></v-text-field> -->
<v-btn
large
block
v-if="editItem.tempFilterOperator != null"
@click="addFilterCondition(editItem)"
><v-icon large>$ayiPlus</v-icon></v-btn
>
</div>
</div>
<div class="pt-6">
@@ -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;