Add project management support and integrate customer-project functionality

This commit is contained in:
2025-07-15 18:23:53 +00:00
parent 2707aa48bc
commit 03f633ae52
26 changed files with 1135 additions and 43 deletions

View File

@@ -0,0 +1,14 @@
import {CustomerProjectStatus} from "@/services/projects/entities/customer-project";
export interface ProjectNoteDto {
text: string;
}
export interface CreateCustomerProjectDto {
customerId: string; // Reference to the related customer
name: string; // Project name
description?: string; // Optional project description
status: CustomerProjectStatus; // Enum for project status
notes?: ProjectNoteDto[]; // Optional list of project notes
startDate?: string; // Project start date (optional)
}

View File

@@ -0,0 +1,40 @@
export enum CustomerProjectStatus {
PLANNED = 'PLANNED',
IN_PROGRESS = 'IN_PROGRESS',
COMPLETED = 'COMPLETED',
ON_HOLD = 'ON_HOLD',
CANCELLED = 'CANCELLED'
}
export interface CustomerProject {
id: string;
customerId: string;
name: string;
description: string;
status: CustomerProjectStatus;
notes?: {
text: string;
createdBy: number;
updatedBy: number;
createdAt: string;
updatedAt: string;
}[];
startDate: string;
endDate: string;
createdBy: number;
lastModifier: string;
updatedBy: number;
createdAt: string;
updatedAt: string;
}
export function getStatusText(status: CustomerProjectStatus): string {
const translations = {
[CustomerProjectStatus.PLANNED]: 'Geplant',
[CustomerProjectStatus.IN_PROGRESS]: 'In Bearbeitung',
[CustomerProjectStatus.COMPLETED]: 'Abgeschlossen',
[CustomerProjectStatus.ON_HOLD]: 'Pausiert',
[CustomerProjectStatus.CANCELLED]: 'Abgebrochen'
};
return translations[status];
}