Skip to content

feat(OPS-2280): Award card on For Review tab and pending-award-approvals endpoint#5900

Merged
josbell merged 14 commits into
mainfrom
OPS-2280/pr2-award-card
Jul 10, 2026
Merged

feat(OPS-2280): Award card on For Review tab and pending-award-approvals endpoint#5900
josbell merged 14 commits into
mainfrom
OPS-2280/pr2-award-card

Conversation

@josbell

@josbell josbell commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What changed

Adds the "Award" card to the Agreements For Review tab and the pending-award-approvals backend endpoint (PR 2 of 3).

  • New endpoint: GET /procurement-tracker-steps/pending-award-approvals/ — returns AWARD steps where the Budget Team has not yet responded, gated to BUDGET_TEAM/SYSTEM_OWNER
  • Notifications: when a COR requests award approval, all Budget Team members are notified with a link to the review page
  • BLI transitions + award marking: on approve, IN_EXECUTION → OBLIGATED, PLANNED → PLANNED_MOD, and ProcurementAction is marked AWARDED; double-award guard prevents _advance_active_step_if_needed from overwriting the obligated date
  • AwardReviewCard: purpose-built For Review card showing Agreement, Requested by, Award Amount, Award Date, and a "Review Agreement" link to /agreements/:id/review-award
  • ChangeRequestsList + badge count: wired to fetch pending award approvals; For Review badge count includes award approvals

Issue

#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.py
cd frontend
bun run test --watch=false src/components/ChangeRequests/AwardReviewCard/ src/hooks/useChangeRequests.hooks.test.js src/components/ChangeRequests/ChangeRequestsList/ChangeRequestList.test.jsx

Integration test (requires Docker):

cd backend/ops_api
pipenv run pytest tests/ops/procurement_tracker/test_award_approval_review_card.py

Manual:

  1. As COR Complete steps 1-5
  2. Request award approval
  3. Log in as Budget Team and navigate For Review Tab in Agreements
  4. Confirm the "Award" card appears with Agreement name, Requested by, Award Amount, and Award Date.
  5. Check notification and confirm award notification exists

A11y impact

  • No accessibility-impacting changes in this PR

Storybook

  • N/A — change is page-specific or non-visual

Screenshots

N/A

Definition of Done Checklist

  • OESA: Code refactored for clarity
  • OESA: Dependency rules followed
  • Automated unit tests updated and passed
  • Automated integration tests updated and passed
  • Automated quality tests updated and passed
  • Automated load tests updated and passed
  • Automated a11y tests updated and passed
  • Automated security tests updated and passed
  • 90%+ Code coverage achieved
  • Form validations updated

Links

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 AwardReviewCard and integrated pending-award-approvals into ChangeRequestsList and 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.

Comment thread frontend/src/components/ChangeRequests/ChangeRequestsList/ChangeRequestsList.jsx Outdated
Comment thread backend/ops_api/ops/services/procurement_tracker_steps.py
Comment thread backend/ops_api/tests/ops/procurement_tracker/test_pending_award_approvals.py Outdated
Comment thread backend/ops_api/tests/ops/procurement_tracker/test_pending_award_approvals.py Outdated
@josbell josbell marked this pull request as draft July 7, 2026 02:49
@josbell josbell force-pushed the OPS-2280/pr2-award-card branch 2 times, most recently from c06e268 to 149d37c Compare July 7, 2026 14:30
@josbell josbell marked this pull request as ready for review July 8, 2026 00:27
@josbell josbell force-pushed the OPS-2280/pr2-award-card branch from 7a1f838 to abd346f Compare July 8, 2026 00:55
@josbell josbell self-assigned this Jul 8, 2026

@weimiao67 weimiao67 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall LGTM — solid implementation that follows the pre-award approval pattern cleanly. Three inline asks before merge.

Comment thread backend/ops_api/ops/services/procurement_tracker_steps.py
Comment thread backend/ops_api/ops/services/procurement_tracker_steps.py
Comment thread backend/ops_api/ops/services/procurement_tracker_steps.py Outdated
@josbell josbell force-pushed the OPS-2280/pr2-award-card branch from 6644910 to 286e2b1 Compare July 9, 2026 04:40
Base automatically changed from OPS-2280/pr1-foundation to main July 9, 2026 05:21
@josbell josbell force-pushed the OPS-2280/pr2-award-card branch from 286e2b1 to 505917c Compare July 9, 2026 05:27
@josbell josbell force-pushed the OPS-2280/pr2-award-card branch from c2a8afe to b781740 Compare July 9, 2026 17:33
@josbell josbell merged commit ff248f1 into main Jul 10, 2026
70 checks passed
@josbell josbell deleted the OPS-2280/pr2-award-card branch July 10, 2026 15:45
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.427.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants