You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
891 B

  1. //src\app\api\report\index.ts
  2. import { cache } from "react";
  3. export interface ResourceOverconsumption {
  4. id: number;
  5. projectCode: string;
  6. projectName: string;
  7. team: string;
  8. teamLeader: string;
  9. startDate: string;
  10. startDateFrom: string;
  11. startDateTo: string;
  12. targetEndDate: string;
  13. client: string;
  14. subsidiary: string;
  15. status: string;
  16. }
  17. export const preloadProjects = () => {
  18. fetchProjectsResourceOverconsumption();
  19. };
  20. export const fetchProjectsResourceOverconsumption = cache(async () => {
  21. return mockProjects;
  22. });
  23. const mockProjects: ResourceOverconsumption[] = [
  24. {
  25. id: 1,
  26. projectCode: "CUST-001",
  27. projectName: "Client A",
  28. team: "N/A",
  29. teamLeader: "N/A",
  30. startDate: "1/2/2024",
  31. startDateFrom: "1/2/2024",
  32. startDateTo: "1/2/2024",
  33. targetEndDate: "30/3/2024",
  34. client: "ss",
  35. subsidiary: "sus",
  36. status: "1",
  37. },
  38. ];