mirror of
https://github.com/frappe/books.git
synced 2024-09-20 03:29:00 +00:00
fix: Set filters from route in ListView
This commit is contained in:
parent
185b87bc2b
commit
865bf1f60e
@ -31,8 +31,9 @@ module.exports = {
|
|||||||
condition: doc => !doc.isNew(),
|
condition: doc => !doc.isNew(),
|
||||||
action: customer => {
|
action: customer => {
|
||||||
router.push({
|
router.push({
|
||||||
path: `/list/SalesInvoice`,
|
name: 'ListView',
|
||||||
query: {
|
params: {
|
||||||
|
doctype: 'SalesInvoice',
|
||||||
filters: {
|
filters: {
|
||||||
customer: customer.name
|
customer: customer.name
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ export default {
|
|||||||
Icon,
|
Icon,
|
||||||
FilterDropdown
|
FilterDropdown
|
||||||
},
|
},
|
||||||
mounted() {
|
activated() {
|
||||||
if (typeof this.filters === 'object') {
|
if (typeof this.filters === 'object') {
|
||||||
this.$refs.filterDropdown.setFilter(this.filters);
|
this.$refs.filterDropdown.setFilter(this.filters);
|
||||||
}
|
}
|
||||||
|
@ -54,10 +54,10 @@ const routes = [
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
default: route => {
|
default: route => {
|
||||||
const { doctype } = route.params;
|
const { doctype, filters } = route.params;
|
||||||
return {
|
return {
|
||||||
doctype,
|
doctype,
|
||||||
filters: route.query.filters
|
filters
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
edit: route => route.query
|
edit: route => route.query
|
||||||
|
Loading…
Reference in New Issue
Block a user