From 643173d166001ecbd4ed35a90f9dc12fba896f4f Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 27 Feb 2020 00:27:06 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 5 +- ayanova/src/api/gzmenu.js | 19 +++- ayanova/src/views/ay-data-list-view.vue | 94 ------------------- .../src/views/test-inventory-widget-edit.vue | 3 - 4 files changed, 16 insertions(+), 105 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 99f3c03e..01e9dfac 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -44,9 +44,6 @@ CURRENT TODOs -todo: when duplicate is inactive it looks the same, is it really being set inactive? - - It's inactive if the dlv is dirty or invalid - todo: datalistview editor - showing options for wiki and attach etc, not required need to add override in gzmenu @@ -90,7 +87,7 @@ todo: check if this block about reports and listview is in the spec doc for the ---------------------- NON DATALISTVIEW STUFF ---------------------------- - +todo: about link is showing on about form TODO: No way to make a new widget now!!! TODO: save (post) of new record at client triggers renavigation to that page again which also triggers fetch - So what's the point of returning the full record on post? diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index a4fea123..2deee52e 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -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"), diff --git a/ayanova/src/views/ay-data-list-view.vue b/ayanova/src/views/ay-data-list-view.vue index aa035828..2f6fcaaa 100644 --- a/ayanova/src/views/ay-data-list-view.vue +++ b/ayanova/src/views/ay-data-list-view.vue @@ -1541,98 +1541,4 @@ function generateListViewFromEdited(vm) { } /////////////END OF FORM////////////////// - -/* - - - - - - - - - - - - - - - - - - - public const string OpEquality = "="; - public const string OpGreaterThan = ">"; - public const string OpGreaterThanOrEqualTo = ">="; - public const string OpLessThan = "<"; - public const string OpLessThanOrEqualTo = "<="; - public const string OpNotEqual = "!="; - public const string OpNotLike = "!%"; - public const string OpStartsWith = "%-"; - public const string OpEndsWith = "-%"; - public const string OpContains = "-%-"; - public const string OpNotContains = "!-%-"; - - =-=-=-=- - public const string TokenYesterday = "{[yesterday]}"; - public const string TokenToday = "{[today]}"; - public const string TokenTomorrow = "{[tomorrow]}"; - public const string TokenLastWeek = "{[lastweek]}"; - public const string TokenThisWeek = "{[thisweek]}"; - public const string TokenNextWeek = "{[nextweek]}"; - public const string TokenLastMonth = "{[lastmonth]}"; - public const string TokenThisMonth = "{[thismonth]}"; - public const string TokenNextMonth = "{[nextmonth]}"; - public const string TokenFourteenDayWindow = "{[14daywindow]}"; - public const string TokenPast = "{[past]}"; - public const string TokenFuture = "{[future]}"; - public const string TokenLastYear = "{[lastyear]}"; - public const string TokenThisYear = "{[thisyear]}"; - public const string TokenInTheLast3Months = "{[last3months]}"; - public const string TokenInTheLast6Months = "{[last6months]}"; - public const string TokenInTheLastYear = "{[lastcalendaryear]}"; - - //More business time frames - - public const string TokenYearToDate = "{[yeartodate]}"; - - public const string TokenPast90Days = "{[past90days]}"; - public const string TokenPast30Days = "{[past30days]}"; - public const string TokenPast24Hours = "{[past24hours]}"; - - //Months THIS year - public const string TokenJanuary = "{[january]}"; - public const string TokenFebruary = "{[february]}"; - public const string TokenMarch = "{[march]}"; - public const string TokenApril = "{[april]}"; - public const string TokenMay = "{[may]}"; - public const string TokenJune = "{[june]}"; - public const string TokenJuly = "{[july]}"; - public const string TokenAugust = "{[august]}"; - public const string TokenSeptember = "{[september]}"; - public const string TokenOctober = "{[october]}"; - public const string TokenNovember = "{[november]}"; - public const string TokenDecember = "{[december]}"; - - - - public enum UiFieldDataType : int - { - NoType = 0, - DateTime = 1, - Date = 2, - Time = 3, - Text = 4, - Integer = 5, - Bool = 6, - Decimal = 7, - Currency = 8, - Tags = 9, - Enum = 10, - EmailAddress = 11, - HTTP = 12, - InternalId = 13 - - } - */ diff --git a/ayanova/src/views/test-inventory-widget-edit.vue b/ayanova/src/views/test-inventory-widget-edit.vue index 386b640b..fdb48414 100644 --- a/ayanova/src/views/test-inventory-widget-edit.vue +++ b/ayanova/src/views/test-inventory-widget-edit.vue @@ -395,13 +395,11 @@ export default { //enable / disable duplicate button var canDuplicate = !val.dirty && val.valid && !val.readOnly; if (canDuplicate) { - console.log("enabling duplicate"); window.$gz.eventBus.$emit( "menu-enable-item", FORM_KEY + ":duplicate" ); } else { - console.log("disabling duplicate"); window.$gz.eventBus.$emit( "menu-disable-item", FORM_KEY + ":duplicate" @@ -704,7 +702,6 @@ function generateMenu(vm) { }); if (vm.rights.change) { - console.log("Adding duplicate menu option"); menuOptions.menuItems.push({ title: window.$gz.locale.get("Duplicate"), icon: "clone",