finishing part 1

This commit is contained in:
korospace
2023-10-28 19:00:04 +07:00
parent b6095f1301
commit b76a9b56f0
17 changed files with 840 additions and 34 deletions

View File

@@ -49,7 +49,7 @@ export default function Detail() {
.then((response) => {
setData(response.data);
setDataDialog(response.data.data.dialog_submits);
})
.catch((error) => {
console.error(error);
@@ -71,6 +71,8 @@ export default function Detail() {
const handleInvoiceInputChange = (event) => {
if (event.target.files[0]) {
console.log('ok');
setFileInvoices([...fileInvoices, ...event.target.files]);
} else {
console.log('NO FILE');
@@ -84,7 +86,7 @@ export default function Detail() {
);
};
const date = dateInvoice ? fPostFormat(dateInvoice, 'yyyy-MM-dd') : null;
const [openDialogSubmit, setOpenDialogSubmit] = useState(false);
const handleCloseDialogSubmit = () => {
setOpenDialogSubmit(false);
@@ -121,13 +123,13 @@ export default function Detail() {
enqueueSnackbar('Please upload file invoice, before submit', { variant: 'warning' });
}
setTimeout(() =>
setTimeout(() =>
{
window.location.reload();
}, 5000);
};
return (
<Page title='Detail'>
<Container maxWidth={themeStretch ? false : 'xl'}>
@@ -209,7 +211,7 @@ export default function Detail() {
placeItems: 'center',
gap: 1,
placeContent: 'center',
}}
>
@@ -297,4 +299,4 @@ export default function Detail() {
</Container>
</Page>
);
}
}