fix: passing readonly projects data to navigation
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
kolaente 2023-04-01 11:23:08 +02:00
parent 9fd6ea2f4d
commit 2cf1e91b63
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -1,10 +1,10 @@
<template> <template>
<nav class="menu" v-if="favoriteProjects"> <nav class="menu" v-if="favoriteProjects">
<ProjectsNavigation v-model="favoriteProjects" :can-edit-order="false"/> <ProjectsNavigation :model-value="favoriteProjects" :can-edit-order="false"/>
</nav> </nav>
<nav class="menu"> <nav class="menu">
<ProjectsNavigation v-model="projects" :can-edit-order="true"/> <ProjectsNavigation :model-value="projects" :can-edit-order="true"/>
</nav> </nav>
</template> </template>
@ -17,13 +17,8 @@ const projectStore = useProjectStore()
await projectStore.loadProjects() await projectStore.loadProjects()
const projects = computed({ const projects = computed(() => projectStore.notArchivedRootProjects
get() { .sort((a, b) => a.position - b.position))
return projectStore.notArchivedRootProjects
.sort((a, b) => a.position - b.position)
},
set() { }, // Vue will complain about the component not being writable - but we never need to write here. The setter is only here to silence the warning.
})
const favoriteProjects = computed(() => projectStore.favoriteProjects const favoriteProjects = computed(() => projectStore.favoriteProjects
.sort((a, b) => a.position - b.position)) .sort((a, b) => a.position - b.position))
</script> </script>