codeforboston / codeforboston/maple
Legislator Profile - Admin Notifications for Review
- Lingua principale
- TypeScript
- Stelle
- 56
- Fork
- 175
- Merge medio
- 2g 5h
- PR unite (30g)
- 13
Descrizione
## 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)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dai V2 Firebase function entry points e dal percorso di aggiornamento del profilo che assegna lo stato PENDING_LEGISLATOR. Esamina come la firestore-send-email extension consuma la emails collection e come vengono configurate le variabili d’ambiente. Il lavoro è completato quando una nuova registrazione idonea crea un’email di testo per l’indirizzo dell’amministratore configurato, coprendo il valore predefinito di produzione e un comportamento sicuro in test/dev.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- firebase, typescript
- Ambito
- backend, cloud
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100