improve type filter

This commit is contained in:
Vri 🌈 2023-06-16 15:29:25 +02:00
parent 8e852e7041
commit 7203110a55
Signed by: vrifox
GPG key ID: D40098E5B60B2197
2 changed files with 5 additions and 2 deletions

View file

@ -56,7 +56,10 @@ export default {
}, },
], ],
paperFilter: { paperFilter: {
type: '', type: {
key: '',
value: '',
},
originator: '', originator: '',
}, },
} }

View file

@ -39,7 +39,7 @@ export default {
} }
if (this.paperFilter?.type !== '') { if (this.paperFilter?.type !== '') {
filteredPapers = filteredPapers.filter((paper) => { filteredPapers = filteredPapers.filter((paper) => {
return paper.reference.includes(this.paperFilter?.type) return paper.reference.includes(this.paperFilter?.type.key) && paper.paper_type.includes(this.paperFilter?.type.value)
}) })
} }
return filteredPapers return filteredPapers