assign default values for all projects
This commit is contained in:
parent
fb1a86712d
commit
cde0eb1943
1 changed files with 10 additions and 6 deletions
|
|
@ -15,15 +15,19 @@ export const useProjectsStore = defineStore('projects', () => {
|
|||
});
|
||||
|
||||
const draftProjects = computed(() => {
|
||||
return projects.value
|
||||
.filter((project) => project.status === 'draft')
|
||||
.sort((a, b) => new Date(b.modified) - new Date(a.modified));
|
||||
return (
|
||||
projects.value
|
||||
?.filter((project) => project.status === 'draft')
|
||||
.sort((a, b) => new Date(b.modified) - new Date(a.modified)) ?? []
|
||||
);
|
||||
});
|
||||
|
||||
const archivedProjects = computed(() => {
|
||||
return projects.value
|
||||
.filter((project) => project.status === 'unlisted')
|
||||
.sort((a, b) => new Date(b.modified) - new Date(a.modified));
|
||||
return (
|
||||
projects.value
|
||||
?.filter((project) => project.status === 'unlisted')
|
||||
.sort((a, b) => new Date(b.modified) - new Date(a.modified)) ?? []
|
||||
);
|
||||
});
|
||||
|
||||
const api = useApiStore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue