import { CreateProjectInputs } from "@/app/api/projects/actions"; import { TaskGroup } from "@/app/api/tasks"; import { Add, Delete } from "@mui/icons-material"; import { Stack, Typography, Grid, FormControl, Box, Button, } from "@mui/material"; import { GridColDef, GridActionsCellItem, GridToolbarContainer, } from "@mui/x-data-grid"; import { LocalizationProvider, DatePicker } from "@mui/x-date-pickers"; import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; import dayjs from "dayjs"; import "dayjs/locale/zh-hk"; import React, { useMemo } from "react"; import { useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import StyledDataGrid from "../StyledDataGrid"; interface Props { taskGroupId: TaskGroup["id"]; } interface FooterToolbarProps { onAdd: () => void; } const MilestoneSection: React.FC = ({ taskGroupId }) => { const { t } = useTranslation(); const {} = useFormContext(); const columns = useMemo( () => [ { type: "actions", field: "actions", headerName: t("Actions"), getActions: () => [ } label={t("Remove")} onClick={() => {}} />, ], }, { field: "description", headerName: t("Payment Milestone Description"), width: 300, editable: true, }, { field: "date", headerName: t("Payment Milestone Date"), width: 200, type: "date", editable: true, }, { field: "amount", headerName: t("Payment Milestone Amount"), width: 300, editable: true, type: "number", }, ], [t], ); return ( {t("Milestone")} ({ marginBlockStart: 1, marginInline: -3, borderBottom: `1px solid ${theme.palette.divider}`, })} > ); }; const NoRowsOverlay: React.FC = () => { const { t } = useTranslation(); return ( {t("Add some milestones!")} ); }; const FooterToolbar: React.FC = ({ onAdd }) => { const { t } = useTranslation(); return ( ); }; export default MilestoneSection;