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

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

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

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

const mockProjects: CostandExpense[] = [
  {
    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",
    remainPercent: "1",
  },
];
