tambah loading export
This commit is contained in:
@@ -194,7 +194,7 @@ export default function List() {
|
||||
const handleExportReport = async () => {
|
||||
|
||||
var filter = Object.fromEntries([...searchParams.entries()]);
|
||||
|
||||
setIsLoading(true)
|
||||
await axios
|
||||
.get(corporateValue + '/claims/exportAlrmCenter/'+(startDateValue ? startDateValue : 'all')+'/'+(endDateValue ? endDateValue : 'all'), { params: filter })
|
||||
.then((res) => {
|
||||
@@ -202,6 +202,7 @@ export default function List() {
|
||||
variant: 'success',
|
||||
anchorOrigin: { horizontal: 'right', vertical: 'top' },
|
||||
});
|
||||
setIsLoading(false)
|
||||
|
||||
document.location.href = res.data.data.file_url;
|
||||
})
|
||||
@@ -210,6 +211,7 @@ export default function List() {
|
||||
variant: 'error',
|
||||
anchorOrigin: { horizontal: 'right', vertical: 'top' },
|
||||
})
|
||||
|
||||
);
|
||||
};
|
||||
const exportReport = {
|
||||
@@ -332,6 +334,7 @@ export default function List() {
|
||||
filterStartDate={filterStartDate}
|
||||
filterEndDate={filterEndDate}
|
||||
exportReport={exportReport}
|
||||
exportLoading={isLoading}
|
||||
/>
|
||||
</Stack>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user