This commit is contained in:
2020-02-27 00:27:06 +00:00
parent 73e3cf1269
commit 643173d166
4 changed files with 16 additions and 105 deletions

View File

@@ -21,14 +21,17 @@ export default {
var formAyaType = 0;
var formRecordId = 0;
if (ctx.formData) {
if (ctx.formData.ayaType != undefined) {
if (ctx.formData.ayaType != null) {
formAyaType = ctx.formData.ayaType;
}
if (ctx.formData.ayaType != undefined) {
if (ctx.formData.recordId != null) {
formRecordId = ctx.formData.recordId;
}
}
//flag for if it's wikiable, reviewable, attachable, searchable, historical
var isCoreBizObject = formAyaType != 0 && formRecordId != 0;
//set the help url if presented or default to the User section intro
vm.appBar.helpUrl = ctx.helpUrl ? ctx.helpUrl : "user-intro";
@@ -44,7 +47,10 @@ export default {
}
//WIKI, ATTACHMENTS, RECORD HISTORY
if (formAyaType != 0 && formRecordId != 0) {
//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
//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) {
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Attachments"),
icon: "paperclip",
@@ -59,6 +65,9 @@ export default {
data: { ayaType: formAyaType, recordId: formRecordId }
});
//"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
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Review"),
icon: "calendar-check",
@@ -66,6 +75,8 @@ export default {
data: { ayaType: formAyaType, recordId: formRecordId }
});
//AFAIK right now any item with an id and a type can have a history
//anything not would be the exception rather than the rule
vm.appBar.menuItems.push({
title: window.$gz.locale.get("History"),
icon: "history",
@@ -107,7 +118,7 @@ export default {
vm.appBar.menuItems.push({ divider: true, inset: false });
//SEARCH
if (ctx.icon != "fa-search") {
if (isCoreBizObject && ctx.icon != "fa-search") {
//For all forms but not on the search form itself; if this is necessary for others then make a nosearch or something flag controlled by incoming ctx but if not then this should suffice
vm.appBar.menuItems.push({
title: window.$gz.locale.get("Search"),