| @@ -13,10 +13,12 @@ import { useTranslation } from 'react-i18next'; | |||||
| import { FormProvider, SubmitHandler, useForm } from 'react-hook-form'; | import { FormProvider, SubmitHandler, useForm } from 'react-hook-form'; | ||||
| import { Check, Close } from "@mui/icons-material"; | import { Check, Close } from "@mui/icons-material"; | ||||
| import InvoiceTable from './InvoiceTable'; | import InvoiceTable from './InvoiceTable'; | ||||
| import { ProjectResult } from '@/app/api/projects'; | |||||
| interface Props { | interface Props { | ||||
| isOpen: boolean, | isOpen: boolean, | ||||
| onClose: () => void; | |||||
| onClose: () => void | |||||
| projects: ProjectResult[] | |||||
| } | } | ||||
| const modalSx: SxProps= { | const modalSx: SxProps= { | ||||
| @@ -30,7 +32,7 @@ const modalSx: SxProps= { | |||||
| bgcolor: 'background.paper', | bgcolor: 'background.paper', | ||||
| }; | }; | ||||
| const CreateInvoiceModal: React.FC<Props> = ({isOpen, onClose}) => { | |||||
| const CreateInvoiceModal: React.FC<Props> = ({isOpen, onClose, projects}) => { | |||||
| const { t } = useTranslation() | const { t } = useTranslation() | ||||
| const formProps = useForm<any>(); | const formProps = useForm<any>(); | ||||
| @@ -61,7 +63,7 @@ const CreateInvoiceModal: React.FC<Props> = ({isOpen, onClose}) => { | |||||
| marginBlock: 2, | marginBlock: 2, | ||||
| }} | }} | ||||
| > | > | ||||
| <InvoiceTable/> | |||||
| <InvoiceTable projects={projects}/> | |||||
| </Box> | </Box> | ||||
| <CardActions sx={{ justifyContent: "flex-end" }}> | <CardActions sx={{ justifyContent: "flex-end" }}> | ||||
| <Button | <Button | ||||