Skip to content

Pantry Order Management Page and Confirm Delivery Modal#116

Open
Juwang110 wants to merge 24 commits intomainfrom
jw/order-management-homepage
Open

Pantry Order Management Page and Confirm Delivery Modal#116
Juwang110 wants to merge 24 commits intomainfrom
jw/order-management-homepage

Conversation

@Juwang110
Copy link

@Juwang110 Juwang110 commented Feb 25, 2026

ℹ️ 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.

Screenshot 2026-02-25 152926 image

🏕️ (Optional) Future Work / Notes

Notes: The assignee functionality is purposefully not present.

@sam-schu sam-schu self-requested a review February 27, 2026 15:05
Copy link
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

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

  1. It looks like we're missing Filter, unless Priya said we don't need that?
  2. 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?

@Juwang110
Copy link
Author

Juwang110 commented Mar 9, 2026

  1. It looks like we're missing Filter, unless Priya said we don't need that?
  2. 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?
  1. Priya said we don't need filter here
  2. Done!

@Juwang110 Juwang110 requested a review from sam-schu March 9, 2026 17:43
Copy link
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

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

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)

@@ -491,7 +485,8 @@ const OrderStatusSection: React.FC<OrderStatusSectionProps> = ({
borderRightColor="neutral.100"
>
{formatDate(order.createdAt)}-
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason the date formatting is not consistent for created vs. delivered at?

Copy link
Author

Choose a reason for hiding this comment

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

in the Order type created at is a string and delivered at is a Date, should created at be of type Date there?

@Juwang110
Copy link
Author

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)

Confirming a delivery with photos works just fine for me, I'm not sure what's going on here...

@maxn990
Copy link
Member

maxn990 commented Mar 12, 2026

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)

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

@Juwang110 Juwang110 requested a review from sam-schu March 12, 2026 14:37
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.

4 participants