diff --git a/src/components/Contentful/JourneyCardCarousel.vue b/src/components/Contentful/JourneyCardCarousel.vue index 28530b625b6..0da928c26fa 100644 --- a/src/components/Contentful/JourneyCardCarousel.vue +++ b/src/components/Contentful/JourneyCardCarousel.vue @@ -272,6 +272,10 @@ const props = defineProps({ type: Object, default: null }, + showPostLendingNextStepsCards: { + type: Boolean, + default: false + }, }); const { isMobile, isMedium, isLarge } = useBreakpoints(); @@ -285,14 +289,15 @@ const shouldShowEmailMarketingCard = computed( ); const isEmailUpdatesSlide = slide => slide?.isEmailUpdates === true; -const showLatestLoan = computed(() => props.postLendingNextStepsEnable && props.latestLoan); +const showLatestLoan = computed(() => props.showPostLendingNextStepsCards + && props.postLendingNextStepsEnable && props.latestLoan); const showSurveyCard = computed(() => { const userPreferences = props.userInfo?.userPreferences || {}; const parsedPrefs = JSON.parse(userPreferences.preferences || '{}'); const isFormSubmitted = (parsedPrefs.savedForms || []).some(form => form.formName === MYKIVA_INPUT_FORM_KEY); - return !isFormSubmitted && props.postLendingNextStepsEnable; + return props.showPostLendingNextStepsCards && !isFormSubmitted && props.postLendingNextStepsEnable; }); const badgesData = computed(() => { diff --git a/src/components/MyKiva/LendingStats.vue b/src/components/MyKiva/LendingStats.vue index ba9de44d6b0..9bfdd74c343 100644 --- a/src/components/MyKiva/LendingStats.vue +++ b/src/components/MyKiva/LendingStats.vue @@ -30,6 +30,7 @@ :hide-goal-card="hideCompletedGoalCard" :post-lending-next-steps-enable="postLendingNextStepsEnable" :user-info="userInfo" + :show-post-lending-next-steps-cards="showPostLendingNextStepsCards" @open-goal-modal="showGoalModal = true" /> @@ -161,6 +162,7 @@ :post-lending-next-steps-enable="postLendingNextStepsEnable" :latest-loan="latestLoan" :user-info="userInfo" + :show-post-lending-next-steps-cards="showPostLendingNextStepsCards" @open-goal-modal="showGoalModal = true" /> ([]), }, + postLendingNextStepsEnable: { + type: Boolean, + default: false, + } }); const badgeAchievedIds = ref(props.badgesAchieved.map(b => b.achievementId)); @@ -416,6 +420,8 @@ onMounted(async () => { 'all-achievements-earned', ); } + + setPostLendingCardCookie(cookieStore, props.postLendingNextStepsEnable); }); diff --git a/src/graphql/query/thanksPage.graphql b/src/graphql/query/thanksPage.graphql index 685deaca236..63e9bde7e2d 100644 --- a/src/graphql/query/thanksPage.graphql +++ b/src/graphql/query/thanksPage.graphql @@ -42,5 +42,9 @@ query thanksPage { key value } + post_lending_next_steps_enable: uiConfigSetting(key: "mykiva_post_lending_next_steps_enable") { + key + value + } } } diff --git a/src/pages/Thanks/ThanksPage.vue b/src/pages/Thanks/ThanksPage.vue index b799b9a939e..c9d926582a6 100644 --- a/src/pages/Thanks/ThanksPage.vue +++ b/src/pages/Thanks/ThanksPage.vue @@ -15,6 +15,7 @@ :goals-v2-enabled="goalsV2Enabled" :total-loans="totalLoanCount" :tiered-achievements="achievements" + :post-lending-next-steps-enable="postLendingNextStepsEnable" />