mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
feat: add project workspaces (DB, API, service, and UI)
New project_workspaces table with primary workspace designation. Full CRUD routes, service with auto-primary promotion on delete, workspace management UI in project properties panel, and workspace data included in project/issue ancestor responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6f7172c028
commit
29af525167
10 changed files with 6273 additions and 15 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type { Project } from "@paperclip/shared";
|
||||
import type { Project, ProjectWorkspace } from "@paperclip/shared";
|
||||
import { api } from "./client";
|
||||
|
||||
export const projectsApi = {
|
||||
|
|
@ -7,5 +7,13 @@ export const projectsApi = {
|
|||
create: (companyId: string, data: Record<string, unknown>) =>
|
||||
api.post<Project>(`/companies/${companyId}/projects`, data),
|
||||
update: (id: string, data: Record<string, unknown>) => api.patch<Project>(`/projects/${id}`, data),
|
||||
listWorkspaces: (projectId: string) =>
|
||||
api.get<ProjectWorkspace[]>(`/projects/${projectId}/workspaces`),
|
||||
createWorkspace: (projectId: string, data: Record<string, unknown>) =>
|
||||
api.post<ProjectWorkspace>(`/projects/${projectId}/workspaces`, data),
|
||||
updateWorkspace: (projectId: string, workspaceId: string, data: Record<string, unknown>) =>
|
||||
api.patch<ProjectWorkspace>(`/projects/${projectId}/workspaces/${workspaceId}`, data),
|
||||
removeWorkspace: (projectId: string, workspaceId: string) =>
|
||||
api.delete<ProjectWorkspace>(`/projects/${projectId}/workspaces/${workspaceId}`),
|
||||
remove: (id: string) => api.delete<Project>(`/projects/${id}`),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue