This commit is contained in:
2021-03-15 22:29:39 +00:00
parent c9a3c19710
commit 2be0ae5850
2 changed files with 23 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div>
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<!-- cols:{{ serverColumns }} filt:{{ serverFilter }} srt:{{ serverSort }} -->
<gz-data-table-filter
:data-list-key="dataListKey"
:active-filter-id="activeFilterId"
@@ -49,8 +49,16 @@
>
<v-icon data-cy="refresh">$ayiFilter</v-icon>
</v-btn>
<v-btn class="ml-12" @click="editColumnView">
<v-icon data-cy="filter">$ayiColumns</v-icon>
<v-btn
:outlined="hiddenAffectiveColumns.length > 0"
class="ml-12"
@click="editColumnView"
>
<v-icon
:color="hiddenAffectiveColumns.length ? 'accent' : 'primary'"
data-cy="filter"
>$ayiColumns</v-icon
>
</v-btn>
</div>
</v-card-title>
@@ -422,6 +430,7 @@ export default {
headers: [],
serverColumns: [],
serverFilter: [],
hiddenAffectiveColumns: [],
totalRecords: 0,
records: [],
rowsPerPageItems: [5, 10, 25, 50, 100],
@@ -454,7 +463,6 @@ export default {
type: Boolean,
default: false
},
reload: {
type: Boolean,
default: false
@@ -679,8 +687,10 @@ export default {
name: "ay-data-list-column-view",
params: {
dataListKey: this.dataListKey,
formKey: this.formKey,
activeFilterId: this.activeFilterId
hiddenAffectiveColumns: this.hiddenAffectiveColumns
// ,
// formKey: this.formKey,
// activeFilterId: this.activeFilterId
}
});
},
@@ -775,6 +785,10 @@ export default {
//save a copy of the filter to show the filter symbol icons beside column headers
//and know that the return list *is* filtered
vm.serverFilter = res.filter;
//Hidden columns that affect the query and data displayed
vm.hiddenAffectiveColumns = res.hiddenAffectiveColumns;
//Make sure the translation keys are fetched
await fetchTranslatedHeaderNames(res.columns); //Note can use await here because it's wrapped inside an async function call, it will wait then resume next stuff below
@@ -783,7 +797,7 @@ export default {
//build vm.headers here
vm.headers = buildHeaders(res.columns);
//SET TABLE SORT HERE FROM RESPONSE
//SET TABLE SORT HERE FROM RESPONSE
vm.setSortIndicatorsFromDataListResponse(res.sortBy);
//Post process data here and then set vm.records

View File

@@ -78,6 +78,7 @@ export default {
let vm = this;
try {
vm.dataListKey = this.$route.params.dataListKey;
vm.hiddenAffectiveColumns=this.$route.params.hiddenAffectiveColumns;
await initForm(vm);
vm.formState.ready = true;
window.$gz.eventBus.$on("menu-click", clickHandler);
@@ -101,6 +102,7 @@ export default {
sort: null
},
dataListKey: undefined,
hiddenAffectiveColumns: [],
fieldDefinitions: [],
editView: [],
formState: {