Document Stundenplan + Schulkalender end-of-session state
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 50s
CI / test-go-edu-search (push) Successful in 45s
CI / test-python-klausur (push) Failing after 3m50s
CI / test-python-agent-core (push) Successful in 36s
CI / test-nodejs-website (push) Successful in 49s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 50s
CI / test-go-edu-search (push) Successful in 45s
CI / test-python-klausur (push) Failing after 3m50s
CI / test-python-agent-core (push) Successful in 36s
CI / test-nodejs-website (push) Successful in 49s
- CLAUDE.md gets a new section summarising the two feature strands, pitfalls (Timefold name, JSX quotes, LOC budget), the auth/messaging outsourcing, and pointers to the three memory files for next session. - docs-src/services/schulkalender/ — 5 MkDocs pages mirroring the stundenplan structure: index, architecture, holidays, parent-flow, notifications. Each with DB tables, endpoints, and the dispatch payload contract for the colleague's Matrix/Email services. - mkdocs.yml gains the Schulkalender nav entry under Services. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Eltern-Workflow
|
||||
|
||||
## Einladung (Lehrer)
|
||||
|
||||
1. Lehrer offnet `/schulkalender`, scrollt zu `ParentManager`.
|
||||
2. Klick "+ Eltern einladen" → Form mit Email, Vorname/Nachname Kind, Klasse, Sprache.
|
||||
3. `POST /api/v1/school/calendar/parents/invite` legt parent_account (upsert), parent_child + parent_magic_link an, gibt Klartext-Token + voll qualifizierten Link zurueck.
|
||||
4. Lehrer kopiert Link aus der UI und schickt ihn ueber Matrix oder Email (Versand-Automation kommt mit Phase 9d Notification-Pipeline).
|
||||
|
||||
## Login (Eltern)
|
||||
|
||||
1. Eltern klicken den Link `https://app/eltern/login?token=…`.
|
||||
2. Browser laedt die Login-Page, sendet `POST /api/v1/parent/auth/redeem {token}`.
|
||||
3. school-service validiert Token (Hash-Lookup + expires_at + used_at), markiert used_at, mintet Session-Token (32-Byte URL-safe Base64), setzt HttpOnly Cookie `bp_parent_session`.
|
||||
4. Redirect auf `/eltern`. Folgende API-Calls senden Cookie automatisch.
|
||||
|
||||
## Wochengrid
|
||||
|
||||
`/eltern` ruft:
|
||||
|
||||
- `GET /api/v1/parent/me` → Account + Kinder-Liste (Name, Klasse via JOIN tt_class)
|
||||
- `GET /api/v1/parent/me/timetable?class_id=…` → letzte completed tt_solution der Klasse
|
||||
|
||||
Filter laeuft strikt: ParentService prueft `ChildBelongsToParent(parent_id, class_id)` vor jeder Timetable-Query.
|
||||
|
||||
## Fach-Uebersetzung
|
||||
|
||||
`lib/calendar/subject-i18n.ts` hat 22 Standardfaecher in 8 Sprachen:
|
||||
|
||||
```typescript
|
||||
mathematik: { de: 'Mathematik', en: 'Mathematics', tr: 'Matematik',
|
||||
ar: 'الرياضيات', uk: 'Математика', ru: 'Математика',
|
||||
pl: 'Matematyka', fr: 'Mathématiques' }
|
||||
```
|
||||
|
||||
`translateSubject(germanName, lang)`:
|
||||
|
||||
1. Lowercase + trim → `key`
|
||||
2. `SUBJECTS[key]` lookup
|
||||
3. Wenn key nicht in Map: Original-Deutsch zurueck (z.B. "Imkern AG")
|
||||
4. Wenn lang nicht in Sprachen: `de`-Fallback
|
||||
|
||||
## Logout
|
||||
|
||||
`POST /api/v1/parent/auth/logout` setzt Cookie auf max-age=-1. Session-Row bleibt in DB (laeuft selber ab nach 30 Tagen) — vereinfacht Tracking.
|
||||
|
||||
## Was die Eltern NICHT sehen
|
||||
|
||||
- Andere Eltern oder Kinder
|
||||
- Stundenplan-Versionen die nicht "completed" sind
|
||||
- Schul-Events mit `visible_to_parents=false`
|
||||
- Lehrer-internes wie Stundentafel oder Lehrauftrag-Konfiguration
|
||||
|
||||
Privacy-Garantien sind auf SQL-Ebene durchgesetzt (JOIN-Pfade + WHERE-Klauseln), nicht nur im Application-Layer.
|
||||
Reference in New Issue
Block a user