fix: passing readonly projects data to navigation
This commit is contained in:
parent
ac78e85e17
commit
d85be26761
@ -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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user