fix: reward day calculation

This commit is contained in:
Krispire Admin
2026-06-08 16:09:25 +05:30
parent f598770b32
commit 39450c3266
+6
View File
@@ -246,8 +246,14 @@ func (s *SadhnaService) Dashboard(ctx context.Context, userID string) (*model.Sa
s.ensureGrant(ctx, userID, current)
}
pending, _ = s.rewards.PendingGrant(ctx, userID)
// Only project a next-gift date when a streak is actually in
// progress. With no live streak (current == 0) there's nothing to
// "continue", so the calendar shows no gift marker until the devotee
// completes a day (full rounds AND a quote).
if current > 0 {
nextReward = nextRewardDate(today, current, todayDone)
}
}
return &model.SadhnaDashboard{
TargetRounds: target,