feat(web): add project detail page (#627)
Some checks failed
ci/woodpecker/push/ci Pipeline failed

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #627.
This commit is contained in:
2026-03-01 20:09:52 +00:00
committed by jason.woltje
parent e898551814
commit c5253e9d62
2 changed files with 543 additions and 2 deletions

View File

@@ -25,7 +25,9 @@ export interface Project {
name: string;
description: string | null;
status: ProjectStatus;
priority?: string | null;
startDate: string | null;
dueDate?: string | null;
endDate: string | null;
creatorId: string;
domainId: string | null;
@@ -35,6 +37,54 @@ export interface Project {
updatedAt: string;
}
/**
* Minimal creator details included on project detail response
*/
export interface ProjectCreator {
id: string;
name: string | null;
email: string;
}
/**
* Task row included on project detail response
*/
export interface ProjectTaskSummary {
id: string;
title: string;
status: string;
priority: string;
dueDate: string | null;
}
/**
* Event row included on project detail response
*/
export interface ProjectEventSummary {
id: string;
title: string;
startTime: string;
endTime: string | null;
}
/**
* Counts included on project detail response
*/
export interface ProjectDetailCounts {
tasks: number;
events: number;
}
/**
* Single-project response with related details
*/
export interface ProjectDetail extends Project {
creator: ProjectCreator;
tasks: ProjectTaskSummary[];
events: ProjectEventSummary[];
_count: ProjectDetailCounts;
}
/**
* DTO for creating a new project
*/
@@ -72,8 +122,8 @@ export async function fetchProjects(workspaceId?: string): Promise<Project[]> {
/**
* Fetch a single project by ID
*/
export async function fetchProject(id: string, workspaceId?: string): Promise<Project> {
return apiGet<Project>(`/api/projects/${id}`, workspaceId);
export async function fetchProject(id: string, workspaceId?: string): Promise<ProjectDetail> {
return apiGet<ProjectDetail>(`/api/projects/${id}`, workspaceId);
}
/**