codeforboston / codeforboston/maple

Legislator Profile - Admin Notifications for Review

Ouverte
#2,139 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
backend Ready for Development
Langage dominant
TypeScript
Étoiles
56
Forks
175
Merge moyen
2 j 5 h
PR mergées (30 j)
13

Description

## Summary

As we are introducing a new manual approval workflow in the Legislator Profile signup flow, we want to help our admin users know when there is a new account available for their review (to minimize the window where new legislators can't actually do anything, without requiring our admins to constantly check the admin pages).

To that end, we should just send a simple email notification to admins whenever a new account is created. The total volume of these should be fairly low (there are only so many legislators).

(We will likely eventually also use this for `ORG` upgrade requests when we re-enable that flow)

## Success Criteria
- [ ] Whenever a new `LEGISLATOR` account signs up for MAPLE (and is put in `PENDING_LEGISLATOR` status), send an email to the MAPLE admins (at `admin@mapletestimony.org`)
- This would be a good fit for a new V2 firebase function listening for profile updates - let's keep this out of the user-facing account creation flow
- We already use Sendgrid and have the `firestore-send-email` extension configured - you can send emails simply by adding a document to our `emails` firestore collection
- A simple text-based email is fine - only MAPLE admins will see this and all of the real action here will live in the Admin app
- The `to` address should be configurable via environment variable - defaulting to `admin@mapletestimony.org` only on PROD (ideally, we should not drown that address with test/dev environment emails to avoid fatigue)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par les V2 Firebase function entry points et le chemin de mise à jour du profil qui attribue le statut PENDING_LEGISLATOR. Examinez comment la firestore-send-email extension consomme la emails collection et comment les variables d’environnement sont configurées. Le travail est considéré comme terminé lorsqu’une nouvelle inscription éligible crée un e-mail texte pour l’adresse d’administrateur configurée, avec la valeur par défaut de production et un comportement sûr en test/dev couverts.

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

Évaluation

Stack technique
firebase, typescript
Domaine
backend, cloud
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
68/100

Recevez les nouvelles issues par e-mail

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