Skip to content

SSF-205 FM Dashboard Frontend#173

Open
Juwang110 wants to merge 7 commits into
mainfrom
jw/ssf-205-fm-dashboard-frontend
Open

SSF-205 FM Dashboard Frontend#173
Juwang110 wants to merge 7 commits into
mainfrom
jw/ssf-205-fm-dashboard-frontend

Conversation

@Juwang110
Copy link
Copy Markdown

ℹ️ Issue

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

📝 Description

I simply implemented the food manufacturer dashboard frontend and linking functionality for both upcoming and recent donations.

/fm-dashboard

image

✔️ Verification

Verified proper functionality and aligned design with figma

🏕️ (Optional) Future Work / Notes

N/A

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.

small little fixes~ great pr!

Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx Outdated
Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx Outdated
Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx Outdated
Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx Outdated
@Juwang110 Juwang110 requested a review from Yurika-Kan May 16, 2026 22:30
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.

first pass looks good, should hopefully be done after this! ty justinnnn

Comment thread apps/frontend/src/containers/homepage.tsx Outdated
Comment thread apps/frontend/src/containers/foodManufacturerDonationManagement.tsx Outdated
init();
}, []);

useEffect(() => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I know this is not part of your ticket, but I noticed an issue come up. When we go to deeplink to a new page, but the selected id is not on the current pagination, the page does not open up until we move the pagination to that page (e.g. if the donation id for this was on page 2 under available donations, i would need to navigate to page 2 after being deeplinked in order for it to open up. we should be going there automatically instead. i think this will require using the searchParams to set the current page to the appropriate one that has the actual modal on it, and then on close setting the current page back to 1. Can you look into this perhaps? If it's not too much of a hassle, could you change this for each of the modals?

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.

@dburkhart07 bello just wanted to get more clarification on why we want to set the page back to 1? when the user clicks x out of the modal, it makes sense for the page to stay (not reset) there to indicate where that order/donation/etc came from

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 you make a good point, let's change it to that.

Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx Outdated
Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx
Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx
Comment thread apps/frontend/src/containers/foodManufacturerDashboard.tsx Outdated
@Juwang110 Juwang110 requested a review from dburkhart07 May 17, 2026 19:37
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.

this is awesome! thanks for adding the pagination deeplinking! found a missing portion regarding admin request management, but should be a quick fix~

init();
}, []);

useEffect(() => {
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.

@dburkhart07 bello just wanted to get more clarification on why we want to set the page back to 1? when the user clicks x out of the modal, it makes sense for the page to stay (not reset) there to indicate where that order/donation/etc came from

setWasDeeplinked(true);
}
} else {
navigate(ROUTES.REQUEST_FORM, { replace: true });
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.

when the deeplinked id doesn't match anything, it does navigates to the pantry route (/request-form), so an admin or volunteer hitting ?requestId=999 (not found) goes to an unrelated page. can we change it to match what the close handler does & just strip the query param

const RequestManagement: React.FC<RequestManagementProps> = ({
fetchRequests: fetchData,
enableVolunteerActions = true,
initialRequestId,
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 noticed admin food request deeplink wasn't working & turns out admin wrapper never passed initialRequestId but volunteer wrapper had it from before this pr.

could you abstract the searchParams into this shared component so neither wrapper needs the prop for the deeplink to work?

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.

i know you just implemented it but, based on yurika's point, can we actually not reset the pagination back to 1 on modal closing?

setErrorMessage('Error fetching upcoming donations.');
}

if (donations.status === 'fulfilled') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why do we need to check for it to be fulfilled? im trying to think about a case where the food manufacturer ships out a donation, and while being shipped (or maybe a volunteer updates the status to fulfilled much later), there is a chance it could be sooner than some of the other fulfilled status orders. lmk your thoughts/if this makes sense.

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