2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: Add views to SearchBar

This commit is contained in:
Faris Ansari 2019-11-26 11:45:14 +05:30
parent 387254fbbb
commit 41d586cf35

View File

@ -75,8 +75,9 @@ export default {
makeSearchList() {
const doctypes = this.getDoctypes();
const reports = this.getReports();
const views = this.getViews();
let searchList = [].concat(doctypes).concat(reports);
let searchList = [...doctypes, ...reports, ...views];
this.searchList = searchList.map(d => {
if (d.route) {
d.action = () => this.routeTo(d.route);
@ -108,6 +109,15 @@ export default {
};
});
},
getViews() {
return [
{
label: 'Chart of Accounts',
route: '/chartOfAccounts',
group: 'List'
}
];
},
routeTo(route) {
this.$router.push(route);
this.inputValue = '';