mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
feat: add item segregation in sidebar
This commit is contained in:
parent
d9108d5103
commit
fd73c643b5
@ -54,7 +54,7 @@ const routes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/list/:doctype',
|
||||
path: '/list/:doctype/:fieldname?/:value?',
|
||||
name: 'ListView',
|
||||
components: {
|
||||
default: ListView,
|
||||
@ -62,7 +62,11 @@ const routes = [
|
||||
},
|
||||
props: {
|
||||
default: (route) => {
|
||||
const { doctype, filters } = route.params;
|
||||
let { doctype, filters, fieldname, value } = route.params;
|
||||
if (filters === undefined && fieldname && value) {
|
||||
filters = { [fieldname]: value };
|
||||
}
|
||||
|
||||
return {
|
||||
doctype,
|
||||
filters,
|
||||
|
@ -33,6 +33,11 @@ const config = {
|
||||
route: '/list/Customer',
|
||||
doctype: 'Customer',
|
||||
},
|
||||
{
|
||||
label: t`Sales Items`,
|
||||
route: '/list/Item/for/sales',
|
||||
doctype: 'Item',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -50,18 +55,18 @@ const config = {
|
||||
route: '/list/Supplier',
|
||||
doctype: 'Supplier',
|
||||
},
|
||||
{
|
||||
label: t`Purchase Items`,
|
||||
route: '/list/Item/for/purchases',
|
||||
doctype: 'Item',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
icon: 'common-entries',
|
||||
title: t`Common`,
|
||||
route: '/list/Item',
|
||||
route: '/list/Payment',
|
||||
items: [
|
||||
{
|
||||
label: t`Items`,
|
||||
route: '/list/Item',
|
||||
doctype: 'Item',
|
||||
},
|
||||
{
|
||||
label: t`Payments`,
|
||||
route: '/list/Payment',
|
||||
@ -72,6 +77,11 @@ const config = {
|
||||
route: '/list/JournalEntry',
|
||||
doctype: 'JournalEntry',
|
||||
},
|
||||
{
|
||||
label: t`Common Items`,
|
||||
route: '/list/Item/for/both',
|
||||
doctype: 'Item',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user