Skip to content

SSF-225 FM Deleting & Editing Donation Item Backend#188

Open
Juwang110 wants to merge 3 commits into
mainfrom
jw/ssf-225-FM-edit-donation-items-backend
Open

SSF-225 FM Deleting & Editing Donation Item Backend#188
Juwang110 wants to merge 3 commits into
mainfrom
jw/ssf-225-FM-edit-donation-items-backend

Conversation

@Juwang110

Copy link
Copy Markdown

ℹ️ Issue

Closes https://vidushimisra.atlassian.net/browse/SSF-225

📝 Description

Added backend support for patch route donations/:donationId/item to allow adding, editing and deleting donation items for a donation.

✔️ Verification

Postman verified and service/controller tests

🏕️ (Optional) Future Work / Notes

N/A

@Yurika-Kan Yurika-Kan self-requested a review June 7, 2026 00:39

@Yurika-Kan Yurika-Kan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

changes requested for codebase consistency!

let's have oz/value for donation items stay optional in the backend while the frontend requires them to match the create donation items & confirm item details contracts.

edit: i just saw your new pr up which updates those backend fields to be required & since it is better to match be + fe contracts and it's already implemented...let's keep it required in the be then, thanks for taking care of that :)

Comment thread apps/backend/src/donations/donations.controller.ts
@Yurika-Kan Yurika-Kan self-assigned this Jun 7, 2026
@dburkhart07 dburkhart07 self-assigned this Jun 8, 2026

@dburkhart07 dburkhart07 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

very very clean pr! few small things and one question worth discussing, but aside from that lgtm!

Comment thread apps/backend/src/donationItems/donationItems.service.ts Outdated
@Min(1)
quantity!: number;

@IsNumber(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Yurika-Kan can you explain the rationale behind making these required? the case im considering:

if i make a new donation with 2 items where i dont fill out the ozPerItem and estimatedValue, the next time i go to update the donation, i cant just make an edit to one of them, i have to update all fields for all values. i think they should be allowed to go in and just update the ozPerItem for one item if thats all they have.

lmk if im missing something though!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

To my understanding we cannot now make new donation items without ozPerItem and estimatedValue?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

They wanted to make all those fields now required upon creation so this was to keep consistency with that request

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ie oz, donation val, food rescue

Comment thread apps/backend/src/donationItems/donationItems.service.spec.ts
Comment thread apps/backend/src/donationItems/donationItems.service.spec.ts
Comment thread apps/backend/src/donationItems/donationItems.service.ts Outdated
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.

3 participants