cyber4EDU/binda
12
1
Fork
You've already forked binda
0

feat(ui): Verspätung erfassen #158

Merged
ioss merged 1 commit from feat/ui-#129-Verspaetung-erfassen into main 2026年07月10日 13:54:10 +02:00
Member
Copy link

Closes #129

Adds "Verspätung" (Late) as a selectable absence reason in the Abmelden form.

What changed

  • absentReasons now includes Late (before Sonstiges) + hourglass Icon
  • New Late branch: a single "Voraussichtliche Ankunft — heute um" time input, no day pickers.
  • Default arrival time is now rounded up to the next 15 minutes (9:12 → 9:15), so the common "kommt gleich" case is one tap.
  • from_date is implicit and never shown: max(today 00:00, last checkout today). Recorded at creation time; editing an existing Verspätung keeps the stored from_date and only moves until_date.
  • Choosing an arrival before the pupil's checkout surfaces the existing "Bitte wähle einen gültigen Zeitraum aus." validation error instead of silently adjusting the range.

The API already supports AbsentReason::Late (#147).

Verified

  • yarn check passes (lint + types + tests).
  • Live walkthrough against the dev API:
    • pupil without a checkout today: POST /absentfrom_date = today 00:00 local, until_date = today at the chosen time, reason: "Late" (201);
    • pupil checked in and out today: POST /absentfrom_date = the exact checkout timestamp (201);
    • default time correctly rounded up (11:42 → 11:45, 11:47 → 12:00); changing the time works;
    • arrival before the checkout → validation error, no request sent;
    • edit: only until_date moves, from_date unchanged (PUT 200); delete works (DELETE 204);
    • absence badge shows the Late icon ("bis 12:30 ") on the pupil card.
Closes #129 Adds "Verspätung" (Late) as a selectable absence reason in the Abmelden form. ## What changed - `absentReasons` now includes `Late` (before `Sonstiges`) + hourglass Icon - New `Late` branch: a single "Voraussichtliche Ankunft — heute um" time input, no day pickers. - Default arrival time is *now rounded up to the next 15 minutes* (9:12 → 9:15), so the common "kommt gleich" case is one tap. - `from_date` is implicit and never shown: `max(today 00:00, last checkout today)`. Recorded at creation time; editing an existing Verspätung keeps the stored `from_date` and only moves `until_date`. - Choosing an arrival before the pupil's checkout surfaces the existing "Bitte wähle einen gültigen Zeitraum aus." validation error instead of silently adjusting the range. The API already supports `AbsentReason::Late` (#147). ## Verified - `yarn check` passes (lint + types + tests). - Live walkthrough against the dev API: - pupil without a checkout today: `POST /absent` → `from_date` = today 00:00 local, `until_date` = today at the chosen time, `reason: "Late"` (201); - pupil checked in and out today: `POST /absent` → `from_date` = the exact checkout timestamp (201); - default time correctly rounded up (11:42 → 11:45, 11:47 → 12:00); changing the time works; - arrival before the checkout → validation error, no request sent; - edit: only `until_date` moves, `from_date` unchanged (PUT 200); delete works (DELETE 204); - absence badge shows the Late icon ("bis 12:30 ⌛") on the pupil card.
ioss changed title from (削除) WIP: feat(ui): Verspätung erfassen (削除ここまで) to feat(ui): Verspätung erfassen 2026年07月10日 13:49:01 +02:00
ioss force-pushed feat/ui-#129-Verspaetung-erfassen from b25114ce32 to c0c3c129f3
Some checks failed
build-docker / build_api (push) Successful in 2m13s
build-docker / build_webui (push) Successful in 2m46s
build-keycloak-config / build_tofu (push) Failing after 1s
build-docker / update_deployment_dev (push) Successful in 1m50s
2026年07月10日 13:49:08 +02:00
Compare
ioss deleted branch feat/ui-#129-Verspaetung-erfassen 2026年07月10日 13:54:11 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cyber4EDU/binda!158
Reference in a new issue
cyber4EDU/binda
No description provided.
Delete branch "feat/ui-#129-Verspaetung-erfassen"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?