import { Expense } from "./expense";

export interface ProductOfProject {
    productIdentifier: string;
    projectIdentifier: string;
    projectName: string;
    projectManager: string;

    accountId: string;
    leadIdentifier: string;

    productStatus: string;
    projectStatus: string;
    productType: string;
    productDescription: string;
    discountPercent: number;

    resourceDataWithAllocation: ResourceAllocationDto[];
    scheduleData?: { projectIdentifier?: string; productIdentifier?: string; task: any[]; group?: Record<string, any>; dependency?: any[] } | null;

    createdOn: string;
    createdBy: string;
    updatedBy: string;
    updatedOn: string;
    expenseDetails: Record<string, Expense>;
}


export interface ResourceAllocationDto {
  id?: string;
  allocation: Record<string, number>;
  detailedAllocation: Record<string, DetailedAllocationValue>;
  resourceType: string;
  role: string;
  gradeId: number;
  employeeName: string;
  taskName: string;
  resourceId: string;
  taskId: number;
}

export interface DetailedAllocationValue {
  hours?: number;
  date?: string;
  cost?: number;
  comments?: string;
  approved?: boolean;
}