This commit is contained in:
2020-04-10 22:36:09 +00:00
parent 3505f0d0c5
commit 2cff272537
3 changed files with 61 additions and 7 deletions

View File

@@ -148,12 +148,16 @@ export default {
return ret; return ret;
}, /////////////////////////////// }, ///////////////////////////////
// ICON FOR CORE OBJECT TYPES // ICON FOR *ALL* OBJECT TYPES
//(used for search results) //(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 //CoreBizObject add here
iconForCoreType: function(aytype) { iconForType: function(aytype) {
switch (aytype) { switch (aytype) {
case window.$gz.type.NoType:
return "fa-genderless";
case window.$gz.type.Global:
return "fa-globe";
case window.$gz.type.User: case window.$gz.type.User:
return "fa-user"; return "fa-user";
case window.$gz.type.Widget: case window.$gz.type.Widget:
@@ -162,6 +166,35 @@ export default {
return null; 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 //new functions above here
}; };

View File

@@ -55,6 +55,7 @@ export default {
return { return {
obj: [], obj: [],
eventTypes: {}, eventTypes: {},
ayaTypes: {},
lastOffset: 0, lastOffset: 0,
formState: { formState: {
ready: false, ready: false,
@@ -209,7 +210,8 @@ function initForm(vm) {
(async function() { (async function() {
try { try {
await fetchTranslatedText(vm); await fetchTranslatedText(vm);
await populateSelectionLists(vm); await populateAyaTypeList(vm);
await populateEventTypeList(vm);
} catch (err) { } catch (err) {
reject(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 = { vm.eventTypes = {
0: { name: vm.$ay.t("EventDeleted"), icon: "fa-trash-alt" }, 0: { name: vm.$ay.t("EventDeleted"), icon: "fa-trash-alt" },
1: { name: vm.$ay.t("EventCreated"), icon: "fa-plus" }, 1: { name: vm.$ay.t("EventCreated"), icon: "fa-plus" },

View File

@@ -304,7 +304,7 @@ export default {
item.subheader = "TYPE " + item.type; item.subheader = "TYPE " + item.type;
} }
item.icon = window.$gz.util.iconForCoreType(item.type); item.icon = window.$gz.util.iconForType(item.type);
lastType = item.type; lastType = item.type;
} }
item.info = null; item.info = null;