Skip to content

1949 CronJob: Show WahlschlussCheck Dialog#2390

Open
ThoGro wants to merge 3 commits intodevfrom
1049-cronjob-show-wahlschlusscheck-dialog
Open

1949 CronJob: Show WahlschlussCheck Dialog#2390
ThoGro wants to merge 3 commits intodevfrom
1049-cronjob-show-wahlschlusscheck-dialog

Conversation

@ThoGro
Copy link
Contributor

@ThoGro ThoGro commented Feb 10, 2026

Beschreibung:

Dialog zur Erinnerung an den Wahlschluss hinzugefügt.

Definition of Done (DoD):

Frontend

Referenzen1:

Closes #1049

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a scheduled popup notification that alerts users about the voting closure at a designated time. Users can proceed immediately with voting submission or defer the action.
  • Documentation

    • Updated technical documentation to clarify timeout configuration constants for voting closure checks.

Footnotes

  1. Nicht zutreffende Referenzen vor dem Speichern entfernen

@ThoGro ThoGro self-assigned this Feb 10, 2026
@ThoGro ThoGro linked an issue Feb 10, 2026 that may be closed by this pull request
5 tasks
@github-actions github-actions bot added documentation Improvements or additions to documentation wls-gui-wahllokalsystem frontend related issues for Wahllokalsystem labels Feb 10, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR implements a Wahlschluss (voting closure) check dialog feature for UWB election locations. It introduces a new configuration constant MELDUNGSZEIT_WAHL_SCHLIESSEN to manage the scheduled check timing, refactors the infomanagement store to share timeout computation logic via a helper function, adds a new popup dialog component that prompts users to confirm voting closure at a scheduled time, conditionally renders this dialog in the main App component for UWB systems, and updates documentation and tests accordingly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description follows the required template with filled-out DoD checklist for Frontend, documentation updates, tests, and proper references.
Linked Issues check ✅ Passed The implementation fulfills all technical requirements: added dateTimeToCheckWahlschluss getter to infomanagementStore (matching dateTimeToCheckAnwesenheit pattern), created TheWahlschlussCheckPopupDialog component with correct title/message/buttons, guarded dialog by isUWB condition, and added comprehensive tests.
Out of Scope Changes check ✅ Passed All changes directly support the wahlschluss dialog feature: documentation updates clarify the timeout constant, store enhancements provide the necessary data structure, component implementation delivers the UI, and tests validate the logic. No unrelated changes detected.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a WahlschlussCheck dialog feature, which is the primary objective of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 1049-cronjob-show-wahlschlusscheck-dialog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@wls-gui-wahllokalsystem/src/components/wahlhandlung/TheWahlschlussCheckPopupDialog.vue`:
- Around line 44-48: The computed hourOfTimeToCheck currently uses getHours()
(so only the hour is shown) causing times like 18:30 to render as "18 Uhr";
change hourOfTimeToCheck (and any consumer expecting its value) to return a full
time string including minutes—e.g., build a formatted "HH:MM" using new
Date(dateTimeToCheckWahlschluss.value).toLocaleTimeString(...) or by
zero-padding getHours() and getMinutes()—so the dialog displays "18:30 Uhr" when
dateTimeToCheckWahlschluss contains minutes.
🧹 Nitpick comments (2)
wls-gui-wahllokalsystem/src/components/wahlhandlung/TheWahlschlussCheckPopupDialog.vue (2)

26-28: Missing data-test attribute for testability.

The Anwesenheit dialog in App.vue has data-test="wahlvorstand-anwesenheits-check-popup-dialog" but this new dialog is rendered without one in App.vue (Line 26-28). Consider adding a data-test attribute for consistency and to support integration/E2E tests.


66-69: router.push is not awaited before closing the dialog.

router.push returns a promise. Calling closeDialog() immediately after could cause the dialog to unmount (clearing the timer in onUnmounted) before navigation resolves. Consider awaiting the push:

Proposed fix
-function onConfirmClicked() {
-  router.push({ name: ROUTE_STIMMABGABE });
-  closeDialog();
+async function onConfirmClicked() {
+  await router.push({ name: ROUTE_STIMMABGABE });
+  closeDialog();
 }

@ThoGro ThoGro enabled auto-merge (squash) February 10, 2026 13:14
@ThoGro ThoGro changed the title Add WahlschlussCheckDialog 1949 CronJob: Show WahlschlussCheck Dialog Feb 10, 2026
@vjohnslhm vjohnslhm self-requested a review February 11, 2026 12:09
Copy link
Collaborator

@vjohnslhm vjohnslhm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ich weiß nicht, ob es teil vom pr ist, aber in der infomanagement db müsste die beschreibung vom konfigurationsparameter geupdatet werden, weil da steht, dass der dialog bei bwb und bei uwb erscheinen kann. außer die anforderung im ticket, dass der dialog nur bei uwb kommt ist falsch, das muss bitte geklärt werden.

Image

@ThoGro
Copy link
Contributor Author

ThoGro commented Feb 13, 2026

außer die anforderung im ticket, dass der dialog nur bei uwb kommt ist falsch, das muss bitte geklärt werden.

Ist falsch. Den Dialog für den Wahlschluss gibt es nach Implementierung in der Altanwendung für UWB und BWB

grafik

Die Bedingung habe ich mit 7ea2945 entfernt

@ThoGro ThoGro requested a review from vjohnslhm February 13, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation wls-gui-wahllokalsystem frontend related issues for Wahllokalsystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CronJob: Show WahlschlussCheck Dialog

2 participants