This commit is contained in:
Vri 🌈 2023-06-22 21:04:01 +02:00
parent 3402d6f33c
commit 92ab1d5d46
Signed by: vrifox
GPG key ID: D40098E5B60B2197
4 changed files with 26 additions and 21 deletions

View file

@ -8,12 +8,12 @@ export default {
TopicList,
},
computed: {
topics() {
topics(): Array<Object> {
const topicReferences = [...new Set(this.papers?.map((paper: any) => paper.reference))]
return topicReferences.map( (entry: any) => {
return topicReferences.map( (ref: String) => {
return {
'ref': entry,
'paper': this.papers?.find( (paper: any) => paper.reference == entry)
'ref': ref,
'papers': this.papers?.filter( (paper: any) => paper.reference === ref) as Object,
}
})
},