diff --git a/src/components/GenerateProjectManhourSummaryReport/ProjectManhourSummaryReport.tsx b/src/components/GenerateProjectManhourSummaryReport/ProjectManhourSummaryReport.tsx index 05f752f..7e0aeb4 100644 --- a/src/components/GenerateProjectManhourSummaryReport/ProjectManhourSummaryReport.tsx +++ b/src/components/GenerateProjectManhourSummaryReport/ProjectManhourSummaryReport.tsx @@ -7,6 +7,7 @@ import { useTranslation } from "react-i18next"; import { TeamResult } from "@/app/api/team"; import { fetchProjectManhourSummaryReport } from "@/app/api/reports/actions"; import { downloadFile } from "@/app/utils/commonUtil"; +import dayjs from "dayjs"; interface Props { teams: TeamResult[] @@ -48,17 +49,16 @@ const ProjectManhourSummaryReport: React.FC = ({ teams }) => { criteria={searchCriteria} onSearch={async (query: any) => { console.log(query); - var start = query.startDate - var start = query.startDate + var startDate = dayjs(query.startDate).format("YYYY-MM-DD") + var endDate = dayjs(query.endDate).add(1, "month").format("YYYY-MM-DD") const args = { teamId: query.teamId, - startDate: query.startDate + "-01", - endDate: query.endDate + "-01", + startDate: startDate, + endDate: endDate, } console.log(args) const response = await fetchProjectManhourSummaryReport(args);// if (response) { - console.log("asdasdas") downloadFile( new Uint8Array(response.blobValue), response.filename!!