feat(OPS-2280): Award card on For Review tab and pending-award-approvals endpoint#5900
Conversation
07c5d28 to
9c7ef03
Compare
There was a problem hiding this comment.
Pull request overview
Adds the “Award” approval item into the existing “For Review” workflow by introducing a new backend endpoint for pending award approvals, wiring a new frontend review card into the Change Requests list, and updating badge totals to include award approvals.
Changes:
- Backend: added
GET /procurement-tracker-steps/pending-award-approvals/plus service logic for retrieving pending award steps, handling award-approval side effects, and emitting notifications. - Frontend: added
AwardReviewCardand integrated pending-award-approvals intoChangeRequestsListand the “For Review” badge total. - Tests: added unit/integration coverage for the pending-award-approvals endpoint and the award review card rendering.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/hooks/useChangeRequests.hooks.js | Includes pending award approvals in the “For Review” total count hook. |
| frontend/src/hooks/useChangeRequests.hooks.test.js | Updates hook tests to mock the new pending award approvals query. |
| frontend/src/components/ChangeRequests/ChangeRequestsList/ChangeRequestsList.jsx | Fetches pending award approvals and renders AwardReviewCard items in the unified list. |
| frontend/src/components/ChangeRequests/ChangeRequestsList/ChangeRequestList.test.jsx | Updates list tests to include the new pending award approvals query mock. |
| frontend/src/components/ChangeRequests/AwardReviewCard/AwardReviewCard.jsx | New “Award” For Review card UI and navigation to /agreements/:id/review-award. |
| frontend/src/components/ChangeRequests/AwardReviewCard/AwardReviewCard.test.jsx | Unit tests for the new award review card. |
| frontend/src/components/ChangeRequests/AwardReviewCard/index.js | Barrel export for the new component. |
| frontend/src/api/opsAPI.js | Adds RTK Query endpoint + hook for /procurement-tracker-steps/pending-award-approvals/. |
| backend/ops_api/ops/resources/procurement_tracker_steps.py | Adds API resource for the pending-award-approvals endpoint. |
| backend/ops_api/ops/views.py | Registers the pending-award-approvals view function. |
| backend/ops_api/ops/urls.py | Adds the /procurement-tracker-steps/pending-award-approvals/ route. |
| backend/ops_api/ops/services/procurement_tracker_steps.py | Implements pending-award query, award approval side effects, notification logic, and a double-award date guard. |
| backend/ops_api/ops/services/notification_constants.py | Updates notification title constants docstrings and award notification titles. |
| backend/ops_api/tests/ops/procurement_tracker/test_pending_award_approvals.py | Adds service-layer tests for the pending award approvals query (unit). |
| backend/ops_api/tests/ops/procurement_tracker/test_award_approval_review_card.py | Adds integration tests validating endpoint filtering and required response fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c06e268 to
149d37c
Compare
7a1f838 to
abd346f
Compare
weimiao67
left a comment
There was a problem hiding this comment.
Overall LGTM — solid implementation that follows the pre-award approval pattern cleanly. Three inline asks before merge.
6644910 to
286e2b1
Compare
…sition, test fixes
…es, not on step 6 completion
…ata serializes in API response
286e2b1 to
505917c
Compare
c2a8afe to
b781740
Compare
|
🎉 This PR is included in version 1.427.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
What changed
Adds the "Award" card to the Agreements For Review tab and the pending-award-approvals backend endpoint (PR 2 of 3).
GET /procurement-tracker-steps/pending-award-approvals/— returns AWARD steps where the Budget Team has not yet responded, gated toBUDGET_TEAM/SYSTEM_OWNERIN_EXECUTION → OBLIGATED,PLANNED → PLANNED_MOD, andProcurementActionis marked AWARDED; double-award guard prevents_advance_active_step_if_neededfrom overwriting the obligated dateAwardReviewCard: purpose-built For Review card showing Agreement, Requested by, Award Amount, Award Date, and a "Review Agreement" link to/agreements/:id/review-awardIssue
#2280
How to test
Unit tests (no Docker):
cd backend/ops_api pipenv run pytest tests/ops/procurement_tracker/test_pending_award_approvals.py pipenv run pytest tests/ops/services/test_award_approval_service.pyIntegration test (requires Docker):
cd backend/ops_api pipenv run pytest tests/ops/procurement_tracker/test_award_approval_review_card.pyManual:
A11y impact
Storybook
Screenshots
N/A
Definition of Done Checklist
Links