Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust GET saved-opportunity endpoint to take in sorting/pagination and use it #3694

Closed
3 tasks
chouinar opened this issue Jan 30, 2025 · 1 comment · Fixed by #3846
Closed
3 tasks

Adjust GET saved-opportunity endpoint to take in sorting/pagination and use it #3694

chouinar opened this issue Jan 30, 2025 · 1 comment · Fixed by #3846
Assignees

Comments

@chouinar
Copy link
Collaborator

chouinar commented Jan 30, 2025

Summary

Right now the endpoint returns all saved opportunities without any sorting at all. We should add sorting to the endpoint.

The raw column/relationship joins

  • created_at
  • updated_at
  • opportunity_title - opportunity.opportunity_title
  • close_date - opportunity.current_opportunity_summary.opportunity_summary.close_date (nulls should be at the end)

Acceptance criteria

  • API schema updated
  • API implementation updated to use paginator
  • Tests updated
@chouinar chouinar moved this from Icebox to Todo in Simpler.Grants.gov Product Backlog Jan 30, 2025
@babebe babebe added reason: duplicate This issue or pull request already exists and removed reason: duplicate This issue or pull request already exists labels Feb 7, 2025
@babebe babebe self-assigned this Feb 7, 2025
@babebe babebe moved this from Todo to In Progress in Simpler.Grants.gov Product Backlog Feb 10, 2025
@babebe babebe linked a pull request Feb 11, 2025 that will close this issue
@babebe babebe moved this from In Progress to In Review in Simpler.Grants.gov Product Backlog Feb 11, 2025
@capriiis
Copy link
Collaborator

Waiting on frontend changes, @acouch will attempt to resolve by Feb. 19

babebe added a commit that referenced this issue Feb 20, 2025
## Summary
Fixes #{[3694](#3694)}

### Time to review: __5 mins__

## Changes proposed
Updated route to POST endpoint to pass in pagination object
Added Input schema `UserSavedOpportunitiesRequestSchema` with
pagination: can now sort with` "created_at", "updated_at",
"opportunity_title", "close_date"` defaulting to `agency_code`
Updated service func `get_saved_opportunities ` to implement the
pagination and return also return pagination info
Updated Test

---------

Co-authored-by: Michael Chouinard <[email protected]>
Co-authored-by: nava-platform-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants