Просмотр исходного кода

Update

tags/Baseline_30082024_FRONTEND_UAT
MSI\2Fi 1 год назад
Родитель
Сommit
d14e26d11c
1 измененных файлов: 10 добавлений и 2 удалений
  1. +10
    -2
      src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx

+ 10
- 2
src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx Просмотреть файл

@@ -56,8 +56,16 @@ const GenerateProjectPandLReport: React.FC<Props> & SubComponents = ({ projects
if (Boolean(query.project) && query.project !== "All") {
if(query.project != null && query.startMonth != "" && query.startMonthTo != undefined){
const response = await fetchProjectPandLReport({ projectId: parseFloat(query.project), startMonth: query.startMonth, endMonth: query.startMonthTo })
if (response) {
downloadFile(new Uint8Array(response.blobValue), response.filename!!)
try{
if (response) {
downloadFile(new Uint8Array(response.blobValue), response.filename!!)
}
}catch(error){
errorDialogWithContent(t("Download Fail"),
t(`Please try it later`), t)
.then(() => {
window.location.reload()
})
}
}else{
errorDialogWithContent(t("Download Fail"),


Загрузка…
Отмена
Сохранить