Skip to content
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

Merged
merged 3 commits into from
Apr 17, 2020
Merged

Conversation

alexlyp
Copy link
Member

@alexlyp alexlyp commented Feb 20, 2020

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.

Copy link
Member

@degeri degeri left a 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 ?

@alexlyp alexlyp force-pushed the ayp_proposal_info branch from d11b581 to f9b9efd Compare March 3, 2020 22:20
Copy link
Member

@lukebp lukebp left a 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.

Copy link
Member

@lukebp lukebp left a 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.

@alexlyp alexlyp requested a review from marcopeereboom March 24, 2020 17:40
Copy link
Member

@marcopeereboom marcopeereboom left a 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.

if len(inv.LineItems) < 1 {
continue
}
lineItem := cms.ProposalLineItems{
Copy link
Member

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))
Copy link
Member

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.

@alexlyp alexlyp requested a review from marcopeereboom April 13, 2020 14:59
@alexlyp alexlyp merged commit acd6c00 into decred:master Apr 17, 2020
@alexlyp alexlyp deleted the ayp_proposal_info branch April 17, 2020 14:27
vibros68 pushed a commit to vibros68/politeia that referenced this pull request Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants