fix bonus completeions
This commit is contained in:
@@ -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) ───
|
||||
|
||||
Reference in New Issue
Block a user