Skip to content

SUBMIT-752 Entity - Display Assessment Early Engagement Card on Projects Page#808

Open
leodube-aot wants to merge 3 commits intobcgov:developfrom
leodube-aot:SUBMIT-752
Open

SUBMIT-752 Entity - Display Assessment Early Engagement Card on Projects Page#808
leodube-aot wants to merge 3 commits intobcgov:developfrom
leodube-aot:SUBMIT-752

Conversation

@leodube-aot
Copy link
Collaborator

@leodube-aot leodube-aot commented Mar 3, 2026

Ticket: SUBMIT-752 Entity - Display Assessment Early Engagement Card on Projects Page

Description
Frontend

  • Refactored Project component slightly to move most of the logic into ProjectSubmissionsCard. This allows us to more easily reuse the cards on the projects page for different package types in the future (including IPD).
  • Updated some of the status chips.

Backend

  • Created schemas for TrackWork, TrackPhase and AccountProjectWork models
  • Fixed some SQLAlchemy warnings

Database:

  • Added REQUESTED_BY_EAO to packagestatus enum.

Note: Until the track sync is complete, this must be manually tested by creating the necessary database entries. The sample data I used to test this PR can be found here: queries.sql

Sample API response
GET /api/projects/accounts/142
This endpoint was updated to include account_project_works. The rest of the response remains unchanged.

[
  {
    "account_id": 142,
    "account_project_works": [
      {
        "id": 3,
        "work": {
          "current_phase": {
            "ea_act_id": 3,
            "id": 2,
            "legislated": true,
            "name": "Early Engagement",
            "number_of_days": 90,
            "sort_order": 2,
            "work_type_id": 1,
            "work_type_name": "ASSESSMENT"
          },
          "current_phase_id": 2,
          "id": 1,
          "project_id": 187,
          "title": "Sample Work Title",
          "work_state": "IN_PROGRESS"
        },
        "work_id": 1
      }
    ],
    "id": 164,
    "packages": [
        // unchanged...
    ],
    "project": {
        // unchanged...
    },
    "project_id": 187
  }
]

Screenshots
Screenshot 2026-03-02 at 4 24 16 PM

@leodube-aot leodube-aot self-assigned this Mar 3, 2026
Comment on lines 31 to +37
account_project_works = db.relationship(
'AccountProjectWork',
primaryjoin='AccountProjectWork.account_project_id==AccountProject.id',
lazy='select',
cascade='all, delete',
passive_deletes=True)
passive_deletes=True,
back_populates='account_project')
Copy link
Collaborator Author

@leodube-aot leodube-aot Mar 3, 2026

Choose a reason for hiding this comment

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

SQLAlchemy was complaining and throwing warnings because it was missing a back_populates on this relationship and on the Package.account_project_work relationship. Perhaps we should use viewonly=True instead?

Image

@leodube-aot leodube-aot marked this pull request as ready for review March 3, 2026 16:23
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.

1 participant