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

Team income table doesn't say when payday is #2119

Closed
Changaco opened this issue Jan 26, 2022 · 9 comments
Closed

Team income table doesn't say when payday is #2119

Changaco opened this issue Jan 26, 2022 · 9 comments
Labels
good first issue suitable for new contributors UI issues concerning the User Interface

Comments

@Changaco
Copy link
Member

From https://nerdculture.de/@ij/107688101193614453:

would it be possible to have the dates of Last/Next Paydays being listed on /$user/receiving or mention the dates somewhere als on the page?

Screenshot of the headers of a team income table

@Changaco Changaco added the UI issues concerning the User Interface label Jan 26, 2022
@Changaco Changaco added this to the Team management milestone Jan 26, 2022
@Changaco Changaco added the good first issue suitable for new contributors label Jan 28, 2022
@biskwikman
Copy link
Contributor

I'll start working on this.

@biskwikman
Copy link
Contributor

@Changaco I'm looking at team-members.html, which I think is where this table is produced. Could you tell me what templating language this is using (is it Pando?) and where I can find the data for when the paydays occur?

@Changaco
Copy link
Member Author

Changaco commented Jun 2, 2022

@biskwikman The templates are Jinja. (This is mentioned in the README along with other things that new developers need to know.)

Payday is supposed to be Wednesday and almost always is. The exact start times of past paydays are in the paydays database table.

@biskwikman
Copy link
Contributor

@Changaco so I think what needs to be done is to add either the most recent ts_start or ts_end time from the paydays database table into the table header which already has Last Payday, and then add the date of the upcoming Wednesday into the table header which already has Next Payday in team-members.html

If this is correct, how would I go about making a database query to paydays? From what I can tell, it needs to be done in www/%username/recieving/index.html.spt Is that correct?

@Changaco
Copy link
Member Author

Changaco commented Jun 6, 2022

It's possible to query the database directly from the team-members.html file, but it's probably better to copy the code of the compute_next_payday_date function from liberapay/billing/payday.py, put it in a new method of the Website class in liberapay/website.py, adapt it to return the date of the previous payday alongside the date of the next payday (using a single database query), and call that new method from team-members.html.

@biskwikman
Copy link
Contributor

I just made a PR in #2157

@biskwikman
Copy link
Contributor

@Changaco Is it alright with you if I close this issue?

@Changaco
Copy link
Member Author

@biskwikman This issue should have been closed when #2157 was merged. This would have happened automatically if you had included “Closes #2119” in the description of #2157.

@biskwikman
Copy link
Contributor

@Changaco I see. I wasn't aware of that feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue suitable for new contributors UI issues concerning the User Interface
Development

No branches or pull requests

2 participants