Skip to content

Conversation

@dburkhart07
Copy link

@dburkhart07 dburkhart07 commented Oct 25, 2025

ℹ️ Issue

Closes #79

📝 Description

  • Created new endpoint to go through each donation item, and make a call to the service function
  • Added validation for the donationId each time
  • Added tests for the createDonationItem and createMultipleDonationItems controllers

✔️ Verification

Ensured only 1 api call was being made via console logs

Successful confirmation of 1 api call being made:
image

🏕️ (Optional) Future Work / Notes

Still need to write tests for the rest of the controllers, as well as the services. We are holding off on service tests for now though, pending a potential change in how we do testing.

@dburkhart07 dburkhart07 force-pushed the ddb/SSF-79-improve-performance-log-new-donation-form branch from 3c5bca7 to 3c3e332 Compare November 30, 2025 02:52
@dburkhart07 dburkhart07 force-pushed the ddb/SSF-79-improve-performance-log-new-donation-form branch from d73a38e to 20b9bbe Compare November 30, 2025 21:23
Copy link
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

can you change the field in donationItems entity to donationId instead of donation_id, also merge main so i can run it w/o issues

@dburkhart07 dburkhart07 requested a review from amywng December 6, 2025 18:21
totalValue = 0;

updatedRows.forEach((row) => {
if (row.numItems && row.ozPerItem && row.valuePerItem) {
Copy link
Member

Choose a reason for hiding this comment

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

imo i feel like we shouldn't wait til they're all filled out, but update as any row is changed (also know this isn't part of your ticket but food for thought ig

@dburkhart07 dburkhart07 requested a review from amywng December 6, 2025 20:37
@dburkhart07 dburkhart07 requested a review from amywng December 7, 2025 06:56
Copy link
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

we need to add validation to the form because i was able to submit an invalid entry and it added it to the database but i'm going to say that is whoever does the new form's job

@dburkhart07 dburkhart07 requested a review from amywng December 8, 2025 06:00
Copy link
Member

@amywng amywng left a comment

Choose a reason for hiding this comment

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

couple small comments. once justin's pr goes in you'll have to fix the status stuff but i'm approving

@sam-schu sam-schu requested a review from Yurika-Kan January 1, 2026 19:01
return;
}

onClose();
Copy link
Collaborator

@Yurika-Kan Yurika-Kan Jan 15, 2026

Choose a reason for hiding this comment

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

what's the reason we close it first? it works asyncly is what i am understanding how you can set this as closed before api call finishes. is this just better design

Copy link
Author

Choose a reason for hiding this comment

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

Not really, you make a good point. I think it should not really matter where we place it, but for error handling, it is probably better for them to receive some browser alert if something went wrong before closing it. I just changed the location!

@Yurika-Kan Yurika-Kan self-requested a review January 23, 2026 01:30
Copy link
Collaborator

@Yurika-Kan Yurika-Kan left a comment

Choose a reason for hiding this comment

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

test

Copy link
Collaborator

@Yurika-Kan Yurika-Kan left a comment

Choose a reason for hiding this comment

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

good! just minor clarifications

Copy link
Collaborator

@Yurika-Kan Yurika-Kan left a comment

Choose a reason for hiding this comment

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

some more comments ><

Copy link
Collaborator

@Yurika-Kan Yurika-Kan left a comment

Choose a reason for hiding this comment

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

awesomeness

@dburkhart07 dburkhart07 merged commit 67ead3d into main Jan 26, 2026
3 of 4 checks passed
@dburkhart07 dburkhart07 deleted the ddb/SSF-79-improve-performance-log-new-donation-form branch January 26, 2026 15:59
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.

5 participants