Skip to content

Commit 3f7fc14

Browse files
feat: GR15 support fixes (#10769)
* feat: add new links on grant homepage closes #10767 * feat: add links to grant creation form fixes #10753 * chore: update amount to rounded_amount in grant detail + preview fixes #10751
1 parent 05b34af commit 3f7fc14

File tree

6 files changed

+34
-6
lines changed

6 files changed

+34
-6
lines changed

app/assets/v2/js/grants/_detail-component.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,12 @@ Vue.component('grant-details', {
615615
vm.grant_salected_tags = vm.grant.grant_tags ? vm.grant.grant_tags.map(tag => tag.pk) : [];
616616
vm.chainId = vm.grant.tenants.length > 0 ? vm.grant.tenants[0].toLowerCase() : '';
617617

618+
const amount_received = Number(vm.grant.amount_received.replace(',', ''));
619+
const rounded_lifetime_amount = Math.round(amount_received / 1000) * 1000;
620+
621+
vm.grant.rounded_lifetime_amount = (rounded_lifetime_amount > 1000) ?
622+
`~$${rounded_lifetime_amount}` : '>$1,000';
623+
618624
if (vm.grant.description_rich_edited) {
619625
vm.editor.updateContents(JSON.parse(vm.grant.description_rich));
620626
}

app/assets/v2/js/grants/_new.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ if (document.getElementById('gc-new-grant')) {
483483
},
484484
grantTagOptions() {
485485
const sorted_tags = this.grant_tags.sort((a, b) => a.id - b.id);
486-
const next_id = sorted_tags[sorted_tags.length-1].id + 1;
486+
const next_id = sorted_tags[sorted_tags.length - 1].id + 1;
487487
const all_tags = this.grant_tags.sort((a, b) => b.is_eligibility_tag - a.is_eligibility_tag);
488488
const first_discovery = (tag) => tag.is_eligibility_tag === 0;
489489

app/grants/templates/grants/_new.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@
6767
@update-navigation="updateNav"
6868
>
6969
<div class="mb-4">
70+
<p class="mt-0 mb-1">
71+
<a href="https://gitcoin.notion.site/GR15-Gitcoin-Grant-Eligibility-Briefs-7949392eb2684ea6ae9072cad7fff277" rel="noopener noreferrer">
72+
Round Eligibility Criteria
73+
</a>
74+
</p>
75+
7076
<label class="mb-1 font-subheader font-weight-light letter-spacing" for="">Tags</label>
7177
<span class="font-smaller-2 py-1 font-weight-normal badge badge-greylight ml-2">required</span>
7278

@@ -526,6 +532,12 @@
526532
Please verify forms errors and try again
527533
</div>
528534

535+
<p class="text-center font-body mx-auto mt-4">
536+
<a href="https://gitcoin.notion.site/gitcoin/Gitcoin-Grantee-Onboarding-Document-bbfe106a32534fb5a011f09c121257c3" target="_blank" rel="noopener noreferrer">
537+
Need help creating your grant?
538+
</a>
539+
</p>
540+
529541
</div>
530542
</div>
531543
</form>

app/grants/templates/grants/detail/template-grant-details.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ <h2>[[grant.title]]</h2>
282282

283283
<div class="row mt-2">
284284
<div class="col mb-5">
285-
<h3>Lifetime funding received</h3>
286-
<h2>$[[grant.amount_received ]]</h2>
287-
<span>raised from all contributors</span>
285+
<h3>Estimated lifetime funding received</h3>
286+
<h2>[[ grant.rounded_lifetime_amount ]]</h2>
287+
<span>This number should not be used for accounting purposes.</span>
288288
</div>
289289
</div>
290290

app/grants/templates/grants/grant-preview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ <h2>[[form.title]]</h2>
249249

250250
<div class="row mt-2">
251251
<div class="col mb-5">
252-
<h3>Lifetime funding received</h3>
252+
<h3>Estimated lifetime funding received</h3>
253253
<h2>$0</h2>
254-
<span>raised from all contributors</span>
254+
<span>This number should not be used for accounting purposes.</span>
255255
</div>
256256
</div>
257257

app/grants/templates/grants/landing/landing_qf_active.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ <h4 class="text-wrap gc-font-base font-weight-normal mb-md-5 mb-4 pt-md-4 pt-1 t
1717
<a class="btn btn-lg btn-primary d-block d-sm-inline" href="{% url 'grants:grants_explorer' %}">{% trans 'View All Grants' %}</a>
1818
<a class="btn btn-lg btn-outline-primary ml-sm-3 d-block d-sm-inline mt-2 mt-sm-0" href="/grants/new">{% trans 'Create a Grant' %}</a>
1919
</div>
20+
<p class="font-subheader mt-4 mb-2">
21+
<a target="_blank" href="https://gitcoin.notion.site/gitcoin/Gitcoin-Grantee-Onboarding-Document-bbfe106a32534fb5a011f09c121257c3">
22+
{% trans "Grantee Onboarding Support" %}
23+
</a>
24+
</p>
25+
<p class="font-subheader mt-0">
26+
<a target="_blank" href="https://gitcoin.notion.site/GR15-Gitcoin-Grant-Eligibility-Briefs-7949392eb2684ea6ae9072cad7fff277">
27+
{% trans "Grant Eligibility Criteria" %}
28+
</a>
29+
</p>
2030
</div>
2131
<div class="col-md order-md-last order-first">
2232
{% if show_main_round_banner %}

0 commit comments

Comments
 (0)