1
0

chore: export projects as array directly from projects store

This commit is contained in:
kolaente
2023-03-28 15:36:31 +02:00
parent 2bb7ff1803
commit e4379f0a22
3 changed files with 5 additions and 4 deletions

View File

@ -79,10 +79,10 @@ onBeforeMount(async () => {
await projectStore.loadProjects()
})
const projects = computed(() => Object.values(projectStore.projects)
const projects = computed(() => projectStore.projectsArray
.filter(p => p.parentProjectId === 0 && !p.isArchived)
.sort((a, b) => a.position < b.position ? -1 : 1))
const favoriteProjects = computed(() => Object.values(projectStore.projects)
const favoriteProjects = computed(() => projectStore.projectsArray
.filter(p => !p.isArchived && p.isFavorite)
.map(p => ({
...p,