export interface ProductPSData {
  productIdentifier: string; // UUID

  dealName: string;
  projectManager: string;
  productStatus: string;
  updatedOn: string;
  updatedBy: string;
  dealStatus: string;
  dealIdentifier: string; // UUID
  leadIdentifier: string; // UUID

  quotation: Record<string, QuotationItemDto>;

  productType: string;
  productDescription: string;

  scheduleData: ScheduleDataDto;

  resourceDataWithAllocation: ResourceAllocationDto[];

  discountPercent: number | null;
   expenseDetails: Record<string, ExpenseDetailDto>; 
}

// --------------------------------------------------

export interface QuotationItemDto {
  id: string;
  role: string;
  totalFTE: number;
  scr: number;
  expenses: number;
  otherCosts: number;
  billingAmount: number;
}

// --------------------------------------------------

export interface ScheduleDataDto {
  task: TaskDto[];
  dependency: DependencyDto[];
  group: Record<string, GroupItem>;
}

export interface GroupItem {
  id?: string | number;
  name?: string;
  type?: string;
  order?: number;
  color?: string;
  isActive?: boolean;
}

// --------------------------------------------------

export interface TaskDto {
  id: number;
  parentId: number;
  taskName: string;
  taskDuration: number;
  taskPredecessor: string;
  dependencyType: number;
  taskColour: string;
  delayDuration: number;
  taskDescription: string;
  taskStart: string;
  taskEnd: string; 
  milestoneTask: boolean;
}

// --------------------------------------------------

export interface DependencyDto {
  id: number;
  predecessorId: number;
  dependencyType: number;
}

// --------------------------------------------------

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;
}


export interface ExpenseDetailDto {
  expenseName: string;
  location: string;
  currency: string;
  cost: number;
  quantity: number;
  totalCost: number;
  remarks: string;
}
