feat(frontend) : add getByProjectArchived to task service

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-12 18:00:31 +01:00
parent 91ffb82e44
commit 84c85b3322

View File

@@ -13,6 +13,15 @@ export function useTaskService() {
async function getByProject(projectId: number): Promise<Task[]> {
const data = await api.get<HydraCollection<Task>>('/tasks', {
project: `/api/projects/${projectId}`,
archived: false,
})
return extractHydraMembers(data)
}
async function getByProjectArchived(projectId: number): Promise<Task[]> {
const data = await api.get<HydraCollection<Task>>('/tasks', {
project: `/api/projects/${projectId}`,
archived: true,
})
return extractHydraMembers(data)
}
@@ -35,5 +44,5 @@ export function useTaskService() {
})
}
return { getAll, getByProject, create, update, remove }
return { getAll, getByProject, getByProjectArchived, create, update, remove }
}