feat: enable modal for singleTaskInList and ListTable

This commit is contained in:
Dominik Pschenitschni 2022-11-22 18:41:55 +01:00
parent e6b353f8ac
commit 440e90230a
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
2 changed files with 8 additions and 13 deletions

View File

@ -13,7 +13,11 @@
/>
<router-link
:to="taskDetailRoute"
:to="{
name: 'task.detail',
params: {id: task.id},
state: { backdropRoutePath: $route.fullPath },
}"
:class="{ 'done': task.done}"
class="tasktext"
>
@ -221,14 +225,6 @@ const currentList = computed(() => {
} : baseStore.currentList
})
const taskDetailRoute = computed(() => ({
name: 'task.detail',
params: {id: task.value.id},
// TODO: re-enable opening task detail in modal
// state: { backdropRoutePath: router.currentRoute.value.fullPath },
}))
async function markAsDone(checked: boolean) {
const updateFunc = async () => {
const newTask = await taskStore.update(task.value)

View File

@ -181,7 +181,7 @@
<script setup lang="ts">
import {toRef, computed, type Ref} from 'vue'
import {useRoute} from 'vue-router'
import {useStorage} from '@vueuse/core'
import ListWrapper from '@/components/list/ListWrapper.vue'
@ -274,15 +274,14 @@ function sort(property: keyof SortBy) {
sortByParam.value = sortBy.value
}
// TODO: re-enable opening task detail in modal
// const router = useRouter()
const route = useRoute()
const taskDetailRoutes = computed(() => Object.fromEntries(
tasks.value.map(({id}) => ([
id,
{
name: 'task.detail',
params: {id},
// state: { backdropRoutePath: router.currentRoute.value.fullPath },
state: { backdropRoutePath: route.fullPath },
},
])),
))