소스 검색

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 { export interface FinancialStatusReportRequest {
projectId: number;
teamLeadId: number;
} }


export const fetchProjectsFinancialStatusReport = async (data: FinancialStatusReportRequest) => { 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") { if (query.code.length > 0 && query.code.toLocaleLowerCase() !== "all") {
const projectIndex = teamCombo.findIndex((project) => `${project.code} - ${project.name}` === query.code) const projectIndex = teamCombo.findIndex((project) => `${project.code} - ${project.name}` === query.code)
console.log(teamCombo[projectIndex].id) console.log(teamCombo[projectIndex].id)
const response = await fetchProjectsFinancialStatusReport({ projectId: projects[projectIndex].id })
const response = await fetchProjectsFinancialStatusReport({ teamLeadId: projects[projectIndex].id })
if (response) { if (response) {
downloadFile(new Uint8Array(response.blobValue), response.filename!!) downloadFile(new Uint8Array(response.blobValue), response.filename!!)
} }
}else{ }else{
console.log(query.code) console.log(query.code)
const response = await fetchProjectsFinancialStatusReport({ projectId: -1 })
const response = await fetchProjectsFinancialStatusReport({ teamLeadId: -1 })
if (response) { if (response) {
downloadFile(new Uint8Array(response.blobValue), response.filename!!) downloadFile(new Uint8Array(response.blobValue), response.filename!!)
} }


불러오는 중...
취소
저장