Skip to content

feat: opportunity list — date-range filter + expose appointmentDate/Time for calendar view #681

@nadavosa

Description

@nadavosa

Context

Linked to need4deed-org/fe#646 — the calendar page needs to fetch dated, non-accompanying opportunities for a given month.

What's needed

1. New query params on GET /opportunity

Param Type Description
`appointmentDateFrom` ISO date string Filter opps with appointmentDate ≥ this date
`appointmentDateTo` ISO date string Filter opps with appointmentDate ≤ this date
`hasAppointmentDate` boolean When true, return only opps where appointmentDate is not null
`excludeAccompanying` boolean When true, exclude accompanying volunteerType

The FE will call with the start and end of the visible calendar month, e.g.:
`GET /opportunity?appointmentDateFrom=2026-06-01&appointmentDateTo=2026-06-30&hasAppointmentDate=true&excludeAccompanying=true`

2. Include appointmentDate and appointmentTime in the list response

Currently the opportunity list DTO (`dtoOpportunityGetList`) may not include `appointmentDate` / `appointmentTime`. These fields must be present in the list response so the FE can pin events on the correct calendar day without fetching each opportunity individually.

Add to list response per opportunity:

  • `appointmentDate` (ISO string or null)
  • `appointmentTime` (string or null)
  • `agentTitle` (the agent/center name — for the day-click panel on the FE)

3. SDK

Update `ApiOpportunityGetList` in the SDK to include the three fields above if not already present.

Tasks

  • Add `appointmentDateFrom`, `appointmentDateTo`, `hasAppointmentDate`, `excludeAccompanying` to `opportunityListQuerySchema`
  • Apply filters in the opportunity list handler
  • Expose `appointmentDate`, `appointmentTime`, `agentTitle` in `dtoOpportunityGetList`
  • Update SDK type `ApiOpportunityGetList`

Metadata

Metadata

Assignees

No one assigned

    Labels

    biggycontains sub-issues, won't get dev branch

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions