This commit is contained in:
@@ -112,30 +112,13 @@ export default {
|
|||||||
//populate the context portion of the menu so handle accordingly
|
//populate the context portion of the menu so handle accordingly
|
||||||
if (ctx.menuItems) {
|
if (ctx.menuItems) {
|
||||||
vm.appBar.menuItems = ctx.menuItems;
|
vm.appBar.menuItems = ctx.menuItems;
|
||||||
//DIVIDER
|
|
||||||
//Insert the devider between context and global items
|
|
||||||
// vm.appBar.menuItems.push({ divider: true, inset: false });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//WIKI, ATTACHMENTS, RECORD HISTORY
|
//STANDARD BIZ OBJECT OPTIONS
|
||||||
//NOTE: This applies equally to all core business object types that are basically real world and have an id and a type (all are wikiable, attachable and reviewable)
|
//NOTE: This applies equally to all core business object types that are basically real world and have an id and a type (all are wikiable, attachable and reviewable)
|
||||||
//Not utility type objects like datalist etc
|
//Not utility type objects like datalist etc
|
||||||
//there will be few exceptions so they will be coded in later if needed but assume anything with an id and a type
|
//there will be few exceptions so they will be coded in later if needed but assume anything with an id and a type
|
||||||
if (isCoreBizObject) {
|
if (isCoreBizObject && !ctx.hideCoreBizStandardOptions) {
|
||||||
// vm.appBar.menuItems.push({
|
|
||||||
// title: "Attachments"),
|
|
||||||
// icon: "fa - paperclip",
|
|
||||||
// key: "app:attachments",
|
|
||||||
// data: { ayaType: formAyaType, recordId: formRecordId }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// vm.appBar.menuItems.push({
|
|
||||||
// title: "WikiPage"),
|
|
||||||
// icon: "fa - feather",
|
|
||||||
// key: "app:wiki",
|
|
||||||
// data: { ayaType: formAyaType, recordId: formRecordId }
|
|
||||||
// });
|
|
||||||
|
|
||||||
//"Review" was follow up type of schedule marker
|
//"Review" was follow up type of schedule marker
|
||||||
//basically it's now a "Reminder" type of object but it's own thing with separate collection
|
//basically it's now a "Reminder" type of object but it's own thing with separate collection
|
||||||
|
|
||||||
@@ -168,15 +151,13 @@ export default {
|
|||||||
ctx.formData &&
|
ctx.formData &&
|
||||||
ctx.formData.formCustomTemplateKey != undefined &&
|
ctx.formData.formCustomTemplateKey != undefined &&
|
||||||
window.$gz.role.hasRole([
|
window.$gz.role.hasRole([
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.BizAdminRestricted,
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdmin,
|
||||||
window.$gz.role.AUTHORIZATION_ROLES.BizAdminRestricted
|
window.$gz.role.AUTHORIZATION_ROLES.BizAdminRestricted
|
||||||
])
|
])
|
||||||
) {
|
) {
|
||||||
//NOTE: BizAdmin can edit, BizAdminRestricted can read only
|
//NOTE: BizAdmin can edit, BizAdminRestricted can read only
|
||||||
//add customize menu item
|
//add customize menu item
|
||||||
//DIVIDER
|
|
||||||
//Insert the devider between context and global items
|
|
||||||
// vm.appBar.menuItems.push({ divider: true, inset: false });
|
|
||||||
//customize
|
//customize
|
||||||
vm.appBar.menuItems.push({
|
vm.appBar.menuItems.push({
|
||||||
title: "Customize",
|
title: "Customize",
|
||||||
|
|||||||
@@ -1855,6 +1855,8 @@ function generateMenu(vm) {
|
|||||||
let menuOptions = {
|
let menuOptions = {
|
||||||
isMain: false,
|
isMain: false,
|
||||||
readOnly: vm.formState.readOnly,
|
readOnly: vm.formState.readOnly,
|
||||||
|
hideCoreBizStandardOptions: vm.obj.userIsRestrictedType,
|
||||||
|
hideSearch: vm.obj.userIsRestrictedType,
|
||||||
icon: "$ayiTools",
|
icon: "$ayiTools",
|
||||||
title: "WorkOrder",
|
title: "WorkOrder",
|
||||||
helpUrl: "svc-workorders",
|
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({
|
menuOptions.menuItems.push({
|
||||||
title: "Delete",
|
title: "Delete",
|
||||||
icon: "$ayiTrashAlt",
|
icon: "$ayiTrashAlt",
|
||||||
@@ -1898,7 +1904,7 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
//get last report selected
|
//get last report selected
|
||||||
let lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
let lastReport = window.$gz.form.getLastReport(FORM_KEY);
|
||||||
if (lastReport != null) {
|
if (lastReport != null && !vm.obj.userIsRestrictedType) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: lastReport.name,
|
title: lastReport.name,
|
||||||
icon: "$ayiFileAlt",
|
icon: "$ayiFileAlt",
|
||||||
@@ -1907,7 +1913,7 @@ function generateMenu(vm) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.rights.change) {
|
if (vm.rights.change && !vm.obj.userIsRestrictedType) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "New",
|
title: "New",
|
||||||
icon: "$ayiPlus",
|
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({
|
menuOptions.menuItems.push({
|
||||||
title: "Duplicate",
|
title: "Duplicate",
|
||||||
icon: "$ayiClone",
|
icon: "$ayiClone",
|
||||||
@@ -1927,25 +1937,27 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
//--- /show all ---
|
//--- /show all ---
|
||||||
|
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
if (!vm.obj.userIsRestrictedType) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
title: "WorkOrderStatusList",
|
menuOptions.menuItems.push({
|
||||||
icon: "$ayiFlag",
|
title: "WorkOrderStatusList",
|
||||||
key: FORM_KEY + ":statuslist",
|
icon: "$ayiFlag",
|
||||||
vm: vm
|
key: FORM_KEY + ":statuslist",
|
||||||
});
|
vm: vm
|
||||||
menuOptions.menuItems.push({
|
});
|
||||||
title: "WorkOrderItemStatusList",
|
menuOptions.menuItems.push({
|
||||||
icon: "$ayiCircle",
|
title: "WorkOrderItemStatusList",
|
||||||
key: FORM_KEY + ":itemstatuslist",
|
icon: "$ayiCircle",
|
||||||
vm: vm
|
key: FORM_KEY + ":itemstatuslist",
|
||||||
});
|
vm: vm
|
||||||
menuOptions.menuItems.push({
|
});
|
||||||
title: "WorkOrderItemPriorityList",
|
menuOptions.menuItems.push({
|
||||||
icon: "$ayiFireAlt",
|
title: "WorkOrderItemPriorityList",
|
||||||
key: FORM_KEY + ":prioritylist",
|
icon: "$ayiFireAlt",
|
||||||
vm: vm
|
key: FORM_KEY + ":prioritylist",
|
||||||
});
|
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