improvement: treatment plan turned into a wizard. shift+click control added to FDI tooth chart for cunnected prosthesises.
This commit is contained in:
12
.cursor/rules/appointments.mdc
Normal file
12
.cursor/rules/appointments.mdc
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
description: Clinic appointments — delete/patient locks when treatment linked
|
||||
globs: frontend/src/components/ui/appointments/**,frontend/src/components/appointments/**,backend/src/modules/appointments/**
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Appointments
|
||||
|
||||
- List includes `hasTreatment` when a `Treatment` row is linked (`appointmentId`).
|
||||
- **Patient change** blocked while linked → `APPOINTMENT_PATIENT_LOCKED` (UI: `patientLockedHint`).
|
||||
- **Delete** blocked while linked → `APPOINTMENT_HAS_TREATMENT` (hide delete + `deleteBlockedHint`). Empty appointments (no treatment yet) remain deletable.
|
||||
- Prisma: `Treatment.appointmentId` is `onDelete: SetNull` — deleting an appointment does **not** cascade-delete treatments/cases/tasks; do not rely on cascade for cleanup.
|
||||
Reference in New Issue
Block a user