Skip to content

Align admin trial PDF action with shared PDF viewer #322

Description

@asku1990

Summary

Admin trial row PDF actions currently open the raw PDF bytes endpoint directly. Public trial views open the shared stacked PDF viewer page instead.

Cleanup

  • Change AdminTrialEntryActions to use getTrialPdfPageHref(trialEntryId) instead of getTrialPdfApiHref(trialEntryId).
  • Keep /api/trials/[trialEntryId]/pdf as the canonical PDF bytes endpoint.
  • Update admin-trial-entry-actions.test.tsx to expect /beagle/trials/pdf?trialEntryId=....
  • Update docs/features/admin-trial-management.md so it no longer says admin opens /api/trials/[trialId]/pdf directly.

Context

The public PDF page handles the viewer behavior and settings, including the shared page shell and stacked rendering behavior. Admin should use the same viewer unless direct raw PDF opening is intentionally required.

Acceptance criteria

  • Admin trial PDF action opens /beagle/trials/pdf?trialEntryId=<id> in a new tab.
  • PDF bytes are still fetched from /api/trials/[trialEntryId]/pdf by the viewer.
  • Tests and admin trial management docs match the new flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions