diff --git a/ayanova/src/views/home-search.vue b/ayanova/src/views/home-search.vue
index 76330a81..8f4487e0 100644
--- a/ayanova/src/views/home-search.vue
+++ b/ayanova/src/views/home-search.vue
@@ -35,24 +35,6 @@
-
-
-
- -
- {{ item
- }}
- fa-info-circle
-
-
-
-
-
- TEST BUILD
-
-
-
{{ $ay.t("NoResults") }}
@@ -61,8 +43,9 @@
({{ $ay.t("TooManyResults") }})
-
-
+
+ {{ item.icon }}{{
item.subheader
@@ -87,7 +70,6 @@
-
@@ -96,7 +78,6 @@
- {{ items }}
@@ -164,26 +145,7 @@ export default {
},
searchPhrase: null,
searchObjectType: 0,
- results: [],
- items: [
- {
- name: "Awesome Plastic Car 32",
- type: 2,
- id: 7,
- info: null,
- index: 1
- },
- {
- name: "Handcrafted Metal Towels 117",
- type: 2,
- id: 92,
- subheader: "Widget",
- icon: "fa-vial",
- info: null,
- index: 2
- },
- { name: "Awesome Plastic Car 32", type: 2, id: 7, info: null, index: 3 }
- ],
+ items: [],
maxResultsReturned: false,
formState: {
ready: false,
@@ -200,28 +162,12 @@ export default {
},
methods: {
- test(item) {
- item.name = "NEW NAME";
- },
- testBuild() {
- console.log("TEST BUILD");
- for (let i = 4; i < 10; i++) {
- console.log("Pushing item ", i);
- this.items.push({
- name: "Awesome Plastic Car" + i,
- type: 2,
- id: 7,
- info: null,
- index: i
- });
- }
- },
openItem(item) {
console.log("open item", item);
},
getExcerpt(item) {
item.info = "***NEW INFO HERE****";
- this.$forceUpdate();
+
// let v = this.results[i];
// console.log("getExcerpt results before:", this.results[i].info);
// v.info = "NEW INFO HERE";
@@ -245,7 +191,7 @@ export default {
}
*
*/
- console.log("Searching...");
+
window.$gz.api
.upsert(API_BASE_URL, {
phrase: vm.searchPhrase,
@@ -259,12 +205,10 @@ export default {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
- console.log("Results returned, processing...");
vm.maxResultsReturned =
res.data.searchResults.length == MAX_RESULTS;
- //vm.results = res.data.searchResults;
- vm.items = [];
+ // vm.items = [];
let newResults = [];
let nDex = 0;
let lastType = -1;
@@ -277,12 +221,11 @@ export default {
item.type
]);
-//this is breaking shit
- // if (tsub != null) {
- // item.subheader = tsub.name;
- // } else {
- // item.subheader = "TYPE " + 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;
@@ -292,7 +235,7 @@ export default {
newResults.push(item);
}
- console.log("Pusshing newResults into items now...");
+
vm.items = newResults;
//Update the form status