This commit is contained in:
@@ -20,7 +20,7 @@ todo: test v8migrate on big shitty database
|
||||
|
||||
todo: client gzutil:iconfortype missing all the recent new objects (mostly)
|
||||
|
||||
|
||||
todo: search form object list add service bank
|
||||
|
||||
TODO: //MIGRATE_OUTSTANDING comment tag
|
||||
search for this comment tag as it will contain items that could not be done until other items were migrated first
|
||||
|
||||
@@ -338,18 +338,6 @@ async function clickHandler(menuItem) {
|
||||
m.vm.submit();
|
||||
break;
|
||||
|
||||
case "new":
|
||||
m.vm.$router.push({
|
||||
name: "service-bank-edit",
|
||||
params: {
|
||||
recordid: 0,
|
||||
objectType: m.vm.obj.objectType,
|
||||
objectId: m.vm.obj.objectId,
|
||||
name: m.vm.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case "report":
|
||||
if (m.id != null) {
|
||||
//last report selected is in m.id
|
||||
@@ -397,7 +385,7 @@ function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: false,
|
||||
readOnly: vm.formState.readOnly,
|
||||
icon: "$ayiCalendarCheck",
|
||||
icon: "$ayiCarBattery",
|
||||
title: "ServiceBank",
|
||||
helpUrl: "form-home-service-banks",
|
||||
formData: {
|
||||
@@ -418,58 +406,6 @@ function generateMenu(vm) {
|
||||
});
|
||||
}
|
||||
|
||||
if (vm.rights.delete && vm.$route.params.recordid != 0) {
|
||||
if (vm.selfAssigned || vm.hasSupervisorRole) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "Delete",
|
||||
icon: "$ayiTrashAlt",
|
||||
surface: false,
|
||||
key: FORM_KEY + ":delete",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//REPORTS
|
||||
//Report not Print, print is a further option
|
||||
menuOptions.menuItems.push({
|
||||
title: "Report",
|
||||
icon: "$ayiFileAlt",
|
||||
key: FORM_KEY + ":report",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
//get last report selected
|
||||
let lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
||||
if (lastReport != null) {
|
||||
menuOptions.menuItems.push({
|
||||
title: lastReport.name,
|
||||
icon: "$ayiFileAlt",
|
||||
key: FORM_KEY + ":report:" + lastReport.id,
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
|
||||
if (vm.rights.change) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "New",
|
||||
icon: "$ayiPlus",
|
||||
key: FORM_KEY + ":new",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
|
||||
if (vm.rights.change) {
|
||||
if (vm.selfAssigned || vm.hasSupervisorRole) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "Duplicate",
|
||||
icon: "$ayiClone",
|
||||
key: FORM_KEY + ":duplicate",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
|
||||
@@ -224,12 +224,7 @@ function generateMenu(vm) {
|
||||
});
|
||||
}
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "Extensions",
|
||||
icon: "$ayiPuzzlePiece",
|
||||
key: FORM_KEY + ":extensions",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user