Skip to content

Commit 6ec2e8d

Browse files
chore: add claimed for 8, 9 round (#10615)
* chore: add claimed for 8, 9 round * chore: lint fix * Update app/assets/v2/js/grants/ready_claim.js
1 parent b25598e commit 6ec2e8d

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

app/assets/v2/js/grants/matching_funds.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,19 @@ Vue.mixin({
244244
container.scrollIntoView(true);
245245
},
246246
hasHistoricalMatches(grant) {
247-
return grant.clr_matches.length && grant.clr_matches.filter(a => a.claim_tx).length;
247+
return grant.clr_matches.length &&
248+
(
249+
grant.clr_matches.filter(a => a.claim_tx).length ||
250+
grant.clr_matches.filter(a => [ 8, 9 ].includes(a.round_number)).length
251+
);
248252
},
249253
canClaimMatch(grant) {
250-
return grant.clr_matches.length && grant.clr_matches.filter(
251-
a => a.claim_tx === null &&
252-
a.grant_payout).length;
254+
return grant.clr_matches.length &&
255+
grant.clr_matches.filter(a =>
256+
a.claim_tx === null &&
257+
a.grant_payout &&
258+
[ 'ready', 'pending' ].includes(a.grant_payout.status)
259+
).length;
253260
},
254261
filterPendingClaims(matches) {
255262
return this.filterMatchingPayout(matches).filter(

app/assets/v2/js/grants/ready_claim.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Vue.component('matching-claim', {
1818
return this.status === 'pending';
1919
},
2020
isKYCPending() {
21-
return !this.match.ready_for_payout;
21+
return !this.match.ready_for_payout && this.match.grant_payout.status == 'ready';
2222
},
2323
claimStartDate() {
2424
return this.match.grant_payout.grant_clrs[0].claim_start_date;

app/grants/templates/grants/components/historical_claim.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ <h4 class="d-lg-block d-none font-weight-bold font-bigger-1 gc-font-base">[[ mat
2323
<span class="font-body text-grey-500">[[ match.claim_date ]]</span>
2424
</b-col>
2525
<b-col v-else-if="match.grant_payout.status === 'funding_withdrawn'" lg="4" sm="12" class="pt-2 pt-lg-0">
26-
<p class="text-grey-400 font-weight-bold returned_text">
27-
Returned to matching pool
26+
27+
<p v-if="match.round_number in ['8', '9']" class="text-highlight-green font-weight-bold claimed_text">
28+
<i class="far fa-check mr-2"></i>Claimed
2829
</p>
29-
<span class="font-body text-grey-500">[[ match.funding_withdrawal_date ]]</span>
30+
31+
<template v-else>
32+
<p class="text-grey-400 font-weight-bold returned_text">
33+
Returned to matching pool
34+
</p>
35+
<span class="font-body text-grey-500">[[ match.funding_withdrawal_date ]]</span>
36+
</template>
3037
</b-col>
3138
<b-col class="text-lg-right mt-2 mt-lg-0">
3239
<a v-if="match.claim_tx && match.claim_tx != 'NA' "

app/grants/templates/grants/components/ready_claim.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@ <h4 class="d-lg-block d-none font-weight-bold font-bigger-1 gc-font-base text-gr
2424
</template>
2525
</span>
2626
</template>
27-
<template v-else="isKYCPending">
27+
<template v-else-if="isKYCPending">
2828
<h4 class="d-lg-block d-none font-weight-bold font-bigger-1 text-grey-400 gc-font-base">Complete KYC to claim</h4>
2929
<span class="d-lg-none d-block font-weight-bold font-subheader text-grey-400">Complete KYC to claim</span>
3030
</template>
31-
<template v-else>
32-
<h4 class="d-lg-block d-none font-weight-bold font-bigger-1 text-grey-400 gc-font-base">No Action</h4>
33-
<span class="d-lg-none d-block font-weight-bold font-subheader text-grey-400">No Action</span>
34-
</template>
3531
</b-col>
3632

3733
<b-col class="text-lg-right mt-3 mt-lg-0">

0 commit comments

Comments
 (0)