-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: add event date to response of order for admin sales revenues (formerly fees) #6135
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
Conversation
Codecov Report
@@ Coverage Diff @@
## development #6135 +/- ##
===============================================
+ Coverage 66.38% 66.38% +<.01%
===============================================
Files 286 286
Lines 14366 14369 +3
===============================================
+ Hits 9537 9539 +2
- Misses 4829 4830 +1
Continue to review full report at Codecov.
|
…ormerly fees) Reference: fossasia/open-event-frontend#3173
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.
Looks good.
app/api/admin_sales/fees.py
Outdated
| [o.get_revenue() for o in obj.orders if o.status == 'completed']) | ||
|
|
||
| @staticmethod | ||
| def get_eventdate(obj): |
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.
| def get_eventdate(obj): | |
| def get_event_date(obj): |
app/api/admin_sales/fees.py
Outdated
| maximum_fee = fields.Float(attribute='maximum_fee') | ||
| revenue = fields.Method('calc_revenue') | ||
| ticket_count = fields.Method('calc_ticket_count') | ||
| event_date = fields.Method('get_eventdate') |
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.
| event_date = fields.Method('get_eventdate') | |
| event_date = fields.Method('get_event_date') |
|
@iamareebjamal @mrsaicharan1 This PR is ready for another review. |
Reference: fossasia/open-event-frontend#3173
Short description of what this resolves:
Currently admin sales fees api response doesn't contains event start date.
Changes proposed in this pull request:
Checklist
developmentbranch.