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

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

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

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

const mockProjects: Delay[] = [
  {
    id: 1,
    projectCode: "CUST-001",
    projectName: "Client A",
    team: "N/A",
    teamLeader: "N/A",
    startDate: "5",
    startDateFrom: "5",
    startDateTo: "5",
    targetEndDate: "s",
    client: "ss",
    subsidiary: "ss",
    status: "1",
  },
];
