This commit is contained in:
2020-02-14 21:20:32 +00:00
parent 5ef05fa2fc
commit 2d145f5e05
6 changed files with 26 additions and 28 deletions

View File

@@ -17,7 +17,7 @@ export default {
DEPRECATED_REUSELATER_15: 15,
DEPRECATED_REUSELATER_16: 16,
FileAttachment: 17,
DataListSortFilter: 18,
DataListView: 18,
FormCustom: 19,
DataListTemplate: 20
};

View File

@@ -6,7 +6,7 @@
*/
var rights = JSON.parse(
'{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":131071},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Locale":{"Change":16386,"ReadFullRecord":131071},"DataListSortFilter":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}'
'{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":131071},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Locale":{"Change":16386,"ReadFullRecord":131071},"DataListView":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}'
//'{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":131071},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Locale":{"Change":16386,"ReadFullRecord":131071},"DataListFilter":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}'
);
export default rights;

View File

@@ -157,7 +157,7 @@ export default {
"Loading",
"AM",
"PM",
"DataListSortFilter"
"DataListView"
],
////////////////////////////////////////////////////////

View File

@@ -401,10 +401,10 @@ export default new Router({
import(/* webpackChunkName: "ay" */ "./views/ay-customize.vue")
},
{
path: "/ay-sort-filter/:recordid/:dataListKey",
name: "ay-sort-filter",
path: "/ay-data-list-view/:recordid/:dataListKey",
name: "ay-data-list-view",
component: () =>
import(/* webpackChunkName: "ay" */ "./views/ay-sort-filter.vue")
import(/* webpackChunkName: "ay" */ "./views/ay-data-list-view.vue")
},
{
path: "/ay-attachments/:ayatype/:recordid",

View File

@@ -44,7 +44,7 @@
<v-col cols="12" sm="6" lg="4" xl="3">
<v-select
v-model="recordid"
:items="pickLists.availableDataListSortFilters"
:items="pickLists.availableDataListViews"
item-text="name"
item-value="id"
:label="lt('GridFilterName')"
@@ -64,11 +64,11 @@
//
//NOTE: This is a simple form with no need for business rules or validation so stripped out any extraneous code related to all that
//
const FORM_KEY = "ay-sort-filter";
const API_BASE_URL = "DataListSortFilter/";
const FORM_KEY = "ay-data-list-view";
const API_BASE_URL = "DataListView/";
export default {
beforeRouteEnter(to, from, next) {
var ltKeysRequired = ["DataListSortFilter", "GridFilterName"];
var ltKeysRequired = ["DataListView", "GridFilterName"];
window.$gz.locale.fetch(ltKeysRequired).then(next);
},
@@ -145,9 +145,9 @@ export default {
dataListKey: null,
concurrencyToken: undefined,
formCustomTemplateKey: this.$route.params.formCustomTemplateKey,
selectedDataListSortFilter: {},
selectedDataListView: {},
pickLists: {
availableDataListSortFilters: []
availableDataListViews: []
},
formState: {
ready: false,
@@ -159,7 +159,7 @@ export default {
appError: null,
serverError: {}
},
rights: window.$gz.role.getRights(window.$gz.type.DataListSortFilter)
rights: window.$gz.role.getRights(window.$gz.type.DataListView)
//,tempTemplate: window.$gz.store.state.formCustomTemplate["widget"]
};
},
@@ -185,7 +185,7 @@ export default {
enableSaveButton();
},
filterChanged: function() {
console.log(this.selectedDataListSortFilter);
console.log(this.selectedDataListView);
alert("STUB:FILTER SELECTED");
// //nothing to scan here just set form dirty
// this.formState.dirty = true;
@@ -308,8 +308,8 @@ function generateMenu(vm) {
var menuOptions = {
isMain: false,
icon: "filter",
title: window.$gz.locale.get("DataListSortFilter"),
helpUrl: "form-ay-sort-filter",
title: window.$gz.locale.get("DataListView"),
helpUrl: "form-ay-data-list-view",
formData: {
formKey: FORM_KEY,
ayaType: window.$gz.type.FormCustom,
@@ -346,18 +346,16 @@ function initForm(vm) {
////////////////////
//
function populatePickLists(vm) {
//http://localhost:7575/api/v8/DataListSortFilter/PickList?ListKey=TestWidgetDataList
//http://localhost:7575/api/v8/DataListView/PickList?ListKey=TestWidgetDataList
return window.$gz.api
.get("DataListSortFilter/PickList?ListKey=" + vm.$route.params.dataListKey)
.get("DataListView/PickList?ListKey=" + vm.$route.params.dataListKey)
.then(res => {
if (res.error != undefined) {
window.$gz.errorHandler.handleFormError(res.error, vm);
} else {
vm.pickLists.availableDataListSortFilters = res.data;
window.$gz.form.addNoSelectionItem(
vm.pickLists.availableDataListSortFilters
);
//vm.pickLists.availableDataListSortFilters.unshift({ name: "-", id: 0 });
vm.pickLists.availableDataListViews = res.data;
window.$gz.form.addNoSelectionItem(vm.pickLists.availableDataListViews);
//vm.pickLists.availableDataListViews.unshift({ name: "-", id: 0 });
}
});
}

View File

@@ -23,13 +23,13 @@ export default {
isMain: true,
icon: "vial",
title: window.$gz.locale.get("WidgetList"),
helpUrl: "form-ay-sort-filter",
helpUrl: "form-ay-data-list-view",
menuItems: [
{
title: window.$gz.locale.get("DataListSortFilter"),
title: window.$gz.locale.get("DataListView"),
icon: "filter",
surface: true,
key: FORM_KEY + ":sortfilter",
key: FORM_KEY + ":listview",
vm: this
}
]
@@ -66,9 +66,9 @@ function clickHandler(menuItem) {
var m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) {
case "sortfilter":
case "listview":
m.vm.$router.push({
name: "ay-sort-filter",
name: "ay-data-list-view",
params: {
recordid: m.vm.currentDataFilterId,
dataListKey: m.vm.dataListKey