fix bonus completeions

This commit is contained in:
JCEEE
2026-09-14 13:00:13 +01:00
parent e441c3d2a7
commit da6a6e372c
7 changed files with 60 additions and 12 deletions
@@ -623,12 +623,6 @@
const rDate = (existingReward?.date || '').slice(0, 10);
const rewardInWeek = !!rDate && rDate >= weekStart && rDate <= weekEnd;
const rewardOutstanding = !!existingReward && existingReward.status !== 'claimed';
// A claimed reward from a previous week with no fresh progress
// means the goal is done — drop the card entirely instead of
// showing a stale 0% chase.
const staleClaimed =
!!existingReward && !rewardInWeek && !rewardOutstanding && current === 0;
if (staleClaimed) return null;
const achieved = existingReward
? rewardInWeek || rewardOutstanding
: isPercent
@@ -659,8 +653,7 @@
periodStart: pStart,
periodEnd: pEnd
};
})
.filter((g) => g !== null);
});
});
// ─── Goal celebrations (bonus rewards achieved) ───