Commit 8416961
committed
Fix period-filter dropdown permanently stuck on empty options
loadPendingPeriods() cached its result via a one-shot periodsReady flag
that, once true, was never reset except by a Manage Periods save. If
the dropdown got focused before the citizen list's first load finished
(e.g. right after login, made more likely by the recent debounce added
to refreshDashboard), it would compute against an empty allCitizens,
find no periods, and set periodsReady=true anyway -- permanently
showing only "All pending (any period)" for the rest of the session,
even once the real data arrived.
refreshDashboard now resets periodsReady/unpaidCache every time it
repopulates allCitizens, so the next dropdown focus (or an
already-active period filter) recomputes against current data instead
of being stuck on a stale/empty snapshot.1 parent 8d0ae63 commit 8416961
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1177 | 1187 | | |
1178 | 1188 | | |
1179 | 1189 | | |
| |||
0 commit comments