FPSMS-frontend
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.
 
 

48 regels
1.2 KiB

  1. "server only"
  2. import { convertObjToURLSearchParams } from "@/app/utils/commonUtil";
  3. import { serverFetchJson } from "@/app/utils/fetchUtil";
  4. import { BASE_API_URL } from "@/config/api";
  5. import { cache } from "react";
  6. export interface EscalationResult {
  7. id: number;
  8. submitter?: string;
  9. handler?: string;
  10. handlerDepartment?: string;
  11. handlerName?: string;
  12. handlerTitle?: string;
  13. polId?: number;
  14. poId?: number;
  15. reason?: string;
  16. handlerId?: number;
  17. status: string;
  18. recordDate: string;
  19. itemName?: string;
  20. demandQty?: number;
  21. acceptedQty?: number;
  22. purchaseUomCode?: string;
  23. purchaseUomDesc?: string;
  24. stockUomCode?: string;
  25. stockUomDesc?: string;
  26. stockInLineId?: number;
  27. stockOutLineId?: number;
  28. qcFailCount?: number;
  29. qcTotalCount?: number;
  30. poCode?: string;
  31. itemCode?: string;
  32. dnDate?: number[];
  33. dnNo?: string;
  34. }
  35. export const fetchEscalationLogsByUser = cache(async() => {
  36. return serverFetchJson<EscalationResult[]>(`${BASE_API_URL}/escalationLog/user`,
  37. {
  38. method: "GET",
  39. headers: { "Content-Type": "application/json" },
  40. next: {
  41. tags: ["escalationLogs"],
  42. },
  43. },
  44. );
  45. });