[SSF-226] Pantry Deleting & Editing Food Requests Frontend#186
[SSF-226] Pantry Deleting & Editing Food Requests Frontend#186jiang-h-y wants to merge 10 commits into
Conversation
dburkhart07
left a comment
There was a problem hiding this comment.
few things, looking beautiful tho!!
| isOpen={deleteRequest !== null} | ||
| onClose={() => setDeleteRequest(null)} | ||
| onSuccess={() => { | ||
| setAlertMessage('Successfully deleted food request.'); |
There was a problem hiding this comment.
Note: Once you merge in your PR for fixing the alert messages, you'll need to adjust this to be a success (right now, it shows up as an error, but don't bother fixing that till your later PR comes in)
|
Currently, trying to delete a food request as an admin/volunteer will return an error. Pretty sure it's because of role gating in the backend, so I didn't try to fix it for ticket separation purposes. But if it's a different issue/if it's better to address it here, I can fix the role gating. |
There was a problem hiding this comment.
some very small changes so i trust to approve. functionality looks great.
regarding the unauthorized access. perhaps if you want to copy the request.controller file from https://github.com/Code-4-Community/ssf/pull/185/changes#diff-b57a26ea6a57a9ef34ba9812231f9f3dabd0397c2c252a1e777b3a0aa367858b this will allow it to keep the intended functionality
also just make sure the alert comment gets addressed, since that pr should be good to merge.
| onDelete, | ||
| }) => { | ||
| useModalBodyCleanup(); | ||
| const { authStatus } = useAuthenticator((context) => [context.authStatus]); |
There was a problem hiding this comment.
we should only be using this for components that are not within a protected route, since the protected route wrapper already calls this, and we know we will have the user before getting here. can we just do a regular await ApiClient.getMe()?
| gap={1} | ||
| borderRadius="sm" | ||
| color={'neutral.800'} | ||
| background="neutral.50" |
There was a problem hiding this comment.
this is supposed to be F4F4F5, can we turn this into grey.subtle as well?
| flexShrink={0} | ||
| borderRadius="sm" | ||
| color="red.hover" | ||
| background="red.200" |
There was a problem hiding this comment.
This is supposed to be #FEE2E2. Can we make this red.subtle?
| </Text> | ||
| </Box> | ||
| <Flex justifyContent="flex-end" gap={2.5}> | ||
| <Button |
There was a problem hiding this comment.
Can we get a little more horizontal padding, it kinda looks squished compared to the figma. Same with the Delete button


ℹ️ Issue
Closes SSF-226
📝 Description
✔️ Verification
Base Request Modal:

Editing View:

Delete Request Modal:

Success Toast Example:

🏕️ (Optional) Future Work / Notes
Uncaught Error: Your focus-trap needs to have at least one focusable element