feat(repairs): automatic repair status emails
This commit is contained in:
parent
3ed6596bf0
commit
c58e212e3a
21 changed files with 525 additions and 36 deletions
|
|
@ -35,6 +35,13 @@ STORAGE_MAX_UPLOAD_MB=50
|
|||
STORAGE_HOST_PATH=./storage
|
||||
OLYMPUS_REPAIR_INTAKE_TOKEN=
|
||||
PUBLIC_REPAIR_STATUS_BASE_URL=
|
||||
SMTP_HOST=
|
||||
SMTP_PORT=587
|
||||
SMTP_USERNAME=
|
||||
SMTP_PASSWORD=
|
||||
SMTP_FROM_EMAIL=
|
||||
SMTP_FROM_NAME=Funktechnik Schubert
|
||||
SMTP_USE_TLS=true
|
||||
```
|
||||
|
||||
Wenn `SECRET_KEY` Sonderzeichen wie `$` enthaelt, den Wert in der Shell oder Compose-Umgebung korrekt quoten. Secrets gehoeren nicht ins Git.
|
||||
|
|
@ -149,6 +156,7 @@ Athena erreicht Reparaturen ausschliesslich ueber BFF-Routen:
|
|||
- `/api/repairs/[id]/history`
|
||||
- `/api/repairs/[id]/public-link`
|
||||
- `/api/repairs/[id]/notifications`
|
||||
- `/api/repairs/[id]/send-status-mail`
|
||||
|
||||
Hermes stellt zusaetzlich `POST /public/repair-intake` fuer die spaetere Website-Anbindung bereit. Der Endpunkt ist fuer Server-zu-Server-Kommunikation gedacht und erwartet `X-Olympus-Intake-Token`. Der Token wird ueber `OLYMPUS_REPAIR_INTAKE_TOKEN` gesetzt und darf nicht im Browser verwendet werden.
|
||||
|
||||
|
|
@ -167,8 +175,11 @@ Statuslink-Konzept:
|
|||
Benachrichtigungen:
|
||||
|
||||
- Vorlagen liegen in `backend/hermes/app/services/repair_notification_service.py`.
|
||||
- `repair_notification_events` bereitet spaeteren E-Mail-Versand nachvollziehbar vor.
|
||||
- Aktuell wird kein SMTP-Versand aus Olympus erzwungen.
|
||||
- `repair_notification_events` dokumentiert jeden Versandversuch.
|
||||
- Beim Statuswechsel wird automatisch eine Statusmail verarbeitet.
|
||||
- Ohne SMTP-Konfiguration bleibt der Statuswechsel erfolgreich; der Versandversuch wird als `skipped` dokumentiert.
|
||||
- SMTP wird ueber `SMTP_HOST`, `SMTP_PORT`, `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_FROM_EMAIL`, `SMTP_FROM_NAME` und `SMTP_USE_TLS` konfiguriert.
|
||||
- `SMTP_PASSWORD` gehoert ausschliesslich in die Umgebung und nie ins Git oder in Logs.
|
||||
|
||||
Vorbereitete Website-/Portal-Routen fuer spaeter:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue