mirror of
https://github.com/frappe/books.git
synced 2025-02-03 04:28:32 +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',
|
name: 'ListView',
|
||||||
components: {
|
components: {
|
||||||
default: ListView,
|
default: ListView,
|
||||||
@ -62,7 +62,11 @@ const routes = [
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
default: (route) => {
|
default: (route) => {
|
||||||
const { doctype, filters } = route.params;
|
let { doctype, filters, fieldname, value } = route.params;
|
||||||
|
if (filters === undefined && fieldname && value) {
|
||||||
|
filters = { [fieldname]: value };
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
doctype,
|
doctype,
|
||||||
filters,
|
filters,
|
||||||
|
@ -33,6 +33,11 @@ const config = {
|
|||||||
route: '/list/Customer',
|
route: '/list/Customer',
|
||||||
doctype: 'Customer',
|
doctype: 'Customer',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t`Sales Items`,
|
||||||
|
route: '/list/Item/for/sales',
|
||||||
|
doctype: 'Item',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -50,18 +55,18 @@ const config = {
|
|||||||
route: '/list/Supplier',
|
route: '/list/Supplier',
|
||||||
doctype: 'Supplier',
|
doctype: 'Supplier',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t`Purchase Items`,
|
||||||
|
route: '/list/Item/for/purchases',
|
||||||
|
doctype: 'Item',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'common-entries',
|
icon: 'common-entries',
|
||||||
title: t`Common`,
|
title: t`Common`,
|
||||||
route: '/list/Item',
|
route: '/list/Payment',
|
||||||
items: [
|
items: [
|
||||||
{
|
|
||||||
label: t`Items`,
|
|
||||||
route: '/list/Item',
|
|
||||||
doctype: 'Item',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: t`Payments`,
|
label: t`Payments`,
|
||||||
route: '/list/Payment',
|
route: '/list/Payment',
|
||||||
@ -72,6 +77,11 @@ const config = {
|
|||||||
route: '/list/JournalEntry',
|
route: '/list/JournalEntry',
|
||||||
doctype: 'JournalEntry',
|
doctype: 'JournalEntry',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t`Common Items`,
|
||||||
|
route: '/list/Item/for/both',
|
||||||
|
doctype: 'Item',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user