This commit is contained in:
@@ -585,14 +585,12 @@ function clickHandler(menuItem) {
|
||||
if (res == null) {
|
||||
return;
|
||||
}
|
||||
alert("STUB: view report " + res.name);
|
||||
|
||||
//if not null then persist this choice in formstate in vuex
|
||||
//res.id = report id
|
||||
//res.name = report name
|
||||
//DON"T NEED to regenerate menu because we're leaving this form anyway and it will generate on return
|
||||
//persist last report selected
|
||||
window.$gz.form.setLastReport(FORM_KEY, res);
|
||||
|
||||
//Now open the report viewer...
|
||||
alert("STUB: view report " + res.name);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
@@ -650,15 +648,20 @@ function generateMenu(vm) {
|
||||
vm: vm
|
||||
});
|
||||
|
||||
//get last report selected
|
||||
let lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
||||
if (lastReport != null) {
|
||||
menuOptions.menuItems.push({
|
||||
title: lastReport.name,
|
||||
icon: "fa-file-alt",
|
||||
key: FORM_KEY + ":report:" + lastReport.id,
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
|
||||
//todo: get the last used report from the vuex form state and
|
||||
//insert it here if it exists.
|
||||
//was going to do multiple but that's a lot of fuckery and space eating
|
||||
menuOptions.menuItems.push({
|
||||
title: "stub: Last report used",
|
||||
icon: "fa-file-alt",
|
||||
key: FORM_KEY + ":report:STUBlastusedreportid",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
|
||||
Reference in New Issue
Block a user