File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1174,6 +1174,16 @@ <h4>Pending UPI payments <span id="pendingCount" class="pending-badge">0</span><
11741174 }
11751175 if ( seq !== dashboardRefreshSeq ) return ; // superseded by a newer refresh; drop this stale result
11761176 allCitizens = list ;
1177+ // The period dropdown's cache (unpaidCache/periodsReady) was built from
1178+ // whatever allCitizens looked like at the time it was requested. If that
1179+ // happened before the very first citizen list arrived (e.g. someone opens
1180+ // the dropdown right after login), it would otherwise permanently cache an
1181+ // empty result — periodsReady stays true forever with no periods listed.
1182+ // Invalidating it here means the next dropdown focus (or an already-active
1183+ // period filter, re-checked by renderList below) recomputes against
1184+ // current data instead of a possibly-stale/empty snapshot.
1185+ periodsReady = false ;
1186+ unpaidCache = new Map ( ) ;
11771187 renderStats ( ) ; renderList ( ) ; refreshPending ( ) ;
11781188}
11791189function renderStats ( ) {
You can’t perform that action at this time.
0 commit comments