From 47823350dd78f3d1c98b10f2f7daa4c8efec75a9 Mon Sep 17 00:00:00 2001 From: "MSI\\2Fi" Date: Fri, 17 May 2024 12:08:55 +0800 Subject: [PATCH] Update request --- src/app/api/reporte1/action.ts | 2 +- .../FinancialStatusReportGen/FinancialStatusReportGen.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/api/reporte1/action.ts b/src/app/api/reporte1/action.ts index a82d532..b82d989 100644 --- a/src/app/api/reporte1/action.ts +++ b/src/app/api/reporte1/action.ts @@ -10,7 +10,7 @@ export interface FileResponse { } export interface FinancialStatusReportRequest { - projectId: number; + teamLeadId: number; } export const fetchProjectsFinancialStatusReport = async (data: FinancialStatusReportRequest) => { diff --git a/src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx b/src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx index 42fbee0..243b8dd 100644 --- a/src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx +++ b/src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx @@ -43,13 +43,13 @@ const GenFinancialStatusReport: React.FC = ({ projects, teamCombo }) => { if (query.code.length > 0 && query.code.toLocaleLowerCase() !== "all") { const projectIndex = teamCombo.findIndex((project) => `${project.code} - ${project.name}` === query.code) console.log(teamCombo[projectIndex].id) - const response = await fetchProjectsFinancialStatusReport({ projectId: projects[projectIndex].id }) + const response = await fetchProjectsFinancialStatusReport({ teamLeadId: projects[projectIndex].id }) if (response) { downloadFile(new Uint8Array(response.blobValue), response.filename!!) } }else{ console.log(query.code) - const response = await fetchProjectsFinancialStatusReport({ projectId: -1 }) + const response = await fetchProjectsFinancialStatusReport({ teamLeadId: -1 }) if (response) { downloadFile(new Uint8Array(response.blobValue), response.filename!!) }