fix(dispatch): refetch appointments when the board date changes #140
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mapps-153-dispatch-date-refetch"
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?
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