diff --git a/src/components/GoalSetting/GoalSettingContainer.vue b/src/components/GoalSetting/GoalSettingContainer.vue index 19fe152f76e..bc289e7ac17 100644 --- a/src/components/GoalSetting/GoalSettingContainer.vue +++ b/src/components/GoalSetting/GoalSettingContainer.vue @@ -36,9 +36,10 @@ v-show="showCategories" >

+ > + Choose an impact area + { - return `Make ${loanTarget.value} loans to...`; -}); - const editGoalCategory = () => { // Force CategoryForm to re-render so it reverts to the default selected category categoryFormKey.value += 1; diff --git a/src/components/MyKiva/GoalSetting/CategoryForm.vue b/src/components/MyKiva/GoalSetting/CategoryForm.vue index a8517869642..f879ca615fd 100644 --- a/src/components/MyKiva/GoalSetting/CategoryForm.vue +++ b/src/components/MyKiva/GoalSetting/CategoryForm.vue @@ -1,16 +1,59 @@ diff --git a/src/components/MyKiva/GoalSettingModal.vue b/src/components/MyKiva/GoalSettingModal.vue index 4487c8685f0..0894169d133 100644 --- a/src/components/MyKiva/GoalSettingModal.vue +++ b/src/components/MyKiva/GoalSettingModal.vue @@ -8,17 +8,17 @@

+ class="tw-mb-3 tw-text-left md:tw-text-center" + > + Choose an impact area + { return formStep.value === 1 ? 'Continue' : 'Set my goal'; }); -const title = computed(() => { - if (props.goalsV2Enabled) { - return `Make ${selectedGoalNumber.value} loans to...`; - } - if (formStep.value === 1) { - return 'Choose your impact goal category'; - } - if (selectedCategory.value?.title) { - return `How many more loans to ${selectedCategory.value?.title} will you support this year?`; - } - return 'How many more people will you support this year?'; -}); - const ctaHref = computed(() => { // Use goalProgress which tracks current year progress return getCtaHref( diff --git a/src/composables/useGoalData.js b/src/composables/useGoalData.js index 478cbf1b87c..e6d5826a8b3 100644 --- a/src/composables/useGoalData.js +++ b/src/composables/useGoalData.js @@ -174,13 +174,13 @@ export default function useGoalData({ apollo } = {}) { }, { id: '2', - name: 'Refugees', - description: 'Transform the future for refugees', - eventProp: 'refugees', - customImage: refugeesImg, - loanCount: categoriesLoanCount?.[ID_REFUGEE_EQUALITY], - title: 'refugees', - badgeId: ID_REFUGEE_EQUALITY, + name: 'Choose as I go', + description: 'Support a variety of borrowers', + eventProp: 'help-everyone', + customImage: supportAllImg, + loanCount: totalLoans, + title: null, + badgeId: ID_SUPPORT_ALL, }, { id: '3', @@ -194,16 +194,6 @@ export default function useGoalData({ apollo } = {}) { }, { id: '4', - name: 'U.S. Entrepreneurs', - description: 'Support small businesses in the U.S.', - eventProp: 'us-entrepreneur', - customImage: usEntrepreneursImg, - loanCount: categoriesLoanCount?.[ID_US_ECONOMIC_EQUALITY], - title: 'US entrepreneurs', - badgeId: ID_US_ECONOMIC_EQUALITY, - }, - { - id: '5', name: 'Basic Needs', description: 'Clean water, healthcare, and sanitation', eventProp: 'basic-needs', @@ -212,16 +202,26 @@ export default function useGoalData({ apollo } = {}) { title: 'basic needs', badgeId: ID_BASIC_NEEDS, }, + { + id: '5', + name: 'Refugees', + description: 'Transform the future for refugees', + eventProp: 'refugees', + customImage: refugeesImg, + loanCount: categoriesLoanCount?.[ID_REFUGEE_EQUALITY], + title: 'refugees', + badgeId: ID_REFUGEE_EQUALITY, + }, { id: '6', - name: 'Choose as I go', - description: 'Support a variety of borrowers', - eventProp: 'help-everyone', - customImage: supportAllImg, - loanCount: totalLoans, - title: null, - badgeId: ID_SUPPORT_ALL, - } + name: 'U.S. Entrepreneurs', + description: 'Support small businesses in the U.S.', + eventProp: 'us-entrepreneur', + customImage: usEntrepreneursImg, + loanCount: categoriesLoanCount?.[ID_US_ECONOMIC_EQUALITY], + title: 'US entrepreneurs', + badgeId: ID_US_ECONOMIC_EQUALITY, + }, ]; } diff --git a/test/unit/specs/composables/useGoalData.spec.js b/test/unit/specs/composables/useGoalData.spec.js index b4fe9953364..f5af65555df 100644 --- a/test/unit/specs/composables/useGoalData.spec.js +++ b/test/unit/specs/composables/useGoalData.spec.js @@ -1827,8 +1827,8 @@ describe('useGoalData', () => { badgeId: ID_WOMENS_EQUALITY, }); - expect(categories[5]).toEqual({ - id: '6', + expect(categories[1]).toEqual({ + id: '2', name: 'Choose as I go', description: 'Support a variety of borrowers', eventProp: 'help-everyone', @@ -1843,14 +1843,14 @@ describe('useGoalData', () => { const categories = composable.getCategories(undefined, 15); expect(categories[0].loanCount).toBeUndefined(); - expect(categories[5].loanCount).toBe(15); + expect(categories[1].loanCount).toBe(15); }); it('should handle null categoriesLoanCount', () => { const categories = composable.getCategories(null, 20); - expect(categories[1].loanCount).toBeUndefined(); - expect(categories[5].loanCount).toBe(20); + expect(categories[3].loanCount).toBeUndefined(); + expect(categories[1].loanCount).toBe(20); }); });