1
0

fix: sort in store

This commit is contained in:
kolaente
2023-04-14 17:21:28 +02:00
parent a3e2cbeb27
commit 46e825820c
2 changed files with 4 additions and 5 deletions

View File

@ -32,7 +32,8 @@ export const useProjectStore = defineStore('project', () => {
// The projects are stored as an object which has the project ids as keys.
const projects = ref<ProjectState>({})
const projectsArray = computed(() => Object.values(projects.value))
const projectsArray = computed(() => Object.values(projects.value)
.sort((a, b) => a.position - b.position))
const notArchivedRootProjects = computed(() => projectsArray.value
.filter(p => p.parentProjectId === 0 && !p.isArchived))
const favoriteProjects = computed(() => projectsArray.value