|
|
@@ -53,7 +53,7 @@ const ProjectCompletionReport: React.FC<Props> = ( |
|
|
|
criteria={searchCriteria} |
|
|
|
onSearch={async (query: any) => { |
|
|
|
let postData: ProjectCompletionReportRequest = { |
|
|
|
startDate: "", |
|
|
|
startDate: "1900-01-01", |
|
|
|
endDate: dayjs().format(INPUT_DATE_FORMAT).toString(), |
|
|
|
outstanding: query.outstanding && query.outstanding === "Outstanding Accounts Receivable" |
|
|
|
}; |
|
|
@@ -63,16 +63,13 @@ const ProjectCompletionReport: React.FC<Props> = ( |
|
|
|
if (teamId) { |
|
|
|
postData.teamId = teamId |
|
|
|
} |
|
|
|
// check if start date exist |
|
|
|
if (query.startDate.length === 0) { |
|
|
|
setError(t("Start Date cant be empty")); |
|
|
|
} else { |
|
|
|
if (query.startDateFrom && query.startDateFrom.length > 0) { |
|
|
|
postData.startDate = query.startDate; |
|
|
|
console.log(postData) |
|
|
|
const response = await fetchProjectCompletionReport(postData); |
|
|
|
if (response) { |
|
|
|
downloadFile(new Uint8Array(response.blobValue), response.filename!!); |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(postData) |
|
|
|
const response = await fetchProjectCompletionReport(postData); |
|
|
|
if (response) { |
|
|
|
downloadFile(new Uint8Array(response.blobValue), response.filename!!); |
|
|
|
} |
|
|
|
}} |
|
|
|
/> |
|
|
|