Skip to content

feat: read document pickers from DEMI - #968

Merged
danieltruong merged 6 commits into
developfrom
feat-demi-document-edit
Oct 14, 2026
Merged

danieltruong merged 6 commits into
developfrom
feat-demi-document-edit

Conversation

@danieltruong

Copy link
Copy Markdown
Collaborator

Document edit now works on DEMI rows, and the two document pickers read DEMI's native /documents.

Document edit:

  • DEMI rows are mapped before the form uses them. The Eagle id, the Eagle project id and the list ids go into the fields the form expects. Without this, a save would have written list labels into the type fields.
  • Update, publish and unpublish go to eagle-api with the Eagle document id.
  • If a selected row has no Eagle id, the Save buttons are hidden and a warning explains why.
  • Fixed along the way: togglePublish built its request inside the per-row loop.

Pickers:

  • The comment period picker sends the DEMI project id. If the stored project has no DEMI id, it looks it up first. The Type and Milestone columns no longer sort.
  • The notification picker sends the notification id as project. Status reads isPublished. The Author and Status columns no longer sort.
  • Both pickers leave out rows that exist only in DEMI, because they cannot be attached through eagle-api.

Known gap: the comment period picker used to send documentSource, which DEMI does not accept yet. A follow-up adds it once DEMI supports it.

Uploads are unchanged.

Tests: edit saves by Eagle id for both row shapes, hidden Save for rows with no Eagle id, the row mapper, and the query each picker sends.

- Document edit maps native rows to Eagle field names and writes by
  Eagle document and project id; a row with no Eagle record shows no
  save and says why.
- Comment period and notification document pickers read DEMI
  /documents by the DEMI project id or the notification id. Rows with
  no Eagle id are left out, since links and publish go to eagle-api.
- Columns DEMI cannot sort by are no longer sortable.
- Send documentSource (PROJECT, or PROJECT-NOTIFICATION) so comment
  attachments stay out of the comment period picker and the
  notification document list.
- Keep rows with no Eagle id on the page so paging and totals match
  DEMI; their checkbox is disabled and select-all skips them.
- Toast and log when the DEMI project lookup fails.
danieltruong added a commit that referenced this pull request Oct 14, 2026
The edit screen maps native rows with legacyDocumentRow (#968), so
detail must pass the row unchanged under the Eagle project id.
#968 must merge before this branch.
DEMI main answers 400 to a documentSource filter, so the pickers stop
sending it. Rows of another source, such as comment attachments, and
rows with no Eagle id stay on the page with their checkbox disabled,
and select-all skips them.
DEMI accepts the documentSource filter now, so pages and totals hold
only the screen's own source. The per-row source check stays as a
second guard.
@danieltruong
danieltruong merged commit d9a7fb2 into develop Oct 14, 2026
4 checks passed
@danieltruong
danieltruong deleted the feat-demi-document-edit branch October 14, 2026 04:16
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