This commit is contained in:
@@ -19,8 +19,7 @@
|
||||
|
||||
|
||||
TODO: Customer wo form
|
||||
Printing
|
||||
Rights with tags system test all rights
|
||||
Printing report button
|
||||
when print report if allowed the *server* chooses the report template, not the client, based on the global settings
|
||||
Look at cases re wo and csr stuff
|
||||
|
||||
|
||||
@@ -200,6 +200,21 @@ async function clickHandler(menuItem) {
|
||||
const m = window.$gz.menu.parseMenuItem(menuItem);
|
||||
if (m.owner == FORM_KEY && !m.disabled) {
|
||||
switch (m.key) {
|
||||
case "report":
|
||||
alert("STUB:PRINT REPORT");
|
||||
// const res = await m.vm.$refs.reportSelector.open(
|
||||
// {
|
||||
// AType: window.$gz.type.Customer,
|
||||
// selectedRowIds: [m.vm.obj.id]
|
||||
// },
|
||||
// m.id
|
||||
// );
|
||||
// if (res == null) {
|
||||
// return;
|
||||
// }
|
||||
// window.$gz.form.setLastReport(FORM_KEY, res);
|
||||
// generateMenu(m.vm);
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -223,6 +238,14 @@ function generateMenu(vm) {
|
||||
menuItems: []
|
||||
};
|
||||
|
||||
if (vm.obj.canReport)
|
||||
menuOptions.menuItems.push({
|
||||
title: "Report",
|
||||
icon: "$ayiFileAlt",
|
||||
key: FORM_KEY + ":report",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user