This commit is contained in:
@@ -54,7 +54,7 @@ todo: excerpt, add as part of item object and conditionally show
|
|||||||
todo: search controller at server needs an excerpt route so client can request an excerpt for a record
|
todo: search controller at server needs an excerpt route so client can request an excerpt for a record
|
||||||
todo: session cache search results and scroll position if possible to support "back and forthing"
|
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 what order should the results be retruned in, right now is by id but looks weird in list
|
||||||
|
todo: look at using finally block in all fetch form calls to do the things that are repeated in catch and then above it see search form for example
|
||||||
|
|
||||||
todo: HUGE layout - go through all forms set browser to 4k ultra hd and see where things line up
|
todo: HUGE layout - go through all forms set browser to 4k ultra hd and see where things line up
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getExcerpt(item) {
|
getExcerpt(item) {
|
||||||
item.info = "***NEW INFO HERE****";
|
if (item.info) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// item.info = "***NEW INFO HERE****";
|
||||||
},
|
},
|
||||||
getDataFromApi() {
|
getDataFromApi() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
@@ -204,8 +207,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
vm.maxResultsReturned =
|
vm.maxResultsReturned =
|
||||||
res.data.searchResults.length == MAX_RESULTS;
|
res.data.searchResults.length == MAX_RESULTS;
|
||||||
|
|
||||||
// vm.items = [];
|
|
||||||
let newResults = [];
|
let newResults = [];
|
||||||
let nDex = 0;
|
let nDex = 0;
|
||||||
let lastType = -1;
|
let lastType = -1;
|
||||||
@@ -232,24 +233,24 @@ export default {
|
|||||||
|
|
||||||
newResults.push(item);
|
newResults.push(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
vm.items = newResults;
|
vm.items = newResults;
|
||||||
|
// //Update the form status
|
||||||
|
// window.$gz.form.setFormState({
|
||||||
|
// vm: vm,
|
||||||
|
|
||||||
//Update the form status
|
// loading: false
|
||||||
window.$gz.form.setFormState({
|
// });
|
||||||
vm: vm,
|
|
||||||
|
|
||||||
loading: false
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function handleGetDataFromAPIError(error) {
|
.catch(function handleGetDataFromAPIError(error) {
|
||||||
|
window.$gz.errorHandler.handleFormError(error, vm);
|
||||||
|
})
|
||||||
|
.finally(function() {
|
||||||
//Update the form status
|
//Update the form status
|
||||||
window.$gz.form.setFormState({
|
window.$gz.form.setFormState({
|
||||||
vm: vm,
|
vm: vm,
|
||||||
loading: false
|
loading: false
|
||||||
});
|
});
|
||||||
window.$gz.errorHandler.handleFormError(error, vm);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user