This commit is contained in:
@@ -117,12 +117,15 @@ export default {
|
|||||||
vm.formState.serverError = res.error;
|
vm.formState.serverError = res.error;
|
||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
} else {
|
} else {
|
||||||
let savedView=JSON.parse(res.data.view);
|
let savedView = JSON.parse(res.data.view);
|
||||||
let availableItems = DashRegistry.availableItems();
|
let availableItems = DashRegistry.availableItems();
|
||||||
let allowedView=savedView.filter(z=> availableItems.con)
|
let allowedView = savedView.filter(z =>
|
||||||
|
availableItems.find(m => m.id == z.id)
|
||||||
|
);
|
||||||
//TODO: Vet the view, ensure only items that match availableItems are allowed through
|
//TODO: Vet the view, ensure only items that match availableItems are allowed through
|
||||||
//TODO: set effectiveView based on savedView, availableItems
|
//TODO: set effectiveView based on savedView, availableItems
|
||||||
vm.obj = JSON.parse(res.data.view);
|
// vm.obj = JSON.parse(res.data.view);
|
||||||
|
vm.effectiveView = allowedView;
|
||||||
//modify the menu as necessary
|
//modify the menu as necessary
|
||||||
generateMenu(vm);
|
generateMenu(vm);
|
||||||
//Update the form status
|
//Update the form status
|
||||||
|
|||||||
Reference in New Issue
Block a user