-
Notifications
You must be signed in to change notification settings - Fork 75
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
[cms] Add ProposalBilling request #1137
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. I checked the access controls. Only users with the correct "proposals_owned" value set and admins can query information of a specific proposal.
It shows the invoice details if it has been approved and set as "paid" . Rejected/unreviewed /unpaid invoices cannot be seen. Is that intended ?
d11b581
to
f9b9efd
Compare
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. Just the one formatting nit.
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.
ACK
New api so @marcopeereboom will want to look at it.
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 is just a nit but we use to
and from
functions for other front- and backend conversions. It is less error-prone if it needs to reused elsewhere.
politeiawww/invoices.go
Outdated
if len(inv.LineItems) < 1 { | ||
continue | ||
} | ||
lineItem := cms.ProposalLineItems{ |
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 conversion should be in a function.
return nil, err | ||
} | ||
|
||
dbInvoices := make([]*database.Invoice, 0, len(matching)) |
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 conversion should be in a function.
Requires: #1135
This request allows administrators and proposal "owners" to review all
line items that have been billed to the given proposal.
All other private user information for the invoices is hidden (name, address, etc),
so just the raw information about a line item is given.