This commit is contained in:
2021-01-30 18:55:46 +00:00
parent 9bddbf0883
commit f0abfcbf6f
4 changed files with 14 additions and 16 deletions

View File

@@ -28,7 +28,7 @@ How it works:
Replace current filter icon with column order visiblity icon and just keep as is in UI of datatable (modify columnview ui as per below)
ColumnView UI
UI opens up to same type of form as current ay-data-list-view but with only the columns visibility and order settable, no need for names it's user default
UI opens up to same type of form as current ay-data-list-column-view but with only the columns visibility and order settable, no need for names it's user default
after changes just saves as users sole default for that listkey,userid combo easy peasy
Server sends columnorder and sort anyway so no need to do antyhing but trigger a fetch of the datatable data
@@ -42,7 +42,7 @@ How it works:
Filter from atop each grid column by clicking a button there which opens FILTER UI
FILTER COLUMN WIDGET
filter button beside each filterable column header
Ui contains filtering settings for that column and shows existing, basically same as filter portion of existing ay-data-list-view.vue
Ui contains filtering settings for that column and shows existing, basically same as filter portion of existing ay-data-list-column-view.vue
has accept / cancel buttons, on accept immediately updates current filter (named or default) filter collection object in it's entirety
FILTER DROPDOWN
Defaults to default filter on page open
@@ -111,7 +111,7 @@ todo: column order and sort disentaglement from "filter" is first order of busin
columndata and code on getdata coming from server are working code that doesn't need changing it's all about what gets persisted and SENT TO the server on post datalist
Changes:
Modify ay-data-list-view.vue to only handle column order and save to the server as the singleton default.
Modify ay-data-list-column-view.vue to only handle column order and save to the server as the singleton default.
No need to persist anything locally in store or session, gzdatatable will pick it up from the server itself on refresh
remove all filter and sort aspects so it's only concerned with column order and visibility.
Change outer icon from a filter to whatever represents column order selection

View File

@@ -527,7 +527,7 @@ export default {
},
editListView() {
this.$router.push({
name: "ay-data-list-view",
name: "ay-data-list-column-view",
params: {
dataListKey: this.dataListKey,
formKey: this.formKey,

View File

@@ -94,11 +94,11 @@ export default new Router({
import(/* webpackChunkName: "ay-common" */ "./views/ay-customize.vue")
},
{
path: "/data-list-view/:dataListKey/:formKey/:listViewId",
name: "ay-data-list-view",
path: "/data-list-column-view/:dataListKey",
name: "ay-data-list-column-view",
component: () =>
import(
/* webpackChunkName: "ay-common" */ "./views/ay-data-list-view.vue"
/* webpackChunkName: "ay-common" */ "./views/ay-data-list-column-view.vue"
)
},

View File

@@ -412,8 +412,8 @@
/* Xeslint-disable */
////////////////////////////////////////////////////////////////////////////////////////////////////////////
const FORM_KEY = "ay-data-list-view";
const API_BASE_URL = "data-list-view/";
const FORM_KEY = "ay-data-list-column-view";
const API_BASE_URL = "data-list-column-view/";
let JUST_DELETED = false;
export default {
//unsaved changes are actually valid for this form so no need to warn
@@ -927,7 +927,7 @@ function generateMenu(vm) {
readOnly: vm.formState.readOnly,
icon: "$ayiFilter",
title: "DataListView",
helpUrl: "form-ay-data-list-view",
helpUrl: "form-ay-data-list-column-view",
formData: {
ayaType: window.$gz.type.FormCustom,
formCustomTemplateKey: undefined,
@@ -1282,9 +1282,7 @@ async function setEffectiveListView(vm) {
} else if (vm.listViewId == 0) {
//get default list view
//http://localhost:7575/api/v8/DataListView/default/TestWidgetDataList
let res = await window.$gz.api.get(
"data-list-view/default/" + vm.dataListKey
);
let res = await window.$gz.api.get(API_BASE_URL + vm.dataListKey);
if (res.error) {
// throw new Error(res.error);
@@ -1295,7 +1293,7 @@ async function setEffectiveListView(vm) {
}
} else {
//listview has an id value
let res = await window.$gz.api.get("data-list-view/" + vm.listViewId);
let res = await window.$gz.api.get(API_BASE_URL + vm.listViewId);
if (res.error) {
//throw new Error(res.error);
throw new Error(window.$gz.errorHandler.errorToString(res, vm));
@@ -1412,7 +1410,7 @@ function initDataObject(vm) {
// if (window.$gz.dev) {
// if (vm.obj.editView.length != vm.fieldDefinitions.length) {
// throw new Error(
// "ay-data-list-view::initDataObject - working array length not equal to total field definition length"
// "ay-data-list-column-view::initDataObject - working array length not equal to total field definition length"
// );
// }
// }
@@ -1503,7 +1501,7 @@ function getDisplayForFilter(
if (filterOperator == null || filterValue == null) {
// if (window.$gz.dev) {
// throw new Error(
// "ay-data-list-view::getDisplayForFilter Value filter missing one ore more of Operator, Value"
// "ay-data-list-column-view::getDisplayForFilter Value filter missing one ore more of Operator, Value"
// );
// }
return "";