diff --git a/src/assets/icons/inline/two-hands-heart.svg b/src/assets/icons/inline/two-hands-heart.svg new file mode 100644 index 0000000000..72a2c78307 --- /dev/null +++ b/src/assets/icons/inline/two-hands-heart.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/components/Teams/TeamGoal.vue b/src/components/Teams/TeamGoal.vue new file mode 100644 index 0000000000..02fb058e33 --- /dev/null +++ b/src/components/Teams/TeamGoal.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + {{ goal.name }} + + + {{ loanBecause }} + + + {{ daysRemaining }} days remaining + {{ loansFunded }}/{{ totalLoans }} loans funded + + + + + + + {{ membersParticipating }} members participating + + View + + + + + + + diff --git a/src/components/Teams/TeamGoalsList.vue b/src/components/Teams/TeamGoalsList.vue new file mode 100644 index 0000000000..5db53be258 --- /dev/null +++ b/src/components/Teams/TeamGoalsList.vue @@ -0,0 +1,68 @@ + + + + + + + + + + + {{ activeGoals.length }} teams with active challenges! + + Don’t see your team on this list? Let us know if you’re interested! + + + + + + + + + + + + + + diff --git a/src/graphql/query/teamInfoFromId.graphql b/src/graphql/query/teamInfoFromId.graphql index cf4b20371a..e485e51114 100644 --- a/src/graphql/query/teamInfoFromId.graphql +++ b/src/graphql/query/teamInfoFromId.graphql @@ -4,6 +4,12 @@ query teamInfoFromId($team_id: Int, $team_recruitment_id: Int, $team_ids: [Int]) id name membershipType + loanBecause + image{ + id + url + } + teamPublicId } } my { diff --git a/src/graphql/query/teamsGoals.graphql b/src/graphql/query/teamsGoals.graphql new file mode 100644 index 0000000000..7c8fb1e37f --- /dev/null +++ b/src/graphql/query/teamsGoals.graphql @@ -0,0 +1,30 @@ +query GetGoals { + getGoals(filters: { audienceType: TEAM, isActive: true}) { + totalCount + values { + id + description + name + participation { + totalCount + values { + lenderId + } + } + status + targets { + totalCount + values { + ... on LoanTarget { + loanId + status + } + } + } + endDate + ... on TeamGoal { + teamId + } + } + } +} diff --git a/src/pages/LendingTeams/LendingTeams.vue b/src/pages/LendingTeams/LendingTeams.vue index aaad758b7b..54fd56c55c 100644 --- a/src/pages/LendingTeams/LendingTeams.vue +++ b/src/pages/LendingTeams/LendingTeams.vue @@ -1,5 +1,6 @@ + import WwwPage from '@/components/WwwFrame/WwwPage'; +import TeamGoalsList from '@/components/Teams/TeamGoalsList'; import KvPageContainer from '~/@kiva/kv-components/vue/KvPageContainer'; import KvButton from '~/@kiva/kv-components/vue/KvButton'; import KvGrid from '~/@kiva/kv-components/vue/KvGrid'; @@ -109,8 +111,9 @@ export default { KvPageContainer, KvButton, KvGrid, - TeamListing, - TeamLeaderboards + TeamGoalsList, + TeamLeaderboards, + TeamListing }, }; diff --git a/src/pages/LendingTeams/TeamLeaderboard.vue b/src/pages/LendingTeams/TeamLeaderboard.vue index 506f0fd38a..8a48099cfd 100644 --- a/src/pages/LendingTeams/TeamLeaderboard.vue +++ b/src/pages/LendingTeams/TeamLeaderboard.vue @@ -11,8 +11,8 @@ @@ -216,7 +216,11 @@ export default { diff --git a/src/util/teamsUtil.js b/src/util/teamsUtil.js index ec7db766e3..2cb3ef4de9 100644 --- a/src/util/teamsUtil.js +++ b/src/util/teamsUtil.js @@ -1,4 +1,5 @@ import teamsQuery from '@/graphql/query/teamsQuery.graphql'; +import teamsGoals from '@/graphql/query/teamsGoals.graphql'; import leaderboardsQuery from '@/graphql/query/leaderboardsQuery.graphql'; export const teamCategories = [ @@ -116,3 +117,14 @@ export async function fetchLeaderboard(apollo, category) { console.log('Loading leaderboards failed:', e.message); } } + +export async function fetchGoals(apollo) { + try { + const result = await apollo.query({ + query: teamsGoals, + }); + return result.data?.getGoals; + } catch (e) { + console.log('Team Goals query failed:', e.message); + } +}
+ +
+ {{ loanBecause }} +
+ Don’t see your team on this list? Let us know if you’re interested! +