You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

45 lines
1.2 KiB

  1. //src\components\LateStartReportGen\LateStartReportGen.tsx
  2. "use client";
  3. import React, { useMemo, useState } from "react";
  4. import SearchBox, { Criterion } from "../ReportSearchBox6";
  5. import { useTranslation } from "react-i18next";
  6. import { ProjectCompletionWO } from "@/app/api/report6";
  7. //import { DownloadReportButton } from './DownloadReportButton';
  8. interface Props {
  9. projects: ProjectCompletionWO[];
  10. }
  11. type SearchQuery = Partial<Omit<ProjectCompletionWO, "id">>;
  12. type SearchParamNames = keyof SearchQuery;
  13. const ProgressByClientSearch: React.FC<Props> = ({ projects }) => {
  14. const { t } = useTranslation("projects");
  15. const searchCriteria: Criterion<SearchParamNames>[] = useMemo(
  16. () => [
  17. // { label: "Team", paramName: "team", type: "text" },
  18. // { label: "Client", paramName: "client", type: "text" },
  19. {
  20. label: "Report Period From",
  21. label2: "Report Period To",
  22. paramName: "targetEndDate",
  23. type: "dateRange",
  24. },
  25. ],
  26. [t],
  27. );
  28. return (
  29. <>
  30. <SearchBox
  31. criteria={searchCriteria}
  32. onSearch={(query) => {
  33. console.log(query);
  34. }}
  35. />
  36. {/* <DownloadReportButton /> */}
  37. </>
  38. );
  39. };
  40. export default ProgressByClientSearch;