diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index 0620e1a6..2025f8f3 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -148,12 +148,16 @@ export default { return ret; }, /////////////////////////////// - // ICON FOR CORE OBJECT TYPES - //(used for search results) - // + // ICON FOR *ALL* OBJECT TYPES + //(used for search results and event log / history) + //NOTE: Any object type could appear in event log, they all need to be supported where possible //CoreBizObject add here - iconForCoreType: function(aytype) { + iconForType: function(aytype) { switch (aytype) { + case window.$gz.type.NoType: + return "fa-genderless"; + case window.$gz.type.Global: + return "fa-globe"; case window.$gz.type.User: return "fa-user"; case window.$gz.type.Widget: @@ -162,6 +166,35 @@ export default { return null; } } + /** + * + NoType = 0, + Global = 1, + + [CoreBizObject] + Widget = 2,//attachable, wikiable, reviewable + + [CoreBizObject] + User = 3,//attachable, wikiable, reviewable + + ServerState = 4,fa-door-open + License = 5, + LogFile = 6, + PickListTemplate = 7, + DEPRECATED_REUSELATER_8 = 8, + JobOperations = 9, + AyaNova7Import = 10, + TrialSeeder = 11, + Metrics = 12, + Translation = 13, + UserOptions = 14, + DEPRECATED_REUSELATER_15 = 15, + DEPRECATED_REUSELATER_16 = 16, + FileAttachment = 17, + DataListView = 18, + FormCustom = 19 + */ + //new functions above here }; diff --git a/ayanova/src/views/ay-history.vue b/ayanova/src/views/ay-history.vue index 1c8777a7..e03e8de8 100644 --- a/ayanova/src/views/ay-history.vue +++ b/ayanova/src/views/ay-history.vue @@ -55,6 +55,7 @@ export default { return { obj: [], eventTypes: {}, + ayaTypes: {}, lastOffset: 0, formState: { ready: false, @@ -209,7 +210,8 @@ function initForm(vm) { (async function() { try { await fetchTranslatedText(vm); - await populateSelectionLists(vm); + await populateAyaTypeList(vm); + await populateEventTypeList(vm); } catch (err) { reject(err); } @@ -217,11 +219,30 @@ function initForm(vm) { })(); }); } +////////////////////// +// +// +function populateAyaTypeList(vm) { + //ensure the pick lists required are pre-fetched + return window.$gz.enums.fetchEnumList("ayatype").then(() => { + let ayt = window.$gz.enums.getSelectionList("ayatype"); + let temp={}; + for (let i = 0; i < ayt.length; i++) { + let item=ayt[i]; + let ic=null; + + temp[item.id]={ + name: item.name + } + console.log(ayt[i]); + } + }); +} ///////////////////////////////// // // -function populateSelectionLists(vm) { +function populateEventTypeList(vm) { vm.eventTypes = { 0: { name: vm.$ay.t("EventDeleted"), icon: "fa-trash-alt" }, 1: { name: vm.$ay.t("EventCreated"), icon: "fa-plus" }, diff --git a/ayanova/src/views/home-search.vue b/ayanova/src/views/home-search.vue index 1c97dd74..dcf2d5b7 100644 --- a/ayanova/src/views/home-search.vue +++ b/ayanova/src/views/home-search.vue @@ -304,7 +304,7 @@ export default { item.subheader = "TYPE " + item.type; } - item.icon = window.$gz.util.iconForCoreType(item.type); + item.icon = window.$gz.util.iconForType(item.type); lastType = item.type; } item.info = null;