-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
180 additions
and
173 deletions.
There are no files selected for viewing
11 changes: 5 additions & 6 deletions
11
.storybook/stories/NotifyMe.stories.js → ...rybook/stories/ChallengeHeader.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<template> | ||
<kv-page-container data-testid="challenge-header"> | ||
<kv-grid class="tw-grid-cols-12"> | ||
<div class="tw-col-span-12 lg:tw-col-span-8 lg:tw-col-start-3 tw-pt-6 tw-mb-4 hide-for-print"> | ||
<div | ||
class=" | ||
tw-flex | ||
tw-flex-col | ||
tw-items-center | ||
tw-w-full | ||
tw-bg-white | ||
tw-rounded | ||
tw-px-1.5 | ||
tw-pt-1.5 | ||
tw-pb-2.5 | ||
" | ||
> | ||
<div | ||
class="tw-flex tw-justify-between tw-w-full" | ||
> | ||
<p class="tw-text-left tw-font-medium" data-testid="loans-funded"> | ||
{{ loansFunded }}/{{ totalLoans }} loans funded | ||
</p> | ||
<div class="tw-flex tw-items-center tw-justify-center tw-relative"> | ||
<kv-progress-circle | ||
class="tw-w-10 tw-z-2 tw-h-10" | ||
:stroke-width="20" | ||
:value="percentageFunded" | ||
:arc-scale=".8" | ||
:rotate="36" | ||
:show-number="false" | ||
/> | ||
<div class="tw-absolute"> | ||
<rewards-icon class="tw-h-7 tw-w-6" /> | ||
</div> | ||
</div> | ||
<p class="tw-text-right tw-font-medium"> | ||
{{ daysRemaining }} days remaining | ||
</p> | ||
</div> | ||
<div class="tw-mt-2 tw-mb-6"> | ||
<h3> | ||
Challenge | ||
<a :href="teamChallengePath" data-testid="percentage-funded" class="tw-text-eco-green-3"> | ||
{{ percentageFunded }}% complete | ||
</a> | ||
</h3> | ||
</div> | ||
<div class="tw-flex tw-flex-col tw-items-center"> | ||
<h2 class="tw-text-center tw-mb-2"> | ||
<!-- eslint-disable-next-line max-len --> | ||
<span>We’ll announce whether the team has won the challenge before the next challenge on the </span><span class="tw-text-brand">20th of March</span><span>. Until then, we’d love your feedback!</span> | ||
</h2> | ||
<kv-button | ||
href="lp/challengefeedback" | ||
v-kv-track-event="['Thanks', 'click-teams-give-quick-feedback']" | ||
> | ||
Give quick feedback | ||
</kv-button> | ||
</div> | ||
</div> | ||
</div> | ||
</kv-grid> | ||
</kv-page-container> | ||
</template> | ||
<script> | ||
import KvProgressCircle from '@/components/Kv/KvProgressCircle'; | ||
import RewardsIcon from '@/assets/icons/inline/rewards.svg'; | ||
import teamGoalInfo from '@/plugins/team-goal-mixin'; | ||
import KvButton from '~/@kiva/kv-components/vue/KvButton'; | ||
import KvPageContainer from '~/@kiva/kv-components/vue/KvPageContainer'; | ||
import KvGrid from '~/@kiva/kv-components/vue/KvGrid'; | ||
export default { | ||
name: 'ChallengeHeader', | ||
mixins: [teamGoalInfo], | ||
components: { | ||
KvProgressCircle, | ||
RewardsIcon, | ||
KvButton, | ||
KvPageContainer, | ||
KvGrid, | ||
}, | ||
props: { | ||
teamPublicId: { | ||
type: String, | ||
default: '', | ||
}, | ||
}, | ||
computed: { | ||
teamChallengePath() { | ||
return this.teamPublicId ? `/team/challenge/${this.teamPublicId}` : '/teams'; | ||
}, | ||
}, | ||
}; | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.