Skip to content

feat: read project notifications from DEMI - #970

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

danieltruong merged 2 commits into
developfrom
feat-demi-project-notifications

Conversation

@danieltruong

Copy link
Copy Markdown
Collaborator

The project notification list, resolver and detail screens now read from DEMI's native /notifications routes instead of eagle-api.

  • A new DEMI notification model maps a native row to the shape the screens use. _id comes from the Eagle id. read comes from isPublished, because anonymous rows leave read out.
  • The mapper keeps pcp, isMet, metURL and the period dates, because the eagle-api PUT clears any of them it is not sent.
  • Saves still go to eagle-api. A new mapper, toEagleNotification, sits beside save and add and builds the eagle-api body with the Eagle ids.
  • Only Name and Received Date sort. Type, Sub Type, Region and Decision no longer sort.
  • The notification documents tab's fallback read of the notification uses DEMI.
  • Publish and unpublish on the detail page skip documents that exist only in DEMI.

eagle-api reads removed: the notification list and get, the notification search on the list screen, the document search on the detail screen, and the notification reads in the resolver and documents tab.

Tests: the model mapping and sort rule, the write mapper (PUT goes to the Eagle id with the Eagle project id), the list query, the resolver and the documents fallback.

- List, detail, resolver and documents fallback read /notifications
  and /notifications/:id; detail lists its documents from /documents.
- Writes stay on eagle-api; a native row is mapped to the Eagle body
  first. Notification ids are Eagle ids, and associatedProjectId is
  already an Eagle project id.
- Only Name can be sorted: DEMI sorts notifications by name and
  received date only.
save() and add() take only Eagle-shaped bodies. No caller passed a
native DEMI row, so the mapping branch was unused.

Add a spec for the notification detail screen: the DEMI document
read and the publish/unpublish skip of documents with no Eagle id.
@danieltruong
danieltruong merged commit f03c90f into develop Oct 14, 2026
4 checks passed
@danieltruong
danieltruong deleted the feat-demi-project-notifications branch October 14, 2026 04:47
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