|
- //src\components\LateStartReportGen\LateStartReportGen.tsx
- "use client";
- import React, { useMemo, useState } from "react";
- import SearchBox, { Criterion } from "../ReportSearchBox5";
- import { useTranslation } from "react-i18next";
- import { ProjectCompletion } from "@/app/api/report5";
- //import { DownloadReportButton } from './DownloadReportButton';
- interface Props {
- projects: ProjectCompletion[];
- }
- type SearchQuery = Partial<Omit<ProjectCompletion, "id">>;
- type SearchParamNames = keyof SearchQuery;
-
- const ProgressByClientSearch: React.FC<Props> = ({ projects }) => {
- const { t } = useTranslation("projects");
-
- const searchCriteria: Criterion<SearchParamNames>[] = useMemo(
- () => [
- // { label: "Team", paramName: "team", type: "text" },
- // { label: "Client", paramName: "client", type: "text" },
- {
- label: "Report Period From",
- label2: "Report Period To",
- paramName: "targetEndDate",
- type: "dateRange",
- },
- ],
- [t],
- );
-
- return (
- <>
- <SearchBox
- criteria={searchCriteria}
- onSearch={(query) => {
- console.log(query);
- }}
- />
- {/* <DownloadReportButton /> */}
- </>
- );
- };
-
- export default ProgressByClientSearch;
|