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 proposal spending summary and details #2032

Merged
merged 9 commits into from
Jul 28, 2020

Conversation

tiagoalvesdulce
Copy link
Member

@tiagoalvesdulce tiagoalvesdulce commented Jun 24, 2020

This PR closes #2019

Solution description

I added two new routes: /admin/proposalsbilling and /admin/proposalsbilling/:token that consume data from spendingsummary and spendingdetails endpoints. Created a new normalized redux state branch called proposalBilling to be the single source of truth for this data. This PR is a WIP and will be imrpoved before merged.

Dependencies

Depends on decred/politeia#1224

UI Changes Screenshot

Summary

Screen Shot 2020-07-01 at 18 09 58

Details

Screen Shot 2020-07-01 at 18 10 18

@tiagoalvesdulce tiagoalvesdulce marked this pull request as draft June 24, 2020 20:10
@tiagoalvesdulce tiagoalvesdulce changed the title [WIP][CMS] feat: add proposal spending summary and details [CMS] feat: add proposal spending summary and details Jul 1, 2020
@tiagoalvesdulce tiagoalvesdulce marked this pull request as ready for review July 1, 2020 21:15
Copy link
Member

@alexlyp alexlyp left a comment

Choose a reason for hiding this comment

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

tACK, looks great for a first pass!

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.

Code looks good mate, nice work, added 2 inline comments

};

const getDetailsData = (invoices) => {
const formattedData =
Copy link
Member

Choose a reason for hiding this comment

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

This function can be a one liner :)

proposalDetails: null
};

// const normalizeProposalBilling = (proposals) =>
Copy link
Member

Choose a reason for hiding this comment

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

comments

// }, {});

const proposalBilling = (state = DEFAULT_STATE, action) => {
return action.error
Copy link
Member

Choose a reason for hiding this comment

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

Also here no need for the return I guess

@alexlyp
Copy link
Member

alexlyp commented Jul 24, 2020

Needs a rebase, but decred/politeia#1224 has been merged to final testing/review may occur.

Copy link
Member

@alexlyp alexlyp left a comment

Choose a reason for hiding this comment

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

tACK, working great. Looks awesome

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

@amass01 amass01 merged commit fa93638 into decred:master Jul 28, 2020
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.

[cms] Admin page for proposal billing summary
3 participants