fix: KPI card counts match feed — exclusive buckets + filter reset on click
- reminderService: dueThisWeek/dueThisMonth use exclusive day ranges (1-7, 8-30) matching getHorizon() buckets; schattenmarktReadyCount counts by type=SCHATTENMARKT_RELEASE (same criteria as the feed filter) - ReminderKpiBar: clicking a horizon card resets filterType to ALL; clicking Pre-Market card resets filterHorizon to ALL — ensures the number shown on the card always equals the number of rows displayed below Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -75,11 +75,21 @@ export function ReminderKpiBar() {
|
||||
)
|
||||
|
||||
function toggleHorizon(h: FilterHorizon) {
|
||||
setFilterHorizon(filterHorizon === h ? 'ALL' : h)
|
||||
if (filterHorizon === h) {
|
||||
setFilterHorizon('ALL')
|
||||
} else {
|
||||
setFilterHorizon(h)
|
||||
setFilterType('ALL') // clear type filter so count matches
|
||||
}
|
||||
}
|
||||
|
||||
function togglePreMarket() {
|
||||
setFilterType(filterType === ReminderType.SCHATTENMARKT_RELEASE ? 'ALL' : ReminderType.SCHATTENMARKT_RELEASE)
|
||||
if (filterType === ReminderType.SCHATTENMARKT_RELEASE) {
|
||||
setFilterType('ALL')
|
||||
} else {
|
||||
setFilterType(ReminderType.SCHATTENMARKT_RELEASE)
|
||||
setFilterHorizon('ALL') // clear horizon filter so count matches
|
||||
}
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
|
||||
Reference in New Issue
Block a user