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] feat: add proposalsowned and proposalbilling #2046

Merged
merged 7 commits into from
Jul 29, 2020

Conversation

tiagoalvesdulce
Copy link
Member

@tiagoalvesdulce tiagoalvesdulce commented Jul 7, 2020

This PR adds the Proposals Owned tab if the user owns proposals and proposal billing details.

Solution description

Added a new tab and proposals/billing endpoint.

UI Changes Screenshot

Screen Shot 2020-07-08 at 15 08 11

Screen Shot 2020-07-07 at 18 00 53

Dependencies

Depends on decred/politeia#1242 and #2041

Question

What's the best option to get the proposal title? I'm currently showing the proposal token returned by proposalsowned. Should we hit batchProposals on the FE or should the BE return an object of the format: {title, token} for proposalsowned instead of just the token string?

@tiagoalvesdulce tiagoalvesdulce marked this pull request as draft July 7, 2020 21:14
@tiagoalvesdulce tiagoalvesdulce changed the title feat: add proposalsowned and proposalbilling [CMS] feat: add proposalsowned and proposalbilling Jul 7, 2020
@tiagoalvesdulce tiagoalvesdulce marked this pull request as ready for review July 8, 2020 18:09
@alexlyp
Copy link
Member

alexlyp commented Jul 24, 2020

Needs a rebase, then should be good to go

tiagoalvesdulce and others added 6 commits July 29, 2020 14:45
This diff now allows users to select proposals by its name, instead of
its token.

Since getting proposals names require a batching request, and those
requests are bounded by 20 proposals for each request, those requests
have to be done more than once in case the token from the
invoice (details and diff), or
the proposal (new and edit actions) are not on the dropdown list.
Copy link
Member

@thi4go thi4go left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey mate, thanks for this PR, looking really nice. Left some minor comments.

Also, do you think we can add a <- go back link on the proposal billing details page? Like we have on other details page. See:

Novo Projeto

Another thing I noticed is that the line items listed in this page are not getting cached, so it reloads when we leave then go back to it. Pretty minor though, so might be out of scope for this PR.

edit: travis seems to be bitching about some unused imported packages :b

src/containers/User/Detail/Detail.jsx Outdated Show resolved Hide resolved
@tiagoalvesdulce
Copy link
Member Author

tiagoalvesdulce commented Jul 29, 2020

Thanks for the review!

Both your suggestions should be done in separate PRs. This one is for the Proposals Owned tab. I'll create issues for both.

Copy link
Member

@amass01 amass01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

invoice &&
invoice.input &&
invoice.input.lineitems &&
flow(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

None yet

5 participants