diff --git a/frontend/src/common/services/hitasApi/reports.ts b/frontend/src/common/services/hitasApi/reports.ts
index 296aa68fc..bfa1175b7 100644
--- a/frontend/src/common/services/hitasApi/reports.ts
+++ b/frontend/src/common/services/hitasApi/reports.ts
@@ -62,6 +62,9 @@ export const downloadSalesByPostalCodeAndAreaReportPDF = ({
export const downloadRegulatedHousingCompaniesPDF = () =>
fetchAndDownloadPDF("/reports/download-regulated-housing-companies-report");
+export const downloadRegulatedHalfHitasHousingCompaniesExcel = () =>
+ fetchAndDownloadPDF("/reports/download-regulated-half-hitas-housing-companies-report");
+
export const downloadUnregulatedHousingCompaniesPDF = () =>
fetchAndDownloadPDF("/reports/download-unregulated-housing-companies-report");
diff --git a/frontend/src/common/services/utils.ts b/frontend/src/common/services/utils.ts
index 373afda50..6cf83f3a3 100644
--- a/frontend/src/common/services/utils.ts
+++ b/frontend/src/common/services/utils.ts
@@ -54,7 +54,10 @@ export const fetchAndDownloadPDF = (url: string, method: "GET" | "POST" = "GET",
}
})
// eslint-disable-next-line no-console
- .catch((error) => console.error(error));
+ .catch((error) => {
+ console.error(error);
+ hdsToast.error(`Virhe ladattaessa tiedostoa. (${error?.message ?? error})`);
+ });
};
export const safeInvalidate = (error, tags) => (!error ? tags : []);
diff --git a/frontend/src/features/reports/ReportsPage.tsx b/frontend/src/features/reports/ReportsPage.tsx
index 36aabd1c5..2b62956e9 100644
--- a/frontend/src/features/reports/ReportsPage.tsx
+++ b/frontend/src/features/reports/ReportsPage.tsx
@@ -2,6 +2,7 @@ import {Accordion} from "hds-react";
import {Divider, Heading} from "../../common/components";
import {
HousingCompanyReportRegulated,
+ HousingCompanyReportRegulatedHalfHitas,
HousingCompanyReportReleased,
HousingCompanyStatusTable,
} from "./components/HousingCompanyReports";
@@ -34,6 +35,8 @@ const ReportsPage = () => {