Ver a proveniência

loading for export excel

web_access_fix
Jason Chuang há 2 semanas
ascendente
cometimento
3da4bb5ae0
2 ficheiros alterados com 25 adições e 7 eliminações
  1. +13
    -4
      src/pages/Report/FullList/FullListForm.js
  2. +12
    -3
      src/pages/Report/Summary/SummaryForm.js

+ 13
- 4
src/pages/Report/FullList/FullListForm.js Ver ficheiro

@@ -1,6 +1,7 @@
// material-ui
import {
Button,
CircularProgress,
Grid, TextField,
Autocomplete,
Typography
@@ -62,7 +63,10 @@ const FullListForm = ({ searchCriteria, issueComboData}) => {
url: UrlUtils.GEN_FULL_LIST,
params: temp,
onResponse: () => {
setTimeout(()=> setWaitDownload(false), 500)
setTimeout(() => setWaitDownload(false), 500);
},
onError: () => {
setWaitDownload(false);
}
});
};
@@ -208,12 +212,17 @@ const FullListForm = ({ searchCriteria, issueComboData}) => {
<Button
variant="contained"
color="green"
onClick={()=>{
doExport()
onClick={() => {
doExport();
}}
disabled={waitDownload}
startIcon={
waitDownload ? (
<CircularProgress color="inherit" size={20} aria-hidden />
) : null
}
>
Export
{waitDownload ? 'Loading' : 'Export'}
</Button>
</Grid>
<Grid item sx={{ ml: 3 }}>


+ 12
- 3
src/pages/Report/Summary/SummaryForm.js Ver ficheiro

@@ -1,7 +1,8 @@
// material-ui
import {
Button,
Grid,
CircularProgress,
Grid,
TextField,
Autocomplete,
Typography
@@ -92,7 +93,10 @@ const SummaryForm = ({ searchCriteria, issueComboData}) => {
url: UrlUtils.GEN_SUMMARY_LIST,
params: temp,
onResponse: () => {
setTimeout(()=> setWaitDownload(false), 500)
setTimeout(() => setWaitDownload(false), 500);
},
onError: () => {
setWaitDownload(false);
}
});
};
@@ -253,8 +257,13 @@ const SummaryForm = ({ searchCriteria, issueComboData}) => {
color="green"
type="submit"
disabled={waitDownload}
startIcon={
waitDownload ? (
<CircularProgress color="inherit" size={20} aria-hidden />
) : null
}
>
Export
{waitDownload ? 'Loading' : 'Export'}
</Button>
</Grid>
<Grid item sx={{ ml: 3 }}>


Carregando…
Cancelar
Guardar