Add project management support and integrate customer-project functionality
This commit is contained in:
@@ -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)
|
||||
}
|
||||
@@ -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];
|
||||
}
|
||||
Reference in New Issue
Block a user