2
0
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:
Faris Ansari 2019-12-11 17:54:02 +05:30
parent 185b87bc2b
commit 865bf1f60e
3 changed files with 6 additions and 5 deletions

View File

@ -31,8 +31,9 @@ module.exports = {
condition: doc => !doc.isNew(),
action: customer => {
router.push({
path: `/list/SalesInvoice`,
query: {
name: 'ListView',
params: {
doctype: 'SalesInvoice',
filters: {
customer: customer.name
}

View File

@ -46,7 +46,7 @@ export default {
Icon,
FilterDropdown
},
mounted() {
activated() {
if (typeof this.filters === 'object') {
this.$refs.filterDropdown.setFilter(this.filters);
}

View File

@ -54,10 +54,10 @@ const routes = [
},
props: {
default: route => {
const { doctype } = route.params;
const { doctype, filters } = route.params;
return {
doctype,
filters: route.query.filters
filters
};
},
edit: route => route.query