Skip to content

[SSF 162] - Admin Donation Stats#134

Merged
dburkhart07 merged 21 commits intomainfrom
ddb/SSF-162-admin-stats-frontend
Apr 18, 2026
Merged

[SSF 162] - Admin Donation Stats#134
dburkhart07 merged 21 commits intomainfrom
ddb/SSF-162-admin-stats-frontend

Conversation

@dburkhart07
Copy link
Copy Markdown

@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
Comment thread apps/frontend/src/containers/homepage.tsx Outdated
Comment thread apps/backend/src/pantries/pantries.service.ts
Comment thread apps/frontend/src/containers/adminDonationStats.tsx
Comment thread apps/frontend/src/containers/homepage.tsx Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx
@dburkhart07 dburkhart07 requested a review from amywng March 25, 2026 00:23
Copy link
Copy Markdown
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

small things

Comment thread apps/backend/src/pantries/pantries.service.spec.ts Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/backend/src/pantries/pantries.service.ts Outdated
Comment thread apps/backend/src/pantries/pantries.service.ts Outdated
Comment thread apps/backend/src/pantries/pantries.service.ts
Comment thread apps/backend/src/pantries/pantries.service.ts Outdated
Comment thread apps/backend/src/pantries/pantries.controller.ts Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
fontWeight="500"
gap={2}
>
{pantryNameOptions
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What are we doing about the case where two pantries have the same name?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is a good question. We really have no way to differentiate between the 2 aside from the pantry id. This makes me wonder if the best solution is rather filtering by pantryIds instead of pantryNames, yet still displaying the names in the filter. Thoughts?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I realized this is an issue with many of our filters, so I think we can hold off on a solution for now until we fix all of them

@dburkhart07 dburkhart07 requested a review from amywng March 31, 2026 20:30
@dburkhart07 dburkhart07 requested a review from sam-schu March 31, 2026 23:59
Comment thread apps/frontend/src/containers/adminDonationStats.tsx
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/backend/src/pantries/pantries.controller.ts
@dburkhart07 dburkhart07 requested a review from amywng April 1, 2026 03:45
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/frontend/src/containers/adminOrderManagement.tsx
@dburkhart07 dburkhart07 requested a review from amywng April 2, 2026 00:46
Copy link
Copy Markdown
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

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

sorry for the delay! lmk if you'd like me to deal with merge conflicts

Comment thread apps/backend/src/pantries/pantries.service.ts Outdated
Comment thread apps/backend/src/pantries/pantries.service.ts
Comment thread apps/backend/src/pantries/pantries.service.ts
Comment thread apps/backend/src/pantries/pantries.service.ts Outdated
Comment thread apps/backend/src/pantries/pantries.service.ts Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
fontWeight="500"
gap={2}
>
{pantryNameOptions
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I realized this is an issue with many of our filters, so I think we can hold off on a solution for now until we fix all of them

@dburkhart07
Copy link
Copy Markdown
Author

spoke with priya, and we decided to remove All Available Data, and just have all the years available, unselected at first, and showing all years for donations. Once years get selected, then filtering occurs.

@dburkhart07 dburkhart07 requested a review from sam-schu April 12, 2026 19:41
Comment thread .claude/settings.local.json Outdated
Comment thread apps/frontend/src/api/apiClient.ts
Comment thread apps/backend/src/pantries/pantries.service.ts Outdated
Comment thread apps/frontend/src/containers/adminDonationStats.tsx Outdated
@dburkhart07 dburkhart07 requested a review from sam-schu April 13, 2026 06:46
Copy link
Copy Markdown
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

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

Please add the "% of Food Rescue" column from the last frame of the Figma!

Comment thread apps/backend/src/pantries/pantries.service.spec.ts
Comment thread apps/frontend/src/api/apiClient.ts
Comment thread apps/backend/src/pantries/pantries.service.spec.ts
Comment thread apps/frontend/src/containers/adminDonationStats.tsx
Comment thread apps/backend/src/pantries/pantries.controller.ts Outdated
@dburkhart07 dburkhart07 merged commit a50285a into main Apr 18, 2026
5 of 6 checks passed
@dburkhart07 dburkhart07 deleted the ddb/SSF-162-admin-stats-frontend branch April 18, 2026 09:00
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.

3 participants