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

Ouverte
#2,016 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
68/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Calme
Stack technique
typescript
Domaine
frontend

Piste de recherche

Start in apps/admin/src/pages/forms/FormDetailPage.tsx, specifically the Identity tab, and review the new apps/admin/src/hooks/useArtifactPicker.ts helper. Trace the /admin/events, /admin/announcements, and /admin/groups endpoints, then implement selection and PATCH /admin/forms/:id with both entity fields. Done means admins can attach an entity, the database pairing constraint is respected, and group-scoped forms warn for non-group entities.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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)
Langage dominant
HTML
Étoiles
33
Forks
107
Merge moyen
14 h 6 min
PR mergées (30 j)
19

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de USRSE/usrse.github.io

Toutes les issues de USRSE/usrse.github.io

Issues similaires

Plus d'issues Web Dev

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.