This commit is contained in:
@@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
|
|
||||||
TODO: Customer wo form
|
TODO: Customer wo form
|
||||||
Printing
|
Printing report button
|
||||||
Rights with tags system test all rights
|
|
||||||
when print report if allowed the *server* chooses the report template, not the client, based on the global settings
|
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
|
Look at cases re wo and csr stuff
|
||||||
|
|
||||||
|
|||||||
@@ -200,6 +200,21 @@ async function clickHandler(menuItem) {
|
|||||||
const m = window.$gz.menu.parseMenuItem(menuItem);
|
const m = window.$gz.menu.parseMenuItem(menuItem);
|
||||||
if (m.owner == FORM_KEY && !m.disabled) {
|
if (m.owner == FORM_KEY && !m.disabled) {
|
||||||
switch (m.key) {
|
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:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
"notify-warning",
|
||||||
@@ -223,6 +238,14 @@ function generateMenu(vm) {
|
|||||||
menuItems: []
|
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 });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user