Last report implemented throughout

This commit is contained in:
2021-09-09 22:36:00 +00:00
parent 3fb25fce47
commit 130a6d5f03
104 changed files with 634 additions and 2169 deletions

View File

@@ -169,37 +169,6 @@ async function clickHandler(menuItem) {
m.vm.reload = !m.vm.reload;
}
break;
// case "report":
// if (m.id != null) {
// //last report selected is in m.id
// m.vm.$router.push({
// name: "ay-report",
// params: { recordid: m.id, ayatype: window.$gz.type.WorkOrder }
// });
// } else {
// //general report selector chosen
// let res = await m.vm.$refs.reportSelector.open(
// m.vm.$refs.gzdatatable.getDataListSelection(
// window.$gz.type.WorkOrder
// )
// );
// //if null for no selection
// //just bail out
// if (res == null) {
// return;
// }
// //persist last report selected
// window.$gz.form.setLastReport(FORM_KEY, res);
// //Now open the report viewer...
// m.vm.$router.push({
// name: "ay-report",
// params: { recordid: res.id, ayatype: window.$gz.type.WorkOrder }
// });
// }
// break;
case "report":
{
let res = await m.vm.$refs.reportSelector.open(
@@ -271,6 +240,7 @@ function generateMenu(vm) {
if (lastReport != null) {
menuOptions.menuItems.push({
title: lastReport.name,
notrans: true,
icon: "$ayiFileAlt",
key: FORM_KEY + ":report:" + lastReport.id,
vm: vm