Skip to content

[SSF 227] - Volunteer archive and edit orders backend#193

Open
dburkhart07 wants to merge 2 commits into
mainfrom
ddb/SSF-227-volunteer-archive-and-edit-orders-backend
Open

[SSF 227] - Volunteer archive and edit orders backend#193
dburkhart07 wants to merge 2 commits into
mainfrom
ddb/SSF-227-volunteer-archive-and-edit-orders-backend

Conversation

@dburkhart07

Copy link
Copy Markdown

ℹ️ Issue

Closes #227

📝 Description

  • Wrote migration to add new order status enum CLOSED
  • Added this new enum into the entire repo, including all the frontend order management pages organized by status to have a new page
  • Added new endpoint to close order and free all allocations as a result
  • Added new endpoint to edit several allocations
  • Auth gated all endpoints
  • Wrote tests

NOTE: For editing allocations, the way I designed it was that the dto would take in an allocationId or donationItemId. Should the allocationId be provided, it would be an edited allocation that already exists in the order. Should it be a donationItemId, it is a new allocation to be created for that order. Finally, all existing allocations that are do not get their ids provided will be assumed to be deleted. I made sure to check that all the donationItemIds involved in the editing are part of the donations from the food manufacturers, and all donations affected as assessed to see if they'ev either beomce matched or available as a result to gaining or losing allocations.

✔️ Verification

  • Verified both endpoints
  • Verified all tests passed
  • Smoke tested all order pages to make sure closed status showed up
  • Ran migration forwards and backwards

🏕️ (Optional) Future Work / Notes

We will have to account for this setup in our frontend implementation so that no allocations with a 0 quantity for the order get sent to the backend.

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.

1 participant