projects milestones

This commit is contained in:
2026-03-17 07:34:08 -05:00
parent c3f0adc676
commit c1f6386e7d
13 changed files with 510 additions and 46 deletions

View File

@@ -1,8 +1,10 @@
export const projectStatuses = ["PLANNED", "ACTIVE", "ON_HOLD", "AT_RISK", "COMPLETE"] as const;
export const projectPriorities = ["LOW", "MEDIUM", "HIGH", "CRITICAL"] as const;
export const projectMilestoneStatuses = ["PLANNED", "IN_PROGRESS", "BLOCKED", "COMPLETE"] as const;
export type ProjectStatus = (typeof projectStatuses)[number];
export type ProjectPriority = (typeof projectPriorities)[number];
export type ProjectMilestoneStatus = (typeof projectMilestoneStatuses)[number];
export interface ProjectCustomerOptionDto {
id: string;
@@ -43,6 +45,37 @@ export interface ProjectSummaryDto {
ownerName: string | null;
dueDate: string | null;
updatedAt: string;
rollups: ProjectRollupDto;
}
export interface ProjectRollupDto {
milestoneCount: number;
completedMilestoneCount: number;
openMilestoneCount: number;
overdueMilestoneCount: number;
workOrderCount: number;
activeWorkOrderCount: number;
completedWorkOrderCount: number;
overdueWorkOrderCount: number;
}
export interface ProjectMilestoneDto {
id: string;
title: string;
status: ProjectMilestoneStatus;
dueDate: string | null;
completedAt: string | null;
notes: string;
sortOrder: number;
}
export interface ProjectMilestoneInput {
id?: string | null;
title: string;
status: ProjectMilestoneStatus;
dueDate: string | null;
notes: string;
sortOrder: number;
}
export interface ProjectDetailDto extends ProjectSummaryDto {
@@ -56,6 +89,7 @@ export interface ProjectDetailDto extends ProjectSummaryDto {
shipmentNumber: string | null;
customerEmail: string;
customerPhone: string;
milestones: ProjectMilestoneDto[];
}
export interface ProjectInput {
@@ -69,4 +103,5 @@ export interface ProjectInput {
ownerId: string | null;
dueDate: string | null;
notes: string;
milestones: ProjectMilestoneInput[];
}