Skip to content

[SSF-62] Assigned Pantries Frontend#75

Merged
maxn990 merged 16 commits intomainfrom
BH/SSF-62-Assigned-Pantries-Frontend
Mar 9, 2026
Merged

[SSF-62] Assigned Pantries Frontend#75
maxn990 merged 16 commits intomainfrom
BH/SSF-62-Assigned-Pantries-Frontend

Conversation

@bhuvanh66
Copy link

ℹ️ Issue

Closes 62

📝 Description

Added page to view all the pantries they were assigned to, as well as their information from the pantry application.

Path /volunteer-assigned-pantries

Screenshot 2025-12-02 at 9 47 33 PM

Also tested adding filtering by being Refrigerator Friendly or not.

Screenshot 2025-12-02 at 9 48 07 PM

@bhuvanh66 bhuvanh66 changed the title initial frontend assigned pantries implementation [SSF-62] Assigned Pantries Frontend Dec 3, 2025
@amywng amywng force-pushed the BH/SSF-62-Assigned-Pantries-Frontend branch from d21970f to 8fd4520 Compare December 4, 2025 02:33
@sam-schu
Copy link
Collaborator

sam-schu commented Dec 5, 2025

At first glance I'm seeing a decent number of things that don't fully match the design. Could you please take another look at the design and try to match things like spacing, alignment, colors, etc. as closely as possible?

@sam-schu sam-schu self-requested a review February 27, 2026 15:11
@maxn990 maxn990 requested a review from amywng March 1, 2026 10:53
@maxn990 maxn990 self-assigned this Mar 2, 2026
@maxn990 maxn990 added blocked and removed blocked labels Mar 2, 2026
Copy link
Member

@maxn990 maxn990 left a comment

Choose a reason for hiding this comment

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

couldn't find a great way given chakra constraints to match the right edges of the refrigeration status badges, if anyone has any ideas lmk!

also is this still blocked?

@maxn990 maxn990 removed the blocked label Mar 3, 2026
Copy link
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.

for your comment, do you mean the right align of the refrigerated badges? because i think you can just do text-align="right" for the column title and rows.

a couple other things:

  • can we ask priya about what it should look like if the volunteer has no assigned pantries and add that?
  • can we add a full isLoading state with a spinner? i feel like the individual "Loading..." everywhere doesn't make sense
  • right now, you could potentially make a ton of api calls depending on how many pantries a volunteer has assigned to them. @sam-schu @Yurika-Kan i would suggest just returning all the pantry info in the getAllVolunteers call since we don't use the call anywhere else and i feel like this method is less efficient

@maxn990 maxn990 requested a review from amywng March 3, 2026 20:26
Copy link
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.

Based on the ticket, this page should display a particular volunteer's assigned pantries, rather than all the pantries assigned to all volunteers. We have an endpoint that was previously created for this purpose, GET /api/volunteers/:id/pantries; this endpoint returns the full pantry details for each assigned pantry so we only need to make this single API call, resolving @amywng's suggestion. To determine which volunteer ID to use in the API call based on which volunteer is currently signed in, we may want to add a /my-id endpoint to the users controller to get the ID of the currently authenticated user (similar to the /my-id endpoint in the pantries controller but even simpler, as that one needs to translate from user ID to pantry ID, whereas a volunteer ID is just the volunteer user's user ID).

@maxn990 maxn990 requested a review from sam-schu March 6, 2026 15:41
Copy link
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.

while you're at it can you rename user.entity.ts to users.entity.ts

export class UsersController {
constructor(private usersService: UsersService) {}

@Get('/my-id')
Copy link
Member

Choose a reason for hiding this comment

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

i think we should set auth in some way here. @sam-schu should it be public and then we check if req.user.id is null or not and then throw an exception if it is? or should it be restricted to volunteers? or something else

Copy link
Member

Choose a reason for hiding this comment

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

I'll do Volunteers for now to match pantries

Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't mark it as public because the user does have to be signed in, but we don't need to limit it to any specific role

@maxn990 maxn990 requested a review from amywng March 6, 2026 17:54
@maxn990 maxn990 requested a review from amywng March 6, 2026 23:19
Copy link
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 nits but approving! 🙏 ty max

Copy link
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.

approving with one last comment here! thanks max!

@maxn990 maxn990 merged commit 934f9b6 into main Mar 9, 2026
4 checks passed
@maxn990 maxn990 deleted the BH/SSF-62-Assigned-Pantries-Frontend branch March 9, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants