Skip to content

SSF-207 Deep-linking for view orders and view assigned pantries#176

Open
Juwang110 wants to merge 5 commits into
mainfrom
jw/ssf-207-view-orders-and-pantries-functionality
Open

SSF-207 Deep-linking for view orders and view assigned pantries#176
Juwang110 wants to merge 5 commits into
mainfrom
jw/ssf-207-view-orders-and-pantries-functionality

Conversation

@Juwang110
Copy link
Copy Markdown

ℹ️ Issue

Closes https://vidushimisra.atlassian.net/browse/SSF-207

📝 Description

Various changes:

  • Implemented View Orders deeplinking used in Admin Pantry Management and Volunteer View Assigned Pantries to open up Admin Order Management and Volunteer Order Management respectively with seeded filter to clicked pantry
  • Implemented View Assigned Pantries deeplinking used in Admin Volunteer Management to open the Pantry Management Page pre-filtered to the clicked volunteer’s pantry/pantries
  • Minor auth gate changes and design ones following ticket

✔️ Verification

Verified deeplink functionality and design matched figma

🏕️ (Optional) Future Work / Notes

N/A

@Yurika-Kan Yurika-Kan self-requested a review May 20, 2026 02:50
Copy link
Copy Markdown

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

looks really great, everything seems to work. just some discussion points worth having i think

Comment thread apps/frontend/src/containers/adminPantryManagement.tsx
</Badge>
</Table.Cell>
<Table.Cell textAlign="right">
<Link
Copy link
Copy Markdown

@dburkhart07 dburkhart07 May 20, 2026

Choose a reason for hiding this comment

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

I wonder if we should disable this entirely if there are no orders for the pantry, as opposed to displaying it and navigating these but doing nothing (same would apply for the volunteer assigned pantries page too). thoughts?

Copy link
Copy Markdown
Author

@Juwang110 Juwang110 May 28, 2026

Choose a reason for hiding this comment

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

This does make sense and it would be nice to have but there would have to be a decent amount of additional backend logic or calls to get the orders for each of the pantries. I don't see an easy way to implement that without a good amount of changing/more overhead. An easy fix that I think would make sense would be if there are no orders for a pantry, when the view orders button is clicked it goes to the order management page and there's an alert that says no orders for this pantry or something along those lines (it will show orders with no filters). What do you think about that? I guess I could also alternatively get all orders with one api call and see for each pantry if there is an order with order.request.pantryId similar to the current logic in adminOrderManagement

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

hmm i think the navigating and showing an error may not be bad. let's go with that

Comment thread apps/frontend/src/containers/adminOrderManagement.tsx Outdated
Copy link
Copy Markdown
Collaborator

@Yurika-Kan Yurika-Kan left a comment

Choose a reason for hiding this comment

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

looking dapper! main change requested is on reload/persisting functionality that dalton brought up~

Comment thread apps/frontend/src/containers/adminPantryManagement.tsx
@dburkhart07 dburkhart07 self-assigned this May 27, 2026
Copy link
Copy Markdown

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

the adminOrderManagement pantry filter is still not working for me. Can you check that out?

const pantryIdFromUrl = searchParams.get('pantryId');

const allOrders = Object.values(statusOrders).flat();
if (!pantryIdFromUrl || allOrders.length === 0) return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Even if we have no orders at all, we should still automatically fill in the filters with the pantry i think. While this is easier, if we don't have orders, we should just fetch the pantry and use its name to prefill the filter. This logic should apply for the volunteerOrderManagement too.

);
const pantryName = matchedOrder?.request.pantry.pantryName;

if (pantryName) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In the instance where we get no match from the query parameter, can we just throw an error, rather than silently failing? Same with volunteerOrderManagement

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