SSF-219 New Donation Form Required Fields Backend Updates#190
Open
Juwang110 wants to merge 2 commits into
Open
SSF-219 New Donation Form Required Fields Backend Updates#190Juwang110 wants to merge 2 commits into
Juwang110 wants to merge 2 commits into
Conversation
dburkhart07
requested changes
Jun 17, 2026
dburkhart07
left a comment
There was a problem hiding this comment.
Looks good, just missed a few spots.
Here are a few others that I think we can make sure we update the fact that these are now required in a few other spots in the backend:
- donationItems entity
- manufacturer service getFmDonations function
- donation-details-dto
- We also need to write a migration to reflect these changes in the DB
| itemName: string; | ||
| quantity: number; | ||
| reservedQuantity: number; | ||
| ozPerItem?: number; |
| foodType: FoodType; | ||
| allocatedQuantity: number; | ||
| detailsConfirmed: boolean; | ||
| ozPerItem?: number; |
| }) | ||
| .map((item) => { | ||
| const formData = itemFormData[item.itemId]; | ||
| // Submit is gated on ozPerItem and estimatedValue being filled for every |
There was a problem hiding this comment.
we can delete this comment probably, i think its pretty straightforward
| .filter((item) => { | ||
| const formData = itemFormData[item.itemId]; | ||
| return ( | ||
| formData.ozPerItem !== (item.ozPerItem?.toString() ?? '') || |
There was a problem hiding this comment.
these will no longer be optional so they can be changed to just item.ozPerItem.toString()
| donation.relevantDonationItems.length > 0 && | ||
| donation.relevantDonationItems.every( | ||
| (item) => | ||
| (itemFormData[item.itemId]?.ozPerItem ?? '') !== '' && |
There was a problem hiding this comment.
no longer need the ?? for each here
| donation.relevantDonationItems.map((item) => [ | ||
| item.itemId, | ||
| { | ||
| ozPerItem: item.ozPerItem?.toString() ?? '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ℹ️ Issue
Closes https://vidushimisra.atlassian.net/browse/SSF-219
📝 Description
Made it so oz. per item, donation value, and food rescue are required not nullable fields in backend dtos and updated tests.
Frontend: Minor visual changes to reflect these required fields (details in ticket)
✔️ Verification
Verified frontend design and tests passed in backend.
🏕️ (Optional) Future Work / Notes
N/A