From 9eef64ef3445929e21fc150f714f26e6053c0303 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 8 Apr 2020 18:45:25 +0000 Subject: [PATCH] --- ayanova/src/views/home-search.vue | 76 ++++++++++++------------------- 1 file changed, 30 insertions(+), 46 deletions(-) diff --git a/ayanova/src/views/home-search.vue b/ayanova/src/views/home-search.vue index c87e6191..eeaca96a 100644 --- a/ayanova/src/views/home-search.vue +++ b/ayanova/src/views/home-search.vue @@ -45,53 +45,25 @@ @@ -229,15 +201,27 @@ export default { let lastType = -1; for (let i = 0; i < res.data.searchResults.length; i++) { let item = res.data.searchResults[i]; + if (item.type != lastType) { //change of type, set subheader props - item["subheader"] = item.type; + let tsub = window.$gz._.find(vm.selectLists.objectTypes, [ + "id", + item.type + ]); + + if (tsub != null) { + item["subheader"] = tsub.name; + } else { + item["subheader"] = "TYPE " + item.type; + } + item["icon"] = window.$gz.util.iconForCoreType(item.type); lastType = item.type; } newResults.push(item); } + console.log(newResults); vm.results = newResults; //Update the form status