Bläddra i källkod

Update

tags/Baseline_30082024_FRONTEND_UAT
MSI\2Fi 1 år sedan
förälder
incheckning
d14e26d11c
1 ändrade filer med 10 tillägg och 2 borttagningar
  1. +10
    -2
      src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx

+ 10
- 2
src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx Visa fil

@@ -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"),


Laddar…
Avbryt
Spara