diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2e0e241d..9a39be04 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -53,7 +53,7 @@ CURRENT TODOs todo: search - center the whole thing, looks silly to the left when everything else is centered todo: session cache search results and scroll position if possible to support "back and forthing" - +todo: search what order should the results be retruned in, right now is by id but looks weird in list todo: SEARCH UI - case insensitive by default unless server overriden like picklist - all searches without wildcards or quotes are "contains" searches by default and multiple phrases space delimited are accomodated diff --git a/ayanova/src/views/home-search.vue b/ayanova/src/views/home-search.vue index 7eb15e0c..c87e6191 100644 --- a/ayanova/src/views/home-search.vue +++ b/ayanova/src/views/home-search.vue @@ -34,35 +34,64 @@ fa-search - - + +

{{ $ay.t("NoResults") }}

- + ({{ $ay.t("TooManyResults") }}) @@ -197,12 +226,16 @@ export default { //vm.results = res.data.searchResults; let newResults = []; + let lastType = -1; for (let i = 0; i < res.data.searchResults.length; i++) { let item = res.data.searchResults[i]; - let icon = window.$gz.util.iconForCoreType(item.type); - if (icon) { - item["icon"] = icon; + if (item.type != lastType) { + //change of type, set subheader props + item["subheader"] = item.type; + item["icon"] = window.$gz.util.iconForCoreType(item.type); + lastType = item.type; } + newResults.push(item); } vm.results = newResults;