Accepting an invitation with a roomId previously only set User.roomId — no Contract row was created. Since every tenant-facing feature (Miet-Ampel, Vertragsdokumente, Kündigungsfristen, ...) is driven by Contract, not User.roomId, the tenant would silently show up nowhere despite "having" a room. Now the accept transaction also creates an active Contract (rent/deposit defaulted from the room's baseRent/ utilityPauschal, same defaults already used by the "Wieder aufnehmen" flow) and marks the room OCCUPIED, unless the room already has an active contract (guards against a stale/duplicate invite race). |
||
|---|---|---|
| .. | ||
| prisma | ||
| scripts | ||
| src | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||