fix(dispatch): refetch appointments when the board date changes #140

Merged
David merged 2 commits from fix/mapps-153-dispatch-date-refetch into main 2026-06-14 16:17:39 +02:00
Owner

The Dispatch Board read the active_day signal and computed the from/to range OUTSIDE the use_resource closure, so the resource only captured the first day's plain DateTime values and never subscribed to active_day. Clicking Next/Previous/Today advanced the header but never re-ran GET /api/v1/dispatch, leaving every date showing the first day it loaded.

Move the active_day read and the from/to range computation INSIDE the resource closure so Dioxus subscribes to the signal and refetches on every date change. A day seeded with zero appointments now renders empty because its own (empty) response is fetched and bound.

#MAPPS-153

The Dispatch Board read the active_day signal and computed the from/to range OUTSIDE the use_resource closure, so the resource only captured the first day's plain DateTime values and never subscribed to active_day. Clicking Next/Previous/Today advanced the header but never re-ran GET /api/v1/dispatch, leaving every date showing the first day it loaded. Move the active_day read and the from/to range computation INSIDE the resource closure so Dioxus subscribes to the signal and refetches on every date change. A day seeded with zero appointments now renders empty because its own (empty) response is fetched and bound. #MAPPS-153
fix(dispatch): refetch appointments when the board date changes
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 51s
d226f3ad5f
The Dispatch Board read the active_day signal and computed the from/to range OUTSIDE the use_resource closure, so the resource only captured the first day's plain DateTime values and never subscribed to active_day. Clicking Next/Previous/Today advanced the header but never re-ran GET /api/v1/dispatch, leaving every date showing the first day it loaded.

Move the active_day read and the from/to range computation INSIDE the resource closure so Dioxus subscribes to the signal and refetches on every date change. A day seeded with zero appointments now renders empty because its own (empty) response is fetched and bound.

#MAPPS-153
Merge branch 'main' into fix/mapps-153-dispatch-date-refetch
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m23s
41f2ded497
David merged commit f25a9e7c12 into main 2026-06-14 16:17:39 +02:00
David deleted branch fix/mapps-153-dispatch-date-refetch 2026-06-14 16:17:40 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
psa-systems/mokosh-apps!140
No description provided.