-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add task to export all prizes #214
Conversation
|> Map.fetch!(:redeemables) | ||
|> Enum.map(fn redeemable -> | ||
b = get_keys_buy(attendee.id, redeemable.id) | ||
Map.put(redeemable, :quantity, b.quantity) | ||
Map.put(%{name: redeemable.name}, :quantity, b.quantity) |
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.
This function get_attendee_redeemables/1
, is used in AttendeeController, and its result is passed as an argument to the AttendeeControllerView, and then to RedeemableControllerView. So I don't think you should mess with its functionality. My suggestion would be to create a function for the desired purpose, or a mini function that uses this one and adds the step of changing the Map.
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.
I'll simply undo this changes. The task should work anyway
Since this task exports both the items bought and the prizes from the roulette, maybe it should reflect that in the name of the task. Since "buys" is already the name of a table, calling it only "export_buys" makes it look like it's only the content of that table that is exported. |
oops |
I'll try to finish this sometime soon
…On Thu, Oct 14, 2021, 10:20 Miguel Brandão ***@***.***> wrote:
Reopened #214 <#214>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#214 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGNZAGYKGBRUM2N4PPQGT23UG2OFBANCNFSM4YLZJ4HQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
This PR adds some functionalities to the existing export redeemable prizes task, including the list of prizes won in the Roulette.
Also adds the possibility to generate a csv file.