Conversation
| orderId: number; | ||
| status: OrderStatus; | ||
| foodManufacturerName: string; | ||
| trackingLink: string; |
There was a problem hiding this comment.
i think tracking link can be nullable?
| { allocationId: 3, orderId: 2 }, | ||
| ]; | ||
|
|
||
| const mockOrderDetails: Partial<OrderDetailsDto>[] = [ |
There was a problem hiding this comment.
why does this need to be an array and not just a singular OrderDetailsDto
| return this.ordersService.findOne(orderId); | ||
| } | ||
|
|
||
| @Get('/:orderId/order-details') |
There was a problem hiding this comment.
maybe the endpoint can be simplified to /:orderId/details since it being an order is implied
| ).toBe(true); | ||
| }); | ||
| }); | ||
| const seededOrder = await orderRepo.findOne({ |
There was a problem hiding this comment.
why can't we just call findOne on the service here?
| it('updates order status to delivered', async () => { | ||
| const orderId = 3; | ||
| const order = await service.findOne(orderId); | ||
| describe('updateStatus', () => { |
There was a problem hiding this comment.
there seems to be some indentation problems - i think every other test is nested in the findOrderDetails one
|
|
||
| {foodRequest.requestedItems.length > 0 && ( | ||
| <Flex wrap="wrap" mt={3} gap={2}> | ||
| {foodRequest.requestedItems.map((item) => ( |
There was a problem hiding this comment.
i made a reusable component called tagGroup i think you can use here
| orderId: number; | ||
| status: OrderStatus; | ||
| foodManufacturerName: string; | ||
| trackingLink: string; |
| return { | ||
| orderId: order.orderId, | ||
| status: order.status, | ||
| foodManufacturerName: order.foodManufacturer?.foodManufacturerName, |
There was a problem hiding this comment.
food manufacturer is a required relation in the db so idt u need the ? here
ℹ️ Issue
Closes https://vidushimisra.atlassian.net/jira/software/projects/SSF/boards/1?selectedIssue=SSF-143
📝 Description
This simple PR involves changes to make a reusable order details modal component that displays details of an order and the associated request. This modal is used by Admin, Volunteer, Pantry so this component will be used in many places.
The order details modal was updated on this existing page: /admin-order-management
✔️ Verification
I added a new route to get order details given an orderId so I added controller and service tests for that. I also verified the modal aligned with the figma designs.
🏕️ (Optional) Future Work / Notes
N/A