-
-
Notifications
You must be signed in to change notification settings - Fork 775
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: coupon code for bounty creation fee #4237
Conversation
- added Coupon model - admin can create coupon with expiry date and share bounty creation URL - bounty creation will load updated fee if coupon hasn't expired - bounty metadata is updated to keep track if bounty used a coupon - updated web3 not defined error message - refactored css Fixes: gitcoinco#4497
Codecov Report
@@ Coverage Diff @@
## master #4237 +/- ##
==========================================
+ Coverage 30.12% 30.19% +0.06%
==========================================
Files 210 209 -1
Lines 16911 16917 +6
Branches 2284 2282 -2
==========================================
+ Hits 5095 5108 +13
+ Misses 11619 11612 -7
Partials 197 197
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #4237 +/- ##
=========================================
- Coverage 30.11% 30.1% -0.02%
=========================================
Files 210 210
Lines 16919 16950 +31
Branches 2286 2290 +4
=========================================
+ Hits 5095 5102 +7
- Misses 11626 11650 +24
Partials 198 198
Continue to review full report at Codecov.
|
qq - for expired coupons, the functionality looks solid (becaue the coupon is expired they have to pay full price), but it doesn’t actually let the user know “hey the coupon is expired” (like a red text box) do you think this is necessary? like a “if now() > coupon expiration date, and they’re using the link, so a box that says the coupon is expired” |
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.
amazing
|
||
class Coupon(SuperModel): | ||
code = models.CharField(unique=True, max_length=10) | ||
fee_percentage = models.IntegerField(validators=[MinValueValidator(0), MaxValueValidator(100)]) |
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.
nice!
Description
creation URL
How it would work
http://gitcoin.co/funding/new?coupon=FREE-50
in the bounty on admin AS SHOWN HERE
DEMO: https://embed.vidyard.com/share/rzwbLjVvVHbeVuzCbdVUuD?
Fixes: #4497