From 012b6bc1cd2afb4b873d8b2ff4ba49ca5d414530 Mon Sep 17 00:00:00 2001 From: Scrubs McBarkley Date: Tue, 24 Mar 2026 21:58:31 +0000 Subject: [PATCH] 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 --- apps/api/src/index.ts | 1 + apps/api/src/routes/portal.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 8de8e51..ccb1fc3 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -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); diff --git a/apps/api/src/routes/portal.ts b/apps/api/src/routes/portal.ts index 5c2b2f1..45f4d2f 100644 --- a/apps/api/src/routes/portal.ts +++ b/apps/api/src/routes/portal.ts @@ -64,7 +64,7 @@ portalRouter.patch( .where(eq(appointments.id, id)) .returning(); - if (!updated) { +if (!updated) { return c.json({ error: "Not found" }, 404); }