feat(admin) : add task reassignment logic to AdminStatusTab

This commit is contained in:
Matthieu
2026-03-12 11:51:15 +01:00
parent 9d5008a21d
commit ae8654d9ca
2 changed files with 63 additions and 6 deletions

View File

@@ -5,6 +5,11 @@ import { extractHydraMembers } from '~/utils/api'
export function useTaskService() {
const api = useApi()
async function getAll(): Promise<Task[]> {
const data = await api.get<HydraCollection<Task>>('/tasks')
return extractHydraMembers(data)
}
async function getByProject(projectId: number): Promise<Task[]> {
const data = await api.get<HydraCollection<Task>>('/tasks', {
project: `/api/projects/${projectId}`,
@@ -30,5 +35,5 @@ export function useTaskService() {
})
}
return { getByProject, create, update, remove }
return { getAll, getByProject, create, update, remove }
}