feat(web): add kanban board page with drag-and-drop (#478)
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #478.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import type { Task } from "@mosaic/shared";
|
||||
import type { TaskStatus, TaskPriority } from "@mosaic/shared";
|
||||
import { apiGet, type ApiResponse } from "./client";
|
||||
import { apiGet, apiPatch, type ApiResponse } from "./client";
|
||||
|
||||
export interface TaskFilters {
|
||||
status?: TaskStatus;
|
||||
@@ -34,3 +34,15 @@ export async function fetchTasks(filters?: TaskFilters): Promise<Task[]> {
|
||||
const response = await apiGet<ApiResponse<Task[]>>(endpoint, filters?.workspaceId);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a task by ID
|
||||
*/
|
||||
export async function updateTask(
|
||||
id: string,
|
||||
data: Partial<Task>,
|
||||
workspaceId?: string
|
||||
): Promise<Task> {
|
||||
const res = await apiPatch<ApiResponse<Task>>(`/api/tasks/${id}`, data, workspaceId);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user