Pantry Order Management Page and Confirm Delivery Modal#116
Pantry Order Management Page and Confirm Delivery Modal#116
Conversation
sam-schu
left a comment
There was a problem hiding this comment.
- It looks like we're missing Filter, unless Priya said we don't need that?
- For the modals, can we create the component once and just vary the data passed in/displayed depending on which order is selected, rather than creating one modal instance per order?
apps/frontend/src/components/forms/orderReceivedActionModal.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/orderReceivedActionModal.tsx
Outdated
Show resolved
Hide resolved
|
sam-schu
left a comment
There was a problem hiding this comment.
When I try to confirm delivery with photos I'm getting the following error, can you check to see if it's the same for you? it might be a config issue on my end
Detailed AWS upload error: PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
at ProtocolLib.getErrorSchemaOrThrowBaseException (C:\Users\short\GitHub\ssf\node_modules\@aws-sdk\core\dist-cjs\submodules\protocols\index.js:69:67)
at AwsRestXmlProtocol.handleError (C:\Users\short\GitHub\ssf\node_modules\@aws-sdk\core\dist-cjs\submodules\protocols\index.js:1810:65)
at AwsRestXmlProtocol.deserializeResponse (C:\Users\short\GitHub\ssf\node_modules\@smithy\core\dist-cjs\submodules\protocols\index.js:314:24)
at processTicksAndRejections (node:internal/process/task_queues:103:5)
at C:\Users\short\GitHub\ssf\node_modules\@smithy\core\dist-cjs\submodules\schema\index.js:26:24
at C:\Users\short\GitHub\ssf\node_modules\@aws-sdk\middleware-sdk-s3\dist-cjs\index.js:386:20
at C:\Users\short\GitHub\ssf\node_modules\@smithy\middleware-retry\dist-cjs\index.js:254:46
at C:\Users\short\GitHub\ssf\node_modules\@aws-sdk\middleware-flexible-checksums\dist-cjs\index.js:241:24
at C:\Users\short\GitHub\ssf\node_modules\@aws-sdk\middleware-sdk-s3\dist-cjs\index.js:63:28
at C:\Users\short\GitHub\ssf\node_modules\@aws-sdk\middleware-sdk-s3\dist-cjs\index.js:90:20 {
'$fault': 'client',
'$retryable': undefined,
'$metadata': {
httpStatusCode: 301,
requestId: '4BHVNFYC5VQTXNTJ',
extendedRequestId: 'EnfjEyXkfUIkcbtXqIPhCmz/Hi89Y7ZjweH5xA+aV7eFDWtfq97curj7XYEs8o2bzFrmQ4yc5dwrrXDib9J0lW/ZZbH7w1qh',
cfId: undefined,
attempts: 1,
totalRetryDelay: 0
},
Code: 'PermanentRedirect',
Endpoint: 'confirm-delivery-photos.s3.us-east-2.amazonaws.com',
Bucket: 'confirm-delivery-photos',
RequestId: '4BHVNFYC5VQTXNTJ',
HostId: 'EnfjEyXkfUIkcbtXqIPhCmz/Hi89Y7ZjweH5xA+aV7eFDWtfq97curj7XYEs8o2bzFrmQ4yc5dwrrXDib9J0lW/ZZbH7w1qh'
}
[Nest] 38604 - 03/11/2026, 3:31:54 PM ERROR [ExceptionsHandler] File upload to AWS failed
Error: File upload to AWS failed
at AWSS3Service.upload (C:\Users\short\GitHub\ssf\dist\apps\backend\main.js:4256:19)
at processTicksAndRejections (node:internal/process/task_queues:103:5)
at OrdersController.confirmDelivery (C:\Users\short\GitHub\ssf\dist\apps\backend\main.js:4011:19)
apps/frontend/src/components/forms/deliveryConfirmationModal.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/orderReceivedActionModal.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/orderReceivedActionModal.tsx
Outdated
Show resolved
Hide resolved
| @@ -491,7 +485,8 @@ const OrderStatusSection: React.FC<OrderStatusSectionProps> = ({ | |||
| borderRightColor="neutral.100" | |||
| > | |||
| {formatDate(order.createdAt)}- | |||
There was a problem hiding this comment.
Is there a reason the date formatting is not consistent for created vs. delivered at?
There was a problem hiding this comment.
in the Order type created at is a string and delivered at is a Date, should created at be of type Date there?
Confirming a delivery with photos works just fine for me, I'm not sure what's going on here... |
You guys have AWS services across multiple regions (ie cognito in us-east-1 and s3 in us-east-2). My guess would be that Justin's is working because he is relying on the default cases, while Sam has a region for AWS set in his env file. I would suggest deleting the bucket in us-east-2 and recreating it in us-east-1 to be consistent |
ℹ️ Issue
Closes https://vidushimisra.atlassian.net/jira/software/projects/SSF/boards/1/backlog?jql=assignee%20%3D%20712020%3A10ef9ad9-e290-4bbd-8c4b-cb215e8d449a&selectedIssue=SSF-142
📝 Description
I refactored the frontend for the pantry order management page to match the Figma design. I also implemented the confirm order delivery modal, which features calling the confirmDelivery route. This modal is a form that involves uploading pictures to send.
Notable frontend route: /pantry-order-management
✔️ Verification
I verified the frontend matched the figma design. I also verified confirm delivery works as expected with making sure the date, feedback and pictures show up in the database.
🏕️ (Optional) Future Work / Notes
Notes: The assignee functionality is purposefully not present.