stadtratmonitor-vue/src/views/TheTopics.vue

39 lines
831 B
Vue
Raw Normal View History

2023-06-21 18:51:54 +02:00
<script lang="ts">
import FilterView from '@/components/papers/FilterView.vue'
2023-06-21 22:29:53 +02:00
import TopicList from '@/components/papers/TopicList.vue'
2023-06-21 18:51:54 +02:00
export default {
components: {
FilterView,
2023-06-21 22:29:53 +02:00
TopicList,
2023-06-21 18:51:54 +02:00
},
computed: {
topics() {
2023-06-21 22:29:53 +02:00
const topicReferences = [...new Set(this.papers?.map((paper: any) => paper.reference))]
return topicReferences.map( (entry: any) => {
return {
'ref': entry,
'paper': this.papers?.find( (paper: any) => paper.reference == entry)
}
})
},
},
props: {
papers: Array,
search: Object,
filter: Object,
2023-06-21 18:51:54 +02:00
}
}
</script>
<template>
<FilterView
2023-06-21 22:29:53 +02:00
@filter="(filter: any) => filter = filter"
:papers="papers"
/>
<TopicList
:topics="topics"
:search="search"
:filter="filter"
></TopicList>
2023-06-21 18:51:54 +02:00
</template>