Skip to content

feat(admin): build attach-to-entity picker UI on FormDetailPage #2016

@cdcore09

Description

@cdcore09

Summary

FormDetailPage currently displays the attached entity (event/announcement/group) and offers a Detach action, but there's no UI to attach a form to an entity if it's currently unattached. v1 ships with admins setting entityType/entityId via the API.

Requirements

  • Build a typeahead/picker that lets admin browse events, announcements, or groups and select one to attach
  • On selection, PATCH /admin/forms/:id with { entityType, entityId }
  • Respect the DB CHECK constraint (both fields must end up set or both null)
  • Validation: if form's scope is group, surface a warning when attaching to a non-group entity

Context

Plan 4 noted this as deferred. Now that forms ship, the API path works but admins need the UI to use it.

Files

  • apps/admin/src/pages/forms/FormDetailPage.tsx (Identity tab)
  • New helper: apps/admin/src/hooks/useArtifactPicker.ts (consumes /admin/events, /admin/announcements, /admin/groups for typeahead)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions