update export excel request log
This commit is contained in:
@@ -170,14 +170,17 @@ export default function List() {
|
||||
}
|
||||
|
||||
const handleGetData = (type :string) => {
|
||||
axios.get(`report/logs/export`)
|
||||
.then((response) => {
|
||||
const link = document.createElement('a');
|
||||
link.href = response.data.data.file_url;
|
||||
link.setAttribute('download', response.data.data.file_name);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
handleClose();
|
||||
handleClose();
|
||||
setImportLoading(true);
|
||||
handleCancelImportButton();
|
||||
axios.get(`report/logs/export`)
|
||||
.then((response) => {
|
||||
const link = document.createElement('a');
|
||||
link.href = response.data.data.file_url;
|
||||
link.setAttribute('download', response.data.data.file_name);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
setImportLoading(false);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -194,14 +197,15 @@ export default function List() {
|
||||
{!currentImportFileName && (
|
||||
<Stack direction={'row'} spacing={2} sx={{ p: 2 }}>
|
||||
<SearchInput onSearch={applyFilter} />
|
||||
<Button
|
||||
<LoadingButton
|
||||
variant="outlined"
|
||||
startIcon={<UploadIcon />}
|
||||
sx={{ p: 1.8 }}
|
||||
onClick={handleClick}
|
||||
loading={importLoading}
|
||||
>
|
||||
Export
|
||||
</Button>
|
||||
</LoadingButton>
|
||||
<Menu
|
||||
id="import-button"
|
||||
anchorEl={anchorEl}
|
||||
@@ -283,7 +287,7 @@ export default function List() {
|
||||
const response = await axios.get('/report/logs', {
|
||||
params: { ...parameters },
|
||||
});
|
||||
|
||||
|
||||
setDataTableLoading(false);
|
||||
setDataTableData(response.data);
|
||||
};
|
||||
@@ -313,14 +317,14 @@ export default function List() {
|
||||
const { row } = props;
|
||||
const [open, setOpen] = React.useState(false);
|
||||
const [loadingApprove, setLoadingApprove] = React.useState(false);
|
||||
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<TableRow sx={{ '& > *': { borderBottom: 'unset' } }}>
|
||||
<TableCell align="left">{row.code}</TableCell>
|
||||
<TableCell align="left">{row.member_name}</TableCell>
|
||||
<TableCell align="left"><Label>{row.created_at ? fDateTimesecond(row.created_at) : '-'}</Label></TableCell>
|
||||
<TableCell align="left"><Label>{fDateTimesecond(row.submission_date)}</Label></TableCell>
|
||||
<TableCell align="left"><Label>{row.submission_date != null ? fDateTimesecond(row.submission_date) : '-'}</Label></TableCell>
|
||||
<TableCell align="left">{row.approved_by}</TableCell>
|
||||
<TableCell align="left"><Label>{row.created_final_at != null ? fDateTimesecond(row.created_final_at) : '-' }</Label></TableCell>
|
||||
<TableCell align="left"><Label>{row.approved_final_log_at ? fDateTimesecond(row.approved_final_log_at) : '-' }</Label></TableCell>
|
||||
|
||||
Reference in New Issue
Block a user