ソースを参照

update project manhour search

tags/Baseline_180220205_Frontend
MSI\derek 8ヶ月前
コミット
09dc834c89
1個のファイルの変更5行の追加5行の削除
  1. +5
    -5
      src/components/GenerateProjectManhourSummaryReport/ProjectManhourSummaryReport.tsx

+ 5
- 5
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<Props> = ({ 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!!


読み込み中…
キャンセル
保存