mirror of
https://github.com/frappe/books.git
synced 2024-11-13 00:46:28 +00:00
fix: Add views to SearchBar
This commit is contained in:
parent
387254fbbb
commit
41d586cf35
@ -75,8 +75,9 @@ export default {
|
|||||||
makeSearchList() {
|
makeSearchList() {
|
||||||
const doctypes = this.getDoctypes();
|
const doctypes = this.getDoctypes();
|
||||||
const reports = this.getReports();
|
const reports = this.getReports();
|
||||||
|
const views = this.getViews();
|
||||||
|
|
||||||
let searchList = [].concat(doctypes).concat(reports);
|
let searchList = [...doctypes, ...reports, ...views];
|
||||||
this.searchList = searchList.map(d => {
|
this.searchList = searchList.map(d => {
|
||||||
if (d.route) {
|
if (d.route) {
|
||||||
d.action = () => this.routeTo(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) {
|
routeTo(route) {
|
||||||
this.$router.push(route);
|
this.$router.push(route);
|
||||||
this.inputValue = '';
|
this.inputValue = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user