Add link to author in bookform
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -104,7 +110,7 @@
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3 class="title">{{data.title}}</h3>
|
||||
<h3 class="subtitle">{{data.author}}</h3>
|
||||
<h3 class="subtitle" @click="goToAuthor">{{data.author}}</h3>
|
||||
<p>{{data.summary}}</p>
|
||||
<div class="my-5" v-if="data.isbn">ISBN: {{data.isbn}}</div>
|
||||
<div class="my-5" v-if="data.inventaireid">Inventaire ID: {{data.inventaireid}}</div>
|
||||
|
||||
Reference in New Issue
Block a user