25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

52 lines
1.8 KiB

  1. "use client";
  2. import Grid from "@mui/material/Grid";
  3. import Paper from "@mui/material/Paper";
  4. import { TFunction } from "i18next";
  5. import { useTranslation } from "react-i18next";
  6. import PageTitle from "../PageTitle/PageTitle";
  7. import DashboardTabButton from "./DashboardTabButton";
  8. import { ThemeProvider } from "@mui/material/styles";
  9. import theme from "../../theme";
  10. import Tabs, { TabsProps } from "@mui/material/Tabs";
  11. import Tab from "@mui/material/Tab";
  12. import React, { useCallback, useState } from "react";
  13. import { useRouter } from "next/navigation";
  14. import ProgressByClient from "./ProgressByClient";
  15. import ProgressByClientSearch from "@/components/ProgressByClientSearch";
  16. import { Suspense } from "react";
  17. const DashboardPage: React.FC = () => {
  18. const [tabIndex, setTabIndex] = useState(0);
  19. const { t } = useTranslation("dashboard");
  20. const router = useRouter();
  21. const handleCancel = () => {
  22. router.back();
  23. };
  24. const handleTabChange = useCallback<NonNullable<TabsProps["onChange"]>>(
  25. (_e, newValue) => {
  26. setTabIndex(newValue);
  27. },
  28. [],
  29. );
  30. return (
  31. <ThemeProvider theme={theme}>
  32. <Tabs value={tabIndex} onChange={handleTabChange} variant="scrollable">
  33. <Tab label="Financial Summary" />
  34. <Tab label="Project Cash Flow" />
  35. <Tab label="Project Resource Consumption by Client" />
  36. <Tab label="Project Resource Utilization" />
  37. <Tab label="Staff Utilization" />
  38. </Tabs>
  39. {tabIndex === 2 && <ProgressByClient />}
  40. {/* <Grid container height="100vh" style={{ backgroundColor: theme.palette.background.default}}>
  41. <Grid item sm>
  42. <PageTitle BigTitle={"Dashboards"}/>
  43. <DashboardTabButton/>
  44. </Grid>
  45. </Grid> */}
  46. </ThemeProvider>
  47. );
  48. };
  49. export default DashboardPage;