Add basic donation records #18

Merged
raucao merged 6 commits from feature/donation_records into master 2020-12-21 14:46:51 +00:00
Owner

This changeset adds the basic building blocks for account donation/payment tracking.

Admins can manually add and edit donation records for now. And Users can see their own donations on the (as-of-yet unlinked) /donations page.

This changeset adds the basic building blocks for account donation/payment tracking. Admins can manually add and edit donation records for now. And Users can see their own donations on the (as-of-yet unlinked) `/donations` page.
raucao requested review from bumi 2020-12-19 14:03:19 +00:00
raucao requested review from galfert 2020-12-19 14:03:19 +00:00
raucao requested review from greg 2020-12-19 14:03:21 +00:00
raucao added the
kredits-2
label 2020-12-19 14:03:29 +00:00
bumi approved these changes 2020-12-21 09:07:38 +00:00
bumi left a comment
Owner

looks good to me.

not sure if we need all the scaffold API/jbuilder stuff for the Admin panel?

looks good to me. not sure if we need all the scaffold API/jbuilder stuff for the Admin panel?
@ -0,0 +4,4 @@
# GET /donations
# GET /donations.json
def index
@donations = current_user.donations.completed
Owner

hmmm. we could show uncompleted for user to finish them. 🤔
but I guess showing only the completed ones keeps the page clean and shows the relevant information. - they can just start a new donation procss instead of finishing a not-completed one.

hmmm. we could show uncompleted for user to finish them. 🤔 but I guess showing only the completed ones keeps the page clean and shows the relevant information. - they can just start a new donation procss instead of finishing a not-completed one.
Author
Owner

This is only a PR for the basic/manual donation records. Any payment-related questions have to be solved when integrating tracking for live donations.

This is only a PR for the basic/manual donation records. Any payment-related questions have to be solved when integrating tracking for live donations.
raucao marked this conversation as resolved
@ -3,6 +3,7 @@ class User < ApplicationRecord
# Relations
has_many :invitations, dependent: :destroy
has_many :donations
Owner

maybe add a dependent: :nullify?

maybe add a `dependent: :nullify`?
Author
Owner

Good hint!

Good hint!
raucao marked this conversation as resolved
@ -0,0 +12,4 @@
<% @donations.each do |donation| %>
<li>
<h3>
<%= donation.paid_at.strftime("%B %d, %Y") %>
Owner

isn't that something like l donation.paid_at, format: :short ?

isn't that something like `l donation.paid_at, format: :short` ?
Author
Owner

I haven't done any localization or i18n anywhere in the app, but we should do that soon! We have a nice bonus of being able to deploy in multiple languages from the start.

I haven't done any localization or i18n anywhere in the app, but we should do that soon! We have a nice bonus of being able to deploy in multiple languages from the start.
raucao marked this conversation as resolved
Owner

Do we want to directly connect the akkounts app with the lightning node (to get new payment requests) or do you want to to have the BTCPay Server's invoice managment?

Do we want to directly connect the akkounts app with the lightning node (to get new payment requests) or do you want to to have the BTCPay Server's invoice managment?
Owner

In the screenshot, the fiat amount has a "$" prefix and a "EUR" suffix.

In the screenshot, the fiat amount has a "$" prefix and a "EUR" suffix.
Author
Owner

In the screenshot, the fiat amount has a “$” prefix and a “EUR” suffix.

The screenshot is outdated.

> In the screenshot, the fiat amount has a “$” prefix and a “EUR” suffix. The screenshot is outdated.
Author
Owner

Do we want to directly connect the akkounts app with the lightning node (to get new payment requests) or do you want to to have the BTCPay Server’s invoice managment?

Good question. But not one for this PR. (I think using BTCPay for everything is easier, unless we want to track on-chain transactions with custom code.)

> Do we want to directly connect the akkounts app with the lightning node (to get new payment requests) or do you want to to have the BTCPay Server’s invoice managment? Good question. But not one for this PR. (I think using BTCPay for everything is easier, unless we want to track on-chain transactions with custom code.)
Author
Owner

Thanks for the reviews!

Thanks for the reviews!
raucao merged commit bcf5172956 into master 2020-12-21 14:46:51 +00:00
raucao deleted branch feature/donation_records 2020-12-21 14:46:57 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kosmos/akkounts#18
No description provided.