From 0afaee8c74be541625444cf51b772eb2c3bb38e0 Mon Sep 17 00:00:00 2001 From: Casey Dyer Date: Mon, 11 Nov 2024 18:25:13 -0800 Subject: [PATCH 1/3] fix: show in-progress badges in impact journeys section --- src/components/MyKiva/BadgesSection.vue | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/MyKiva/BadgesSection.vue b/src/components/MyKiva/BadgesSection.vue index 1a151dd40e..a8b0ee6a54 100644 --- a/src/components/MyKiva/BadgesSection.vue +++ b/src/components/MyKiva/BadgesSection.vue @@ -20,18 +20,18 @@ {{ badge.challengeName }} -
-
+
{ const levelCaption = badge => { return `Level ${getActiveTierData(badge).level}/${getBadgeWithVisibleTiers(badge).achievementData.tiers.length}`; }; + +const getBadgeStatus = badge => { + const activeTier = getActiveTierData(badge); + if (activeTier?.level === badge?.achievementData?.tiers?.length) { + return BADGE_COMPLETED; + } + return BADGE_IN_PROGRESS; +};