HUGE REFACTOR / CLEANUP
if there is a issue it's probably something in here that was changed
This commit is contained in:
@@ -53,7 +53,7 @@ async function clickHandler(menuItem) {
|
||||
if (!menuItem) {
|
||||
return;
|
||||
}
|
||||
let m = window.$gz.menu.parseMenuItem(menuItem);
|
||||
const m = window.$gz.menu.parseMenuItem(menuItem);
|
||||
if (m.owner == FORM_KEY && !m.disabled) {
|
||||
switch (m.key) {
|
||||
case "new":
|
||||
@@ -63,7 +63,7 @@ async function clickHandler(menuItem) {
|
||||
});
|
||||
break;
|
||||
case "extensions":
|
||||
let res = await m.vm.$refs.extensions.open(
|
||||
const res = await m.vm.$refs.extensions.open(
|
||||
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.Memo)
|
||||
);
|
||||
if (res && res.refresh == true) {
|
||||
@@ -72,7 +72,7 @@ async function clickHandler(menuItem) {
|
||||
break;
|
||||
case "report":
|
||||
{
|
||||
let res = await m.vm.$refs.reportSelector.open(
|
||||
const res = await m.vm.$refs.reportSelector.open(
|
||||
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.Memo),
|
||||
m.id
|
||||
);
|
||||
@@ -80,7 +80,7 @@ async function clickHandler(menuItem) {
|
||||
return;
|
||||
}
|
||||
window.$gz.form.setLastReport(FORM_KEY, res);
|
||||
generateMenu(m.vm); //refresh the menu with the new report
|
||||
generateMenu(m.vm);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -96,7 +96,7 @@ async function clickHandler(menuItem) {
|
||||
//
|
||||
//
|
||||
function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
const menuOptions = {
|
||||
isMain: true,
|
||||
icon: "$ayiInbox",
|
||||
title: "MemoList",
|
||||
@@ -117,8 +117,6 @@ function generateMenu(vm) {
|
||||
});
|
||||
}
|
||||
|
||||
//REPORTS
|
||||
//Report not Print, print is a further option
|
||||
menuOptions.menuItems.push({
|
||||
title: "Report",
|
||||
icon: "$ayiFileAlt",
|
||||
@@ -126,8 +124,7 @@ function generateMenu(vm) {
|
||||
vm: vm
|
||||
});
|
||||
|
||||
//get last report selected
|
||||
let lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
||||
const lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
||||
if (lastReport != null) {
|
||||
menuOptions.menuItems.push({
|
||||
title: lastReport.name,
|
||||
@@ -137,7 +134,6 @@ function generateMenu(vm) {
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "Extensions",
|
||||
icon: "$ayiPuzzlePiece",
|
||||
|
||||
Reference in New Issue
Block a user