From fffe1b47176b06f4a6fb86c6703ce9cbd612c7de Mon Sep 17 00:00:00 2001 From: Flycro Date: Wed, 20 Mar 2024 18:10:02 +0100 Subject: [PATCH] feat: BR Overview + Modal for New Recommendations --- .../BookRecommendationTable.vue | 27 +++- .../modal/NewBookRecommendation.vue | 121 +++++++++++++----- nuxt/stores/book-recommendations.ts | 49 ++++--- 3 files changed, 139 insertions(+), 58 deletions(-) diff --git a/nuxt/components/book-recommendations/BookRecommendationTable.vue b/nuxt/components/book-recommendations/BookRecommendationTable.vue index 969fda1..11d5a7c 100644 --- a/nuxt/components/book-recommendations/BookRecommendationTable.vue +++ b/nuxt/components/book-recommendations/BookRecommendationTable.vue @@ -19,6 +19,10 @@ const columns = [ key: 'author', label: 'Autor', }, + { + key: 'published_at', + label: 'Erstveröffentlichung', + }, { key: 'description', label: 'Beschreibung', @@ -42,27 +46,46 @@ const columns = [ { key: 'votes', label: 'Votes', + sortable: true, }, { key: 'actions', label: '', }, ] +const sort = ref({ + column: 'votes', + direction: 'desc', +}) + +function resolveStatus(status: string) { + return bookRecommendationStore.statusOptions.find(option => option.value === status) +}