feat(admin) : add task reassignment logic to AdminStatusTab
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user