HUGE REFACTOR / CLEANUP

if there is a issue it's probably something in here that was changed
This commit is contained in:
2021-09-28 20:19:44 +00:00
parent 51eddfede9
commit d0afdd9855
238 changed files with 3127 additions and 8614 deletions

View File

@@ -53,17 +53,11 @@ 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":
// m.vm.$router.push({
// name: "cust-user",
// params: { recordid: 0 }
// });
// 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.User)
);
if (res && res.refresh == true) {
@@ -72,7 +66,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.User),
m.id
);
@@ -80,12 +74,12 @@ 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;
case "directnotify":
//nav to direct notify with list of users appended to route
let selected = m.vm.$refs.gzdatatable.getDataListSelection(
const selected = m.vm.$refs.gzdatatable.getDataListSelection(
window.$gz.type.User
).selectedRowIds;
if (selected.length == 0) {
@@ -96,7 +90,6 @@ async function clickHandler(menuItem) {
m.vm.$router.push({
name: "home-notify-direct",
params: { userIdList: selected.toString() }
//params: { userIdList: m.vm.selected.map(z => z.id).toString() }
});
}
break;
@@ -113,7 +106,7 @@ async function clickHandler(menuItem) {
//
//
function generateMenu(vm) {
let menuOptions = {
const menuOptions = {
isMain: true,
icon: "$ayiUsers",
title: "Contacts",
@@ -124,18 +117,6 @@ function generateMenu(vm) {
}
};
// if (vm.rights.change) {
// menuOptions.menuItems.push({
// title: "New",
// icon: "$ayiPlus",
// surface: true,
// key: FORM_KEY + ":new",
// vm: vm
// });
// }
//REPORTS
//Report not Print, print is a further option
menuOptions.menuItems.push({
title: "Report",
icon: "$ayiFileAlt",
@@ -143,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,