Skip to content
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

fix: Discount Codes: Simplify Form #5758

Merged
merged 11 commits into from
Nov 27, 2020
Merged

fix: Discount Codes: Simplify Form #5758

merged 11 commits into from
Nov 27, 2020

Conversation

divyamtayal
Copy link
Member

@divyamtayal divyamtayal commented Nov 25, 2020

Fixes #5750

Changes proposed in this pull request:

Simplify the discount of events as follows:

  • Pre-fill "Number of discounted tickets" with "10"
  • Change "Valid from" to "Discount valid from"
  • Change "Expires on" to "Discount expires on"
  • Show time in the same line with dates
  • Show timezone of the event in the same way as in the wizard
  • Take out "Show more options" switch and always show below option
  • Take out "Status" and always make the status active

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Nov 25, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/cc3t014w9
✅ Preview: https://open-event-frontend-git-discount-code-5750.eventyay.vercel.app

@divyamtayal divyamtayal changed the title Start Discount Codes: Simplify Form Nov 25, 2020
@codecov
Copy link

codecov bot commented Nov 25, 2020

Codecov Report

Merging #5758 (a2c887e) into development (6924ac0) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5758      +/-   ##
===============================================
- Coverage        23.45%   23.40%   -0.05%     
===============================================
  Files              512      513       +1     
  Lines             5445     5482      +37     
  Branches            63       62       -1     
===============================================
+ Hits              1277     1283       +6     
- Misses            4152     4183      +31     
  Partials            16       16              
Impacted Files Coverage Δ
app/models/discount-code.js 0.00% <0.00%> (ø)
app/utils/computed-helpers.js 19.56% <0.00%> (-4.58%) ⬇️
app/models/custom-form.js 28.57% <0.00%> (-2.20%) ⬇️
app/models/event.js 50.00% <0.00%> (ø)
app/routes/index.js 78.57% <0.00%> (ø)
app/models/session.js 10.00% <0.00%> (ø)
app/models/speaker.js 0.00% <0.00%> (ø)
app/models/social-link.js 0.00% <0.00%> (ø)
app/components/widgets/forms/link-input.js 33.33% <0.00%> (ø)
app/routes/application.js 83.78% <0.00%> (+0.45%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6924ac0...d082e43. Read the comment docs.

This reverts commit ae55d52.
.env.example Outdated Show resolved Hide resolved
This reverts commit 0652049.
@divyamtayal
Copy link
Member Author

@iamareebjamal I am not able to see the event timezone on the discount page?

@divyamtayal
Copy link
Member Author

Screen Shot 2020-11-26 at 00 03 54

Copy link
Member

@NaviRocker NaviRocker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please Squash your commits.

mariobehling
mariobehling previously approved these changes Nov 25, 2020
Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the UI. It looks good for me. Was not able to test entire functionality yet. Please help with testing that as well.

@divyamtayal
Copy link
Member Author

Show timezone of the event in the same way as in the wizard

@mariobehling where to make changes for this?

@divyamtayal
Copy link
Member Author

Done #5759

@divyamtayal
Copy link
Member Author

@iamareebjamal Pls let me know to make any changes

@iamareebjamal iamareebjamal changed the title Discount Codes: Simplify Form fix: Discount Codes: Simplify Form Nov 27, 2020
@auto-label auto-label bot added the fix label Nov 27, 2020
@@ -33,6 +32,9 @@ export default ModelBase.extend({
isExpired : computed('validTill', function() {
return new Date() > new Date(this.validTill);
}),
maxQuantity: computed('ticketsNumber', function() {
return this.ticketsNumber;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this, because if the ticketsNumber is changed, this won't change. Please make it a large number for now, like 100000, and open an issue on server to handle the maxQuantity being negative, i.e. -1

If it is negative, server should not limit the discount code count

@iamareebjamal iamareebjamal merged commit d6fc799 into fossasia:development Nov 27, 2020
@divyamtayal divyamtayal deleted the discount-code-5750 branch November 27, 2020 20:40
@divyamtayal divyamtayal restored the discount-code-5750 branch November 27, 2020 20:40
@divyamtayal divyamtayal deleted the discount-code-5750 branch November 27, 2020 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discount Codes: Simplify Form
4 participants