This commit is contained in:
@@ -1855,6 +1855,8 @@ function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: false,
|
||||
readOnly: vm.formState.readOnly,
|
||||
hideCoreBizStandardOptions: vm.obj.userIsRestrictedType,
|
||||
hideSearch: vm.obj.userIsRestrictedType,
|
||||
icon: "$ayiTools",
|
||||
title: "WorkOrder",
|
||||
helpUrl: "svc-workorders",
|
||||
@@ -1877,7 +1879,11 @@ function generateMenu(vm) {
|
||||
});
|
||||
}
|
||||
|
||||
if (vm.rights.delete && vm.$route.params.recordid != 0) {
|
||||
if (
|
||||
vm.rights.delete &&
|
||||
vm.$route.params.recordid != 0 &&
|
||||
!vm.obj.userIsRestrictedType
|
||||
) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "Delete",
|
||||
icon: "$ayiTrashAlt",
|
||||
@@ -1898,7 +1904,7 @@ function generateMenu(vm) {
|
||||
|
||||
//get last report selected
|
||||
let lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
||||
if (lastReport != null) {
|
||||
if (lastReport != null && !vm.obj.userIsRestrictedType) {
|
||||
menuOptions.menuItems.push({
|
||||
title: lastReport.name,
|
||||
icon: "$ayiFileAlt",
|
||||
@@ -1907,7 +1913,7 @@ function generateMenu(vm) {
|
||||
});
|
||||
}
|
||||
|
||||
if (vm.rights.change) {
|
||||
if (vm.rights.change && !vm.obj.userIsRestrictedType) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "New",
|
||||
icon: "$ayiPlus",
|
||||
@@ -1916,7 +1922,11 @@ function generateMenu(vm) {
|
||||
});
|
||||
}
|
||||
|
||||
if (vm.rights.change && vm.$route.params.recordid != 0) {
|
||||
if (
|
||||
vm.rights.change &&
|
||||
vm.$route.params.recordid != 0 &&
|
||||
!vm.obj.userIsRestrictedType
|
||||
) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "Duplicate",
|
||||
icon: "$ayiClone",
|
||||
@@ -1927,25 +1937,27 @@ function generateMenu(vm) {
|
||||
|
||||
//--- /show all ---
|
||||
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
menuOptions.menuItems.push({
|
||||
title: "WorkOrderStatusList",
|
||||
icon: "$ayiFlag",
|
||||
key: FORM_KEY + ":statuslist",
|
||||
vm: vm
|
||||
});
|
||||
menuOptions.menuItems.push({
|
||||
title: "WorkOrderItemStatusList",
|
||||
icon: "$ayiCircle",
|
||||
key: FORM_KEY + ":itemstatuslist",
|
||||
vm: vm
|
||||
});
|
||||
menuOptions.menuItems.push({
|
||||
title: "WorkOrderItemPriorityList",
|
||||
icon: "$ayiFireAlt",
|
||||
key: FORM_KEY + ":prioritylist",
|
||||
vm: vm
|
||||
});
|
||||
if (!vm.obj.userIsRestrictedType) {
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
menuOptions.menuItems.push({
|
||||
title: "WorkOrderStatusList",
|
||||
icon: "$ayiFlag",
|
||||
key: FORM_KEY + ":statuslist",
|
||||
vm: vm
|
||||
});
|
||||
menuOptions.menuItems.push({
|
||||
title: "WorkOrderItemStatusList",
|
||||
icon: "$ayiCircle",
|
||||
key: FORM_KEY + ":itemstatuslist",
|
||||
vm: vm
|
||||
});
|
||||
menuOptions.menuItems.push({
|
||||
title: "WorkOrderItemPriorityList",
|
||||
icon: "$ayiFireAlt",
|
||||
key: FORM_KEY + ":prioritylist",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
|
||||
Reference in New Issue
Block a user