This commit is contained in:
@@ -372,7 +372,8 @@ export default {
|
||||
name: "ay-data-list-view",
|
||||
params: {
|
||||
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")
|
||||
},
|
||||
{
|
||||
path: "/ay-data-list-view/:listViewId/:dataListKey",
|
||||
path: "/ay-data-list-view/:listViewId/:dataListKey/:formKey",
|
||||
name: "ay-data-list-view",
|
||||
component: () =>
|
||||
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
|
||||
vm.dataListKey = this.$route.params.dataListKey;
|
||||
vm.listViewId = this.$route.params.listViewId;
|
||||
vm.formKey = this.$route.params.formKey;
|
||||
|
||||
initForm(vm)
|
||||
.then(() => {
|
||||
@@ -127,9 +128,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
obj: [], //working copy driving UI
|
||||
listViewId: null,
|
||||
dataListKey: null,
|
||||
listViewId: undefined,
|
||||
dataListKey: undefined,
|
||||
formKey: undefined,
|
||||
fieldDefinitions: [],
|
||||
effectiveListView: undefined,
|
||||
concurrencyToken: undefined,
|
||||
pickLists: {},
|
||||
formState: {
|
||||
@@ -138,8 +141,8 @@ export default {
|
||||
valid: true,
|
||||
readOnly: false,
|
||||
loading: true,
|
||||
errorBoxMessage: null,
|
||||
appError: null,
|
||||
errorBoxMessage: undefined,
|
||||
appError: undefined,
|
||||
serverError: {}
|
||||
},
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user