diff --git a/frontend/app/component/election/status/ElectionStatus.tsx b/frontend/app/component/election/status/ElectionStatus.tsx
index 001c8c0af..59be5c43c 100644
--- a/frontend/app/component/election/status/ElectionStatus.tsx
+++ b/frontend/app/component/election/status/ElectionStatus.tsx
@@ -159,18 +159,18 @@ function getTableHeaderForCategory(category: StatusCategory): React.ReactNode {
function CategoryHeader({ children }: { children?: React.ReactNode[] }) {
return (
- {t("number")}
- {t("polling_station.title.singular")}
+ {t("number")}
+ {t("polling_station.title.singular")}
{children}
);
}
- const finishedAtColumn = {t("finished_at")};
+ const finishedAtColumn = {t("finished_at")};
const progressColumn = (
-
+
{t("progress")}
-
+
);
switch (category) {
diff --git a/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.test.tsx b/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.test.tsx
index 5e4678123..33d00268a 100644
--- a/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.test.tsx
+++ b/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.test.tsx
@@ -281,6 +281,40 @@ describe("Test PollingStationChoiceForm", () => {
expect(screen.getByText("Geen stembureaus gevonden")).toBeVisible();
});
+ test("All data entries of polling stations are finished, polling station list shows message", async () => {
+ overrideOnce("get", "/api/elections/1", 200, electionDetailsMockResponse);
+ overrideOnce("get", "/api/elections/1/status", 200, {
+ statuses: [
+ {
+ polling_station_id: 1,
+ status: "definitive",
+ },
+ {
+ polling_station_id: 2,
+ status: "definitive",
+ },
+ {
+ polling_station_id: 3,
+ status: "definitive",
+ },
+ {
+ polling_station_id: 4,
+ status: "entries_different",
+ },
+ ],
+ } satisfies ElectionStatusResponse);
+
+ const user = userEvent.setup();
+ renderPollingStationChoicePage();
+
+ const openPollingStationList = await screen.findByTestId("openPollingStationList");
+ await user.click(openPollingStationList);
+ expect(screen.getByText("Kies het stembureau")).toBeVisible();
+
+ // Check if the error message is visible
+ expect(screen.getByText("Alle stembureaus zijn twee keer ingevoerd")).toBeVisible();
+ });
+
test("Second data entry has correct link", async () => {
overrideOnce("get", "/api/elections/1", 200, electionDetailsMockResponse);
overrideOnce("get", "/api/elections/1/status", 200, {
diff --git a/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.tsx b/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.tsx
index acb43ae41..07532364b 100644
--- a/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.tsx
+++ b/frontend/app/component/form/data_entry/polling_station_choice/PollingStationChoiceForm.tsx
@@ -77,6 +77,11 @@ export function PollingStationChoiceForm({ anotherEntry }: PollingStationChoiceF
status: status.status,
}));
+ const pollingStationsForDataEntry = pollingStations.filter((pollingStation: PollingStation) => {
+ const status = electionStatus.statuses.find((status) => status.polling_station_id === pollingStation.id)?.status;
+ return status !== "definitive" && status !== "entries_different";
+ });
+
return (