From 453beec6058b6f8a8a73ccdc41bd3bfba40a4ebd Mon Sep 17 00:00:00 2001 From: Arthur Lefebvre Date: Tue, 3 Feb 2026 18:59:48 +0100 Subject: [PATCH] Add link to author in bookform --- front/src/BookForm.vue | 10 ++++++++-- internal/apitest/get_book_test.go | 3 +++ internal/dto/out.go | 1 + internal/query/query.go | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/front/src/BookForm.vue b/front/src/BookForm.vue index d5be5e5..25a3414 100644 --- a/front/src/BookForm.vue +++ b/front/src/BookForm.vue @@ -3,11 +3,13 @@ import { ref, computed } from 'vue' import { getBook, getImagePathOrDefault, putReadBook, putWantReadBook, putRateBook, putStartReadDate, putStartReadDateUnset, putEndReadDate, putEndReadDateUnset, putUnreadBook } from './api.js' - import { onBeforeRouteUpdate } from 'vue-router' + import { useRouter, onBeforeRouteUpdate } from 'vue-router' import { VRating } from 'vuetify/components/VRating'; import BigIcon from './BigIcon.vue'; import BookDateWidget from './BookDateWidget.vue'; + + const router = useRouter(); const props = defineProps({ id: String }); @@ -81,6 +83,10 @@ return isStartReadDateSet && isReadUnset; } + function goToAuthor() { + router.push("/author/" + data.value.authorId) + } +