feat: add customer-facing appointment notes (GRO-106)

- Migration 0014: add customer_notes column to appointments
- Schema update: add customerNotes field to appointments table
- Factory update: include customerNotes in buildAppointment
- Portal route: PATCH /api/portal/appointments/:id/notes
  - Ownership validation via impersonation session
  - Future-only validation (no edits after start)
  - 500 character limit
- Register portal router in index.ts

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Scrubs McBarkley
2026-03-24 21:58:31 +00:00
committed by Flea Flicker
parent d0b4baf5aa
commit 012b6bc1cd
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -111,6 +111,7 @@ api.route("/clients", clientsRouter);
api.route("/pets", petsRouter);
api.route("/services", servicesRouter);
api.route("/appointments", appointmentsRouter);
api.route("/portal", portalRouter);
api.route("/staff", staffRouter);
api.route("/invoices", invoicesRouter);
api.route("/reports", reportsRouter);
+1 -1
View File
@@ -64,7 +64,7 @@ portalRouter.patch(
.where(eq(appointments.id, id))
.returning();
if (!updated) {
if (!updated) {
return c.json({ error: "Not found" }, 404);
}