Skip to content

[SSF 162] - Admin Donation Stats#134

Open
dburkhart07 wants to merge 8 commits intomainfrom
ddb/SSF-162-admin-stats-frontend
Open

[SSF 162] - Admin Donation Stats#134
dburkhart07 wants to merge 8 commits intomainfrom
ddb/SSF-162-admin-stats-frontend

Conversation

@dburkhart07
Copy link

@dburkhart07 dburkhart07 commented Mar 21, 2026

ℹ️ Issue

Closes #162

📝 Description

Made necessary backend adjustments to support frontend design:

  • All pantry stats aggregation only works with approved pantries. Pending ones in theory should have no donation data related to them, but they should not be showing up in the stats anywhere
  • Getting the names, and years of orders created for all the approved pantries. This is necessary for the filters, and we needed separate API calls for them since the pantryStats we are getting is constantly changing based on the filters, so we can't rely on that is our source of truth
  • Adding tests for both of these

Frontend:

  • Created design according to the Figma

✔️ Verification

  • Ensured all tests passed, and endpoints still worked
  • Verified design matched Figma
  • Ensured query parameters were accurately being utilized for filter changes for efficient querying
image

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

@dburkhart07 dburkhart07 marked this pull request as ready for review March 22, 2026 22:25
@dburkhart07 dburkhart07 changed the title Fully functional page and backend adjustments [SSF 162] - Admin Donation Stats Mar 22, 2026
years?: number[],
page = 1,
): Promise<PantryStats[]> {
const PAGE_SIZE = 10;
Copy link
Member

Choose a reason for hiding this comment

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

i know the ticket says do 10 pantries per page, but thoughts on changing PAGE_SIZE here to 9 and then also on the page to have it match the figma

Copy link
Author

@dburkhart07 dburkhart07 Mar 24, 2026

Choose a reason for hiding this comment

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

total stats is only supposed to be on the first page i just found out, so it will be 9 on the first, 10 on the second.

Copy link
Member

Choose a reason for hiding this comment

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

i thought the ticket said to keep total stats on every page

Copy link
Author

Choose a reason for hiding this comment

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

spoke with priya and it should just be on the first.

@dburkhart07 dburkhart07 requested a review from amywng March 25, 2026 00:23
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.

2 participants