diff --git a/src/components/dao/settings-plans-billing.vue b/src/components/dao/settings-plans-billing.vue
index f49778a5a..e62a71beb 100644
--- a/src/components/dao/settings-plans-billing.vue
+++ b/src/components/dao/settings-plans-billing.vue
@@ -78,6 +78,7 @@ export default {
$priceId: String!
$redirectDomain: String!
$successUrl: String!
+ $cancelUrl: String!
) {
createCheckoutSession(
daoId: $daoId
@@ -87,6 +88,7 @@ export default {
priceId: $priceId
redirectDomain: $redirectDomain
successUrl: $successUrl
+ cancelUrl: $cancelUrl
) {
id
url
@@ -100,7 +102,8 @@ export default {
daoUrl: this.daoSettings.url,
priceId: id,
redirectDomain: ORIGIN,
- successUrl: `/${this.daoSettings.url}/configuration?tab=PLANS_AND_BILLING`
+ successUrl: `/${this.daoSettings.url}/configuration?tab=PLANS_AND_BILLING`,
+ cancelUrl: `/${this.daoSettings.url}/configuration?tab=PLANS_AND_BILLING`
}
})
diff --git a/src/components/navigation/left-navigation.vue b/src/components/navigation/left-navigation.vue
index 4d4acd538..470956fba 100644
--- a/src/components/navigation/left-navigation.vue
+++ b/src/components/navigation/left-navigation.vue
@@ -1,15 +1,45 @@
q-page.page-election
- base-banner.q-mb-md(v-bind="upvoteElectionBanner" @onClose="hideUpvoteBanner" upvoteBanner :background="require('~/assets/images/election-banner-bg.jpeg')" v-if="isUpVoteElectionBannerVisible && upcomingElection")
+ base-banner.q-mb-md(v-bind="upvoteElectionBanner" @onClose="hideUpvoteBanner" upvoteBanner :background="require('~/assets/images/election-banner-bg.jpeg')" v-if="isUpVoteElectionBannerVisible && (upcomingElection || canStartElection)")
template(v-if="hasNextElection" v-slot:right)
.flex.full-width.full-height.items-center.justify-center
- q-card.q-pa-xl(:style="{ 'width': '350px', 'opacity': '.7', 'border-radius': '15px' }")
+ q-card.q-pa-xl(v-if="!canStartElection" :style="{ 'width': '350px', 'opacity': '.7', 'border-radius': '15px' }")
.col
.row.full-width.justify-center.q-pb-md(:style="{ 'border-bottom': '1px solid #242f5d'}")
.row
@@ -244,12 +291,13 @@ q-page.page-election
//- .col.flex.justify-center
.h-h6 $ {{ formatNumber(treasury) }}
.full-width.flex.justify-center.text-secondary {{ $t('pages.dho.home.treasury') }}
- template(v-if="hasNextElection" v-slot:buttons)
+ template(v-slot:buttons)
.row.justify-start
.flex(:class=" { 'q-mt-md': $q.screen.lt.md, 'justify-end': $q.screen.gt.sm }")
- q-btn.q-px-lg.h-btn1(@click="$router.push({ path: `/${selectedDao.name}/election/${upcomingElection.docId}` })" :disable="!upcomingElection" :class="{ 'q-mt-sm': $q.screen.lt.xs || $q.screen.xs }" no-caps rounded unelevated :label="$t('pages.dho.home.signup')" color="secondary" text-color="white")
+ q-btn.q-px-lg.h-btn1(v-if="canStartElection" @click="_createElection" :class="{ 'q-mt-sm': $q.screen.lt.xs || $q.screen.xs }" no-caps rounded unelevated :label="$t('pages.dho.home.start')" color="secondary" text-color="white")
+ q-btn.q-px-lg.h-btn1(v-else @click="$router.push({ path: `/${$store.state.dao.settings.settings_daoUrl_s}/election/${upcomingElection.docId}` })" :disable="!upcomingElection" :class="{ 'q-mt-sm': $q.screen.lt.xs || $q.screen.xs }" no-caps rounded unelevated :label="$t('pages.dho.home.signup')" color="secondary" text-color="white")
q-btn.q-px-lg.h-btn1.q-ml-sm(color="white" flat :label="$t('pages.dho.home.learnMore')" no-caps rounded)
- template(v-else="!hasNextElection" v-slot:buttons)
+ //- template(v-slot:buttons)
.row.justify-start
q-btn.q-px-lg.h-btn1(disable :class="{ 'q-mt-sm': $q.screen.lt.xs || $q.screen.xs }" no-caps rounded unelevated :label="$t('pages.dho.home.nextElection', { date: dateToStringShort(nextElectionStartDate) })" color="white" text-color="primary")
.row
@@ -264,25 +312,18 @@ q-page.page-election
.col.flex.justify-center.text-black(:style="{ 'font-size': '17px' }")
div {{ election.participants }} {{ $t('pages.dho.election.participants') }}
.col.flex.justify-end
- q-btn.q-px-lg.h-btn1(@click="$router.push({ path: `/${selectedDao.name}/election/${election.id}` })" :class="{ 'q-mt-sm': $q.screen.lt.xs || $q.screen.xs }" no-caps rounded unelevated :label="$t('pages.dho.election.seeResults')" color="primary" text-color="white")
+ q-btn.q-px-lg.h-btn1(@click="$router.push({ path: `/${$store.state.dao.settings.settings_daoUrl_s}/election/${election.id}` })" :class="{ 'q-mt-sm': $q.screen.lt.xs || $q.screen.xs }" no-caps rounded unelevated :label="$t('pages.dho.election.seeResults')" color="primary" text-color="white")
.col
widget(:title="widgetTitle")
q-carousel.b2.q-mt-md(v-model="slide" swipeable="swipeable" animated="animated" navigation="navigation" :padding="false" height="240px" control-color="primary" ref="carousel")
q-carousel-slide.no-padding(name="1")
.h-b2 {{ $t('pages.dho.election.thereAreThreeRounds') }}
- .col.text-black.text-bold.q-my-xxs(:style="{ 'font-weight': '600' }")
- .row.q-mb-md.flex.justify-between.items-center
- div {{ $t('pages.dho.election.voteForYourself') }}
- q-icon(name="fas fa-check" color="positive" size="20px")
- .row.flex.justify-between.items-center
- div {{ $t('pages.dho.election.reachConsensus') }}
- q-icon(name="fas fa-check" color="positive" size="20px")
q-carousel-slide.no-padding(name="2")
.h-b2 {{ $t('pages.dho.election.thereAreThreeVoting') }}
q-carousel-slide.no-padding(name="3")
.h-b2 {{ $t('pages.dho.election.ifYouNeedMore') }}
.row.flex.justify-end.q-mt-lg
- q-btn.h-btn1.q-px-sm(:color="'secondary'" no-caps rounded unelevated) {{ $t('pages.dho.election.visitEdenCommunity') }}
+ q-btn.h-btn1.q-px-sm(@click="visitToEden()" :color="'secondary'" no-caps rounded unelevated) {{ $t('pages.dho.election.visitEdenCommunity') }}
template(v-slot:control)
q-carousel-control(position="bottom-right")
q-btn.q-mt-md.round-circle(flat unelevated padding="13px" icon="fas fa-chevron-right" size="xxs" color="primary" @click="$refs.carousel.next()")
diff --git a/src/pages/upvote-election/GroupCard.vue b/src/pages/upvote-election/GroupCard.vue
index ca539493f..f82c270ea 100644
--- a/src/pages/upvote-election/GroupCard.vue
+++ b/src/pages/upvote-election/GroupCard.vue
@@ -16,7 +16,8 @@ export default {
groupId: String,
winner: String,
roundNumber: Number,
- videoLink: String
+ videoLink: String,
+ groups: Array
},
data () {
@@ -62,6 +63,13 @@ export default {
},
openLink () {
window.open(this.videoLink, '_blank')
+ },
+ getRoundGroupWinnerIcon() {
+ if (this.groups.length < 12) {
+ return require('~/assets/icons/delegate-l1.svg')
+ } else {
+ return require('~/assets/icons/delegate-l2.svg')
+ }
}
}
}
@@ -85,9 +93,8 @@ export default {
template(v-for="user in users")
div(:style="'position: relative;'")
profile-picture.q-mr-xxs(:username="user.details_member_n" size="24px" :key="user.details_member_n")
- img.absolute(v-if="user.details_member_n === winner && roundNumber === 1" width="18px" height="18px" :style="'top: 14px; left: 12px;'" src="~/assets/icons/delegate-l1.svg")
- img.absolute(v-if="user.details_member_n === winner && roundNumber === 2" width="18px" height="18px" :style="'top: 14px; left: 12px;'" src="~/assets/icons/delegate-l2.svg")
- img.absolute(v-if="user.details_member_n === winner && roundNumber === 3" width="18px" height="18px" :style="'top: 14px; left: 12px;'" src="~/assets/icons/chief-delegate.svg")
+ img.absolute(v-if="user.details_member_n === winner" width="18px" height="18px" :style="'top: 14px; left: 12px;'" :src="getRoundGroupWinnerIcon()")
+ img.absolute(v-if="user.details_member_n === winner && roundNumber >= 3" width="18px" height="18px" :style="'top: 14px; left: 12px;'" src="~/assets/icons/chief-delegate.svg")
q-btn(@click="showUsers = !showUsers" flat rounded :icon="showUsers ? 'fas fa-chevron-up' : 'fas fa-chevron-down'")
div(v-if="!users.find(user => user.details_member_n === account && electionStatus !== 'finished') && !videoLink") {{ $t('pages.upvote-election.groupcard.noRecordingsYet') }}
.text-secondary.cursor-pointer.text-underline(v-else-if="videoLink" @click="openLink()") {{ videoLink }}
diff --git a/src/pages/upvote-election/RoundCard.vue b/src/pages/upvote-election/RoundCard.vue
index 1c5dae471..0740c3a98 100644
--- a/src/pages/upvote-election/RoundCard.vue
+++ b/src/pages/upvote-election/RoundCard.vue
@@ -94,7 +94,7 @@ export default {
div.q-my-xl.q-pt-xl(v-show="showGroups" :style="{ 'border-top': '1px solid #CBCDD1'}")
.row.q-gutter-col-md
template(v-for="group, index in groups")
- group-card.col-6.q-pa-xxs(:videoLink="group.videoLink" :roundNumber="roundNumber" :winner="group.winner" :groupId="group.id" :roundId="id" :electionStatus="electionStatus" :users="group.members" :groupNumber="index + 1" :votes="group.votes")
+ group-card.col-6.q-pa-xxs(:groups="groups" :videoLink="group.videoLink" :roundNumber="roundNumber" :winner="group.winner" :groupId="group.id" :roundId="id" :electionStatus="electionStatus" :users="group.members" :groupNumber="index + 1" :votes="group.votes")