This commit is contained in:
@@ -372,7 +372,8 @@ export default {
|
|||||||
name: "ay-data-list-view",
|
name: "ay-data-list-view",
|
||||||
params: {
|
params: {
|
||||||
listViewId: this.listViewId,
|
listViewId: this.listViewId,
|
||||||
dataListKey: this.dataListKey
|
dataListKey: this.dataListKey,
|
||||||
|
formKey: this.formKey
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ export default new Router({
|
|||||||
import(/* webpackChunkName: "ay" */ "./views/ay-customize.vue")
|
import(/* webpackChunkName: "ay" */ "./views/ay-customize.vue")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/ay-data-list-view/:listViewId/:dataListKey",
|
path: "/ay-data-list-view/:listViewId/:dataListKey/:formKey",
|
||||||
name: "ay-data-list-view",
|
name: "ay-data-list-view",
|
||||||
component: () =>
|
component: () =>
|
||||||
import(/* webpackChunkName: "ay" */ "./views/ay-data-list-view.vue")
|
import(/* webpackChunkName: "ay" */ "./views/ay-data-list-view.vue")
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ export default {
|
|||||||
//set route values in data object so init form can handle
|
//set route values in data object so init form can handle
|
||||||
vm.dataListKey = this.$route.params.dataListKey;
|
vm.dataListKey = this.$route.params.dataListKey;
|
||||||
vm.listViewId = this.$route.params.listViewId;
|
vm.listViewId = this.$route.params.listViewId;
|
||||||
|
vm.formKey = this.$route.params.formKey;
|
||||||
|
|
||||||
initForm(vm)
|
initForm(vm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -127,9 +128,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
obj: [], //working copy driving UI
|
obj: [], //working copy driving UI
|
||||||
listViewId: null,
|
listViewId: undefined,
|
||||||
dataListKey: null,
|
dataListKey: undefined,
|
||||||
|
formKey: undefined,
|
||||||
fieldDefinitions: [],
|
fieldDefinitions: [],
|
||||||
|
effectiveListView: undefined,
|
||||||
concurrencyToken: undefined,
|
concurrencyToken: undefined,
|
||||||
pickLists: {},
|
pickLists: {},
|
||||||
formState: {
|
formState: {
|
||||||
@@ -138,8 +141,8 @@ export default {
|
|||||||
valid: true,
|
valid: true,
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
loading: true,
|
loading: true,
|
||||||
errorBoxMessage: null,
|
errorBoxMessage: undefined,
|
||||||
appError: null,
|
appError: undefined,
|
||||||
serverError: {}
|
serverError: {}
|
||||||
},
|
},
|
||||||
rights: window.$gz.role.getRights(window.$gz.type.DataListView)
|
rights: window.$gz.role.getRights(window.$gz.type.DataListView)
|
||||||
@@ -338,6 +341,37 @@ function fetchLocalizedFieldNames(vm) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
function setEffectiveListView(vm) {
|
||||||
|
//return Promise.resolve();
|
||||||
|
/*
|
||||||
|
effectiveListView
|
||||||
|
- Second get the ListView that is currently in use so can setup the page view
|
||||||
|
- If listviewid is zero then that's starting with the default list view so need to fetch it and then init the form
|
||||||
|
- If listviewid is -1 then that's starting with an unsaved listview so get that from the saved form store
|
||||||
|
- If listviewid is greater than 0 then it's a saved listview and there sb a cached version of it but ideally maybe fetch it from
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (vm.listViewId == null) {
|
||||||
|
throw "ay-data-list::setEffectiveListView - listViewId is not set";
|
||||||
|
}
|
||||||
|
|
||||||
|
var formSettings = window.$gz.form.getFormSettings(vm.formKey);
|
||||||
|
|
||||||
|
if (vm.listViewId == -1) {
|
||||||
|
if (formSettings.saved.dataTable.editedListView != null) {
|
||||||
|
vm.effectiveListView = formSettings.saved.dataTable.editedListView;
|
||||||
|
}
|
||||||
|
} else if (vm.listViewId == 0) {
|
||||||
|
//get default list view
|
||||||
|
} else {
|
||||||
|
//check if cached, if not then fetch, cache and set
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
//
|
//
|
||||||
function initDataObject(vm) {
|
function initDataObject(vm) {
|
||||||
|
|||||||
Reference in New Issue
Block a user