codeforboston / codeforboston/maple

Legislator Profile - Admin Notifications for Review

Abierto
#2,139 0 comentarios 0 reacciones 0 asignados Ver en GitHub
backend Ready for Development
Lenguaje dominante
TypeScript
Estrellas
56
Forks
175
Merge medio
2 d 5 h
PR fusionados (30 d)
13

Descripción

## 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)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con los V2 Firebase function entry points y la ruta de actualización del perfil que asigna el estado PENDING_LEGISLATOR. Revisa cómo la firestore-send-email extension consume la emails collection y cómo se configuran las variables de entorno. Se considera terminado cuando un nuevo registro que cumple los requisitos crea un correo electrónico de texto para la dirección de administrador configurada, con el valor predeterminado de producción y un comportamiento seguro de test/dev cubiertos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
firebase, typescript
Área
backend, cloud
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
68/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.