Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

29 řádky
733 B

  1. 'use server'
  2. import { serverFetchBlob } from "@/app/utils/fetchUtil";
  3. import { BASE_API_URL } from "@/config/api";
  4. export interface FileResponse {
  5. filename: string;
  6. blobValue: Uint8Array;
  7. }
  8. export interface FinancialStatusReportRequest {
  9. teamLeadId: number;
  10. startMonth: string;
  11. endMonth: string;
  12. }
  13. export const fetchProjectsFinancialStatusReport = async (data: FinancialStatusReportRequest) => {
  14. const reportBlob = await serverFetchBlob<FileResponse>(
  15. `${BASE_API_URL}/reports/fetchProjectsFinancialStatusReport`,
  16. {
  17. method: "POST",
  18. body: JSON.stringify(data),
  19. headers: { "Content-Type": "application/json" },
  20. },
  21. );
  22. return reportBlob
  23. };