|
- //src\components\LateStartReportGen\LateStartReportGen.tsx
- "use client";
- import React, { useMemo, useState } from "react";
- import SearchBox, { Criterion } from "../../ReportSearchBox3";
- import { useTranslation } from "react-i18next";
- import { ResourceOverconsumption } from "@/app/api/report3";
-
- interface Props {
- projects: ResourceOverconsumption[];
- }
- type SearchQuery = Partial<Omit<ResourceOverconsumption, "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: "select", options: ["AAA", "BBB", "CCC"] },
- { label: "Client", paramName: "client", type: "select", options: ["Cust A", "Cust B", "Cust C"] },
- { label: "Status", paramName: "status", type: "select", options: ["Overconsumption", "Potential Overconsumption"] },
- // {
- // label: "Status",
- // label2: "Remained Date To",
- // paramName: "targetEndDate",
- // type: "dateRange",
- // },
- ],
- [t],
- );
-
- return (
- <>
- <SearchBox
- criteria={searchCriteria}
- onSearch={(query) => {
- console.log(query);
- }}
- />
- {/* <DownloadReportButton /> */}
- </>
- );
- };
-
- export default ProgressByClientSearch;
|