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:
parent
387254fbbb
commit
41d586cf35
@ -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 = '';
|
||||
|
Loading…
Reference in New Issue
Block a user