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