Skip to content

[SSF-183] add FM dashboard endpoint#148

Open
amywng wants to merge 4 commits intomainfrom
acw/SSF-183-fm-dashboard-endpoint
Open

[SSF-183] add FM dashboard endpoint#148
amywng wants to merge 4 commits intomainfrom
acw/SSF-183-fm-dashboard-endpoint

Conversation

@amywng
Copy link
Copy Markdown
Member

@amywng amywng commented Apr 5, 2026

ℹ️ Issue

Closes SSF-183

📝 Description

  • added controller and service method for getting the next two upcoming donation reminders
    • controller endpoint: /manufacturers/:foodManufacturerId/next-two-donations
    • service method: getUpcomingDonationReminders
  • wrote controller/service tests

✔️ Verification

tested endpoint on postman and verified tests pass

🏕️ (Optional) Future Work / Notes

not sure if it's just me but /manufacturers/:foodManufacturerId/donations is causing an error/not working...

Copy link
Copy Markdown
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

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

sorry for the delay!

The service function logic does not fully handle the third bullet in the ticket (the case where both upcoming reminders could be for the same donation). For example, testing with a once-weekly recurrence starting 4/15 and a once-monthly recurrence starting 5/11 returned those two dates, rather than 4/15 and 4/22. (It's only weekly donations that recur on multiple days of the week that will have multiple dates in their next_donation_dates array, so we need to handle more than just that case)

@amywng amywng requested a review from sam-schu April 13, 2026 00:54
Copy link
Copy Markdown
Collaborator

@sam-schu sam-schu left a comment

Choose a reason for hiding this comment

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

It looks like the logic updates only change how weekly donations are handled, but we need to handle all recurrence types - e.g., a monthly donation could recur twice before a yearly donation, or a yearly donation could recur twice before an every-3-years donation

@amywng amywng requested a review from sam-schu April 13, 2026 04:46
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.

2 participants