Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

43 lignes
859 B

  1. //src\app\api\report\index.ts
  2. import { cache } from "react";
  3. export interface ProjectClaims {
  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. staffName: string;
  16. }
  17. export const preloadProjects = () => {
  18. fetchProjectsProjectClaims();
  19. };
  20. export const fetchProjectsProjectClaims = cache(async () => {
  21. return mockProjects;
  22. });
  23. const mockProjects: ProjectClaims[] = [
  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. staffName: "Leo",
  37. },
  38. ];