send_notifications Firebase Cloud Function.
Routes
| Route | Description |
|---|---|
/eventos-notificaciones?id={eventId} | List all notifications sent for an event |
/eventos-notificaciones-crear?id={eventId} | Compose and send a new notification |
Both routes require an
id query parameter identifying the event. Navigating without it results in an empty page.Viewing sent notifications
Go to/eventos-notificaciones?id={eventId} to see the notification history for an event. The page shows the event ProfileBanner followed by the NotificationsTableList, which lists each notification’s title, body, send date, and sender name.
Notifications are stored in the events/{eventId}/notifications Firestore subcollection.
Sending a notification
Open the notification form
From the notification list, click Nueva Notificación to navigate to
/eventos-notificaciones-crear?id={eventId}.The breadcrumb shows the event name as a link back to the event detail page, so you always have context about which event you are targeting.Attach an image (optional)
On the left side of the form, you can upload an image to accompany the notification.
- Accepted formats: JPG, PNG, and other common image types
- Maximum file size: 800 KB
events/{eventId}/notifications/{notificationId}/image.jpg and its URL is added to the notification record after saving.Click Reiniciar to remove the selected image.Write the notification content
On the right side of the form, fill in the Información a Desplegar section:
The notification is attributed automatically to the currently logged-in user. The sender’s UID and name are captured from Redux state and saved to the notification record.
| Field | Required | Description |
|---|---|---|
| Título | Yes | Short headline shown on the notification (e.g., “Recordatorio: el evento empieza en 1 hora”) |
| Cuerpo | Yes | Full message body displayed when the notification is tapped |
Send the notification
Click Guardar to send the notification. The platform:
- Creates a notification document in
events/{eventId}/notifications. - Uploads the image to Firebase Storage (if provided) and updates the document with its URL.
- Calls the
send_notificationsCloud Function with the title, body, event ID, and image URL.
Notification data structure
Each notification document inevents/{eventId}/notifications contains: