Skip to content

feat(activity): read updates from DEMI - #971

Merged
danieltruong merged 2 commits into
developfrom
feat-demi-notifications
Oct 14, 2026
Merged

danieltruong merged 2 commits into
developfrom
feat-demi-notifications

Conversation

@danieltruong

Copy link
Copy Markdown
Collaborator

Activity list, the project Updates tab and the update edit form now read updates from DEMI /updates in DEMI's own row shape. Saves still go to eagle-api. A small mapper next to the save call turns a DEMI row into the body eagle-api expects.

Changes:

  • New models/demi/update.ts holds the DEMI update type, the sort value and the Eagle id helpers.
  • recent-activity.ts gains list and getNative, plus toEagleUpdateBody for saves. A native row is sent with _id set to its Eagle id and project set to the parent's Eagle id.
  • Activity list and Updates tab call /updates?project=<Eagle id>. Only Date stays sortable.
  • The edit form loads comment periods from DEMI. When a project is not in the loaded list, the form reads it from GET /projects/<id>. An edit save leaves the C&E flag alone, because DEMI rows do not carry it.
  • The Activity list drops the date range and C&E filters, and its project filter takes one project. DEMI /updates filters only on project and type, and takes one project value.
  • Fixes an NG0950 console error in the table-rows spec.

eagle-api reads removed: projectService.getAll, getSearchResults for RecentActivity and Document, getItem RecentActivity, projectService.getById, getAllByProjectId and the eagle-api notification-project list in these screens.

Checks: yarn test-ci (696 passed), yarn lint, yarn build. Anonymous parity for recent activity on test: 4 match, 0 missing, 0 extra, 0 field differences. Staff parity and a signed-in browser check still need a staff login.

- Update lists, the project Updates tab and the edit form read
  /updates and /updates/:id. Project and type filters use DEMI
  names; only Date stays sortable.
- The date range and C&E filters are gone: DEMI cannot filter
  updates by either. The project filter takes one project.
- The edit form reads projects, project notifications, documents
  and comment periods from DEMI, by DEMI project id.
- Writes stay on eagle-api. A native row maps to its Eagle id and
  Eagle project id. Saving an edit leaves the C&E flag alone,
  since DEMI rows do not carry it.
DEMI update rows carry no C&E flag, so the edit form loaded it as off
and the save dropped it. Hide the toggle when editing; eagle-api keeps
the stored value.

Log and show a toast when the update list fails to load, before
going to search.
@danieltruong
danieltruong merged commit c01fbf6 into develop Oct 14, 2026
4 checks passed
@danieltruong
danieltruong deleted the feat-demi-notifications branch October 14, 2026 04:55
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