浏览代码

Update request

tags/Baseline_30082024_FRONTEND_UAT
MSI\2Fi 1年前
父节点
当前提交
47823350dd
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. +1
    -1
      src/app/api/reporte1/action.ts
  2. +2
    -2
      src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx

+ 1
- 1
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) => {


+ 2
- 2
src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx 查看文件

@@ -43,13 +43,13 @@ const GenFinancialStatusReport: React.FC<Props> = ({ 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!!)
}


正在加载...
取消
保存