-
-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/collections #7446
Feat/collections #7446
Conversation
Hey @zoek1, I checked out this branch, merged the latest stable into, did a make fresh, then ran
|
done @mds1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @zoek1, left a few comments below.
I also just did a make fresh
but can't seem to load anything afterwards. I ran make migrate
but it said there were no migrations to run. Let me know if this is an error on my end or if there's something we need to fix!
@@ -46,7 +46,7 @@ class CartData { | |||
return bulk_add_cart; | |||
} | |||
|
|||
static addToCart(grantData) { | |||
static addToCart(grantData, no_report) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calls to this function don't pass the second input, so right now the no_report
input is never used. This input should either be removed, or added to all calls to addToCart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, i missed this. i used the no_report on bulk operation addAllToCart
.
action: 'ADD_ITEM', | ||
metadata: JSON.stringify(cartList) | ||
}, {'X-CSRFToken': $("input[name='csrfmiddlewaretoken']").val()}); | ||
if (!no_report) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the above comment, no_report
is never used so this will always be undefined right now. Is this the expected behavior? If so some comments explaining this would be useful
app/assets/v2/js/grants/index.js
Outdated
}); | ||
|
||
showSideCart(); | ||
_alert(`Congratulations, ${getGrants.grants.length} ${getGrants.grants.length > 1 ? 'grant were' : 'grants was'} added to your cart!`, 'success'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: Should say "grants were" if > 1, and "grants was" if 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
looks relaly good! just pulled this down to test. my feedback for v1.
v2:
|
@owocki i implemented the v1 and v2 requests, could you mind test it again? |
I'm not sure what cause this error, as I remember i didn't touch any part of such code 🤔 Also, i added the corresponding migrations |
my qa this am: showstoppers
minor issues
enhancements
open questions |
@owocki i addressed showstoppers && minor issues |
left some comments on zoek via DMs:
|
|
app/grants/admin.py
Outdated
@@ -28,7 +28,7 @@ | |||
import twitter | |||
from grants.models import ( | |||
CartActivity, CLRMatch, Contribution, Flag, Grant, GrantCategory, GrantCLR, GrantType, MatchPledge, PhantomFunding, | |||
Subscription, | |||
Subscription, GrantCollections, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ GrantCollection
Let's keep it singular
app/grants/admin.py
Outdated
class GrantCLRAdmin(admin.ModelAdmin): | ||
list_display = ['pk', 'round_num', 'start_date', 'end_date','is_active'] | ||
|
||
|
||
class GrantCollectionsAdmin(admin.ModelAdmin): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ GrantCollection
app/grants/admin.py
Outdated
@@ -371,3 +375,5 @@ class GrantCLRAdmin(admin.ModelAdmin): | |||
admin.site.register(GrantType, GrantTypeAdmin) | |||
admin.site.register(GrantCategory, GrantCategoryAdmin) | |||
admin.site.register(GrantCLR, GrantCLRAdmin) | |||
admin.site.register(GrantCollections, GrantCollectionsAdmin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GrantCollection
app/grants/models.py
Outdated
) | ||
|
||
|
||
class GrantCollections(SuperModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GrantCollection
Description
https://www.loom.com/share/b4be8978eed04874a9aa0757d471b83c
Refers/Fixes
#7130
Testing