Add basic donation records #18
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/donation_records"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.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
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.
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.
@ -3,6 +3,7 @@ class User < ApplicationRecord
# Relations
has_many :invitations, dependent: :destroy
has_many :donations
maybe add a
dependent: :nullify
?Good hint!
@ -0,0 +12,4 @@
<% @donations.each do |donation| %>
<li>
<h3>
<%= donation.paid_at.strftime("%B %d, %Y") %>
isn't that something like
l donation.paid_at, format: :short
?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.
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?
In the screenshot, the fiat amount has a "$" prefix and a "EUR" suffix.
The screenshot is outdated.
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.)
Thanks for the reviews!