-
Notifications
You must be signed in to change notification settings - Fork 0
[SSF-112] request management frontend #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ed request management frontend
* minor refactoring based on comments * minor changes * prettier
2a49b9a to
3bdc254
Compare
| .then((response) => response.data) as Promise<OrderDetails[]>; | ||
| } | ||
|
|
||
| public async getOrderDetailsListFromRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate, and I believe to maintain consistency we should keep the one above so that the route has the leading /
| bgColor="#2B4E60" | ||
| onClick={newRequestDisclosure.onOpen} | ||
| > | ||
| New Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for these buttons, i think karrik on the figma should now be ibm w/ minimum medium/semibold instead of p2/inter. also, i think they could have a little less x padding
| bgColor="#D4EAED" | ||
| color="#19717D" | ||
| textStyle="p2" | ||
| fontWeight={500} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these active/closed badges need extra padding (both x and y)
| useState<FoodRequest | null>(null); | ||
| const [openOrderId, setOpenOrderId] = useState<number | null>(null); | ||
|
|
||
| const pageSize = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think to match the figma this should be 10
| </Tabs.Trigger> | ||
| </Tabs.List> | ||
| <Tabs.Content value="request details"> | ||
| <Field.Root required mb={4} mt={5}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think we need required here since this form isn't editable? also i think the top spacing is a little too much
| color="neutral.800" | ||
| value="associated orders" | ||
| > | ||
| Associated Orders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the horizontal line should end after associated orders and not continue past it. i also don't think it should be any thicker than the default when the tab is selected
| <Field.Root mb={4} mt={3}> | ||
| <Field.Label> | ||
| <Text | ||
| textStyle="p2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we're using this styling a lot, maybe we can make a variable for it to reduce redundancy
| {pantryName} | ||
| </Text> | ||
|
|
||
| <Tabs.Root mt={5} defaultValue="request details"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is value necessary for any of these Tabs components? and if so, should they be camel case?
| </Box> | ||
| )} | ||
|
|
||
| <Flex justify="center" mt={12}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think there needs to be more spacing above the order (below the tabs) and less spacing below the order (above the pagination component)
| </Text> | ||
| {currentOrder.status === OrderStatus.DELIVERED ? ( | ||
| <Badge | ||
| py={1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add the rest of the non-changing attributes to a variable, and have that variable along with the bgColor/color in these Badge's
ℹ️ Issue
Closes https://vidushimisra.atlassian.net/jira/software/projects/SSF/boards/1?selectedIssue=SSF-112
📝 Description
I made the request management page frontend align with the new figma design. This involved refactoring the frontend page and creating a new requestDetailsModal. The frontend path that is relevant is: /request-form/:pantryId.
✔️ Verification
I verified everything worked on the frontend, properly displaying the data from the db and the design aligned with figma.
🏕️ (Optional) Future Work / Notes
NOTE: This branch is based on the SSF-108 PR which is in review as of writing this, so I'd hold off on reviewing this until that is merged. EDIT: Backend has been merged