Skip to content

Conversation

@KainoaNishida
Copy link
Contributor

…a component for donation filter

Description

Screenshots/Media

Issues

Closes #

@KainoaNishida KainoaNishida linked an issue Apr 25, 2025 that may be closed by this pull request
srukelman and others added 7 commits April 24, 2025 18:14
Co-authored-by: Colin Kwon <Cobby914@users.noreply.github.com>
Co-authored-by: Colin Kwon <Cobby914@users.noreply.github.com>
filter and search changes
Copy link
Collaborator

@srukelman srukelman left a comment

Choose a reason for hiding this comment

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

hey guys this looks good so far the only issue i saw was the post and put requests not working for editing and creating donations. i fixed the post for ygs, so all u should need to fix is the PUT. also when i go to add a donation there are no donors in the dropdown
image
also the date input on the add donation isn't working for me if ygs could fix that as well

Comment on lines 368 to 376
const donor_id = await db.query(
`SELECT id FROM donors WHERE name = $1`,
[donor]
);
const data = await db.query(
`UPDATE donations SET date = COALESCE($1, date),weight = COALESCE($2, weight),value = COALESCE($3, value),
donor = COALESCE($4, donor), category = COALESCE($5, category) WHERE id = $6 RETURNING id`,
[date, weight, value, donor, category, id]
donor_id = COALESCE($4, donor_id), category = COALESCE($5, category) WHERE id = $6 RETURNING id`,
[date, weight, value, donor_id, category, id]
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think this doesn't work. take a look at how i wrote this for the post request on line 343. the problem is that the await for the donor doesn't finish getting retrieved from the db so it's undefined in the second call

@srukelman srukelman merged commit a758896 into main May 1, 2025
1 check failed
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.

Update Donors

5 participants