-
Couldn't load subscription status.
- Fork 1.8k
fix: Showing Payment Options for Donations
#3255
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
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
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.
LGTM
636e74a
Payment Options for DonationsPayment Options for Donations
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.
Don't refactor the whole file with ES6 in this PR. Just solve the linked issue.
Payment Options for DonationsPayment Options for Donations
|
@mrsaicharan1 @niranjan94 Please take a look here, @computed decorator didn't do any good, So tried different way according to their docs. |
|
@kushthedude I think we could follow ES6 styled computed properties for new resources. |
|
@CosmicCoder96 Please Check now |
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.
return filter(this.get('data.event.tickets').toArray(), ticket => ticket.get('type') === 'paid' || ticket.get('type') === 'donation').length > 0;
}|
@CosmicCoder96 Did the requested change |
|
@niranjan94 @CosmicCoder96 Please Review |
| hasPaidTickets: computed('data.event.tickets.[]', function() { | ||
| return filter(this.get('data.event.tickets').toArray(), ticket => ticket.get('type') === 'paid').length > 0; | ||
| hasPaidTickets: computed('data.event.tickets.@each.type', function() { | ||
| return filter(this.data.event.tickets.toArray(), ticket => ticket.type === 'paid' || ticket.type === 'donation').length > 0; |
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.
Use native filter function.
this.data.event.tickets.toArray().filter(
Closed in favour of #3281 |
Fixes #3254
Short description of what this resolves:
Payment Informationin case forDonation Ticketstoo.Screenshot
Checklist
developmentbranch.