2020-02-18 08:57:00 +01:00
|
|
|
<template>
|
|
|
|
<section class="section container" v-if="todo">
|
|
|
|
<nav class="breadcrumb" aria-label="breadcrumbs">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<router-link
|
|
|
|
:to="{
|
|
|
|
name: RouteName.GROUP,
|
2020-11-30 10:24:11 +01:00
|
|
|
params: {
|
|
|
|
preferredUsername: todo.todoList.actor.preferredUsername,
|
|
|
|
},
|
2020-02-18 08:57:00 +01:00
|
|
|
}"
|
2020-09-29 09:53:48 +02:00
|
|
|
>{{ todo.todoList.actor.name }}</router-link
|
2020-02-18 08:57:00 +01:00
|
|
|
>
|
|
|
|
</li>
|
|
|
|
<li>
|
2020-11-30 10:24:11 +01:00
|
|
|
<router-link
|
|
|
|
:to="{
|
|
|
|
name: RouteName.TODO_LIST,
|
|
|
|
params: { id: todo.todoList.id },
|
|
|
|
}"
|
|
|
|
>
|
2020-02-18 08:57:00 +01:00
|
|
|
{{ todo.todoList.title }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li class="is-active">
|
|
|
|
<router-link :to="{ name: RouteName.TODO }" aria-current="page">
|
|
|
|
{{ todo.title }}
|
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<full-todo :todo="todo" />
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
|
|
|
import { GET_TODO } from "@/graphql/todos";
|
|
|
|
import { ITodo } from "@/types/todos";
|
|
|
|
import FullTodo from "@/components/Todo/FullTodo.vue";
|
|
|
|
import RouteName from "../../router/name";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
components: {
|
|
|
|
FullTodo,
|
|
|
|
},
|
|
|
|
apollo: {
|
|
|
|
todo: {
|
|
|
|
query: GET_TODO,
|
2020-08-27 11:53:24 +02:00
|
|
|
fetchPolicy: "cache-and-network",
|
2020-02-18 08:57:00 +01:00
|
|
|
variables() {
|
|
|
|
return {
|
|
|
|
id: this.$route.params.todoId,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class Todo extends Vue {
|
|
|
|
@Prop({ type: String, required: true }) todoId!: string;
|
|
|
|
|
|
|
|
todo!: ITodo;
|
|
|
|
|
|
|
|
RouteName = RouteName;
|
|
|
|
}
|
|
|
|
</script>
|