//src\app\api\report\index.ts
import { cache } from "react";

export interface LateStart {
  id: number;
  projectCode: string;
  projectName: string;
  team: string;
  teamLeader: string;
  startDate: string;
  startDateFrom: string;
  startDateTo: string;
  targetEndDate: string;
  client: string;
  subsidiary: string;
  nextstage: string;
  nextstageenddate: string;
  teamId: number;
  clientId: number;
  remainedDate: string;
  remainedDateTo: string;
}

export const preloadProjects = () => {
  fetchProjectsLateStart();
};

export const fetchProjectsLateStart = cache(async () => {
  return mockProjects;
});

const mockProjects: LateStart[] = [
  {
    id: 1,
    projectCode: "CUST-001",
    projectName: "Client A",
    team: "N/A",
    teamLeader: "N/A",
    startDate: "1/2/2024",
    startDateFrom: "1/2/2024",
    startDateTo: "1/2/2024",
    targetEndDate: "30/3/2024",
    client: "ss",
    subsidiary: "sus",
    nextstage:"",
    nextstageenddate:"30/2/2024",
    teamId:12,
    clientId:21,
    remainedDate:"30/2/2024",
    remainedDateTo:"30/3/2024",
  },
];
