Skip to content

Conversation

@Tarun-Nagesh
Copy link

ℹ️ Issue

Closes SSF-125

📝 Description

Moved delivery confirmation fields from Food Requests to Orders and implemented request status logic. This change reflects where delivery details are specific to individual orders instead of the entire request.

Backend Changes:

  1. Created TypeORM migration to move dateReceived, feedback, and photos fields from food_requests table to orders table
  2. Added status field to FoodRequest entity with enum values ACTIVE and CLOSED
  3. Moved confirm delivery endpoint from requests to orders: POST /api/orders/:orderId/confirm-delivery (previously POST /api/requests/:requestId/confirm-delivery)
  4. Implemented automatic request status updates - request closes when all its orders are delivered
  5. Fixed TypeScript compilation by defining local MulterFile interface in aws-s3.service.ts (could be changed later with tsconfig fix instead)

✔️ Verification

  1. Ran migration with yarn typeorm:migrate
  2. Tested confirm delivery endpoint via PowerShell
  3. All tests passing (added new tests for confirm delivery logic)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants