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: create batched calls for invoices #1036

Open
fernandoabolafio opened this issue Oct 29, 2019 · 5 comments · May be fixed by #1176
Open

cms: create batched calls for invoices #1036

fernandoabolafio opened this issue Oct 29, 2019 · 5 comments · May be fixed by #1176
Assignees
Labels

Comments

@fernandoabolafio
Copy link
Member

fernandoabolafio commented Oct 29, 2019

The batched endpoints allowed a much simpler way of fetching proposals as needed in the politeiagui side.
Since we also always display invoices grouped by their status, having a single endpoint creates an inconsistent pagination mechanism and requires different handling in the client.
Having batched calls for invoices will increase the code consistency in the frontend side, speed up the loading and provide a better lazy load solution. That said, two accomplish that in the CMS side we need two add the following calls:

  • request token inventory for user invoices
    • POST call
    • params:
      • timestampMax
      • timestampMin
  • request token inventory for admin invoices
    • POST call
    • params:
      • timestampMax
      • timestampMin
  • request batch of invoices
    • POST call
    • params:
      • an array of invoice tokens

The current invoice statuses we have are:

  • unreviewed
  • updated
  • disputed
  • approved
  • paid
  • rejected

The main difference from what we currently do for proposals is the addition of the params timestampMax and timestampMin when asking for the token inventory. The CMS requires the invoices to be filtered by month so to accomplish the desired output here we need to know beforehand what invoices to fetch based on the time filter.

@thi4go
Copy link
Member

thi4go commented Mar 19, 2020

Would like to work on this.

@alexlyp
Copy link
Member

alexlyp commented Mar 19, 2020

ok cool, feel free to ask for any help that you may need.

@victorgcramos
Copy link
Member

@alexlyp what about the same for DCCs?

@alexlyp
Copy link
Member

alexlyp commented Apr 23, 2020

Yup makes sense to add those as well. Though different PR obvi

@victorgcramos
Copy link
Member

victorgcramos commented Apr 23, 2020

Sure! of course! After I finish other stuff on GUI, I'd like to jump on this.

@thi4go thi4go linked a pull request Apr 28, 2020 that will close this issue
@lukebp lukebp added the cms label Apr 29, 2021
vibros68 pushed a commit to vibros68/politeia that referenced this issue Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants