karbe/src/app/espace-ce
Ubuntu 3a557b6de5
All checks were successful
CI / test (pull_request) Successful in 2m39s
feat(ce): Sprint L — email auto invites + admin memberships UI
Email automatique pour les invites CE_MEMBER :
- sendCeInviteEmail(to, orgName, inviteUrl, inviterName?) : template
  best-effort (dry-run sans Resend), bouton CTA + lien direct en plain
  text. Mentionne TTL 14j + warning si pas le destinataire attendu.
- createInviteAction branche l'envoi automatique quand un email est
  renseigné dans le formulaire. Audit log gagne emailedAutomatically.
- InviteForm UI : affiche « lien généré · email envoyé » quand un
  email était fourni. Texte d'aide mis à jour.
- Sans email → comportement inchangé : lien à copier manuellement.

Admin /admin/carbets/[id] gagne section memberships :
- src/lib/admin/carbets.ts : getCarbetForEdit inclut organizations +
  listOrganizationsForLink helper (toutes orgs triées approved desc).
- 2 actions admin : linkCarbetToOrganizationAction (idempotent) +
  unlinkCarbetFromOrganizationAction. Audit scope=admin.carbets,
  events carbet.org.link / carbet.org.unlink.
- CarbetMemberships client component : liste les orgs liées (badge
  pending si org non approuvée) + select des orgs disponibles + boutons
  Lier/Délier. Désactive le select quand toutes les orgs sont déjà
  liées.

Le link admin permet de :
- Lier rétroactivement un carbet existant à un CE (cas où l'orga
  intègre un carbet d'un hôte individuel).
- Délier un carbet quand un CE part ou que le carbet repasse en
  gestion individuelle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-03 01:59:18 +00:00
..
carbets feat(ce): Sprint I — CRUD carbets côté CE 2026-06-02 23:34:17 +00:00
materiel feat(ce): Sprint J — matériel rental côté CE 2026-06-02 23:47:57 +00:00
membres feat(ce): Sprint L — email auto invites + admin memberships UI 2026-06-03 01:59:18 +00:00
layout.tsx feat(ce): Sprint H — signup CE public + /espace-ce shell 2026-06-02 23:12:46 +00:00
page.tsx feat(ce): Sprint K — public badge + invites CE_MEMBER + tests 2026-06-03 00:03:03 +00:00