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

export interface ProjectCompletionWO {
  id: number;
  projectCode: string;
  projectName: string;
  team: string;
  teamLeader: string;
  startDate: string;
  startDateFrom: string;
  startDateTo: string;
  targetEndDate: string;
  client: string;
  subsidiary: string;
  completeDate: string;
}

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

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

const mockProjects: ProjectCompletionWO[] = [
  {
    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",
    completeDate:"30/2/2024",
  },
];
