feat: add Procedure Duration/Time Slot settings and custom appointment type
- Add Settings > Advanced > Procedure Duration/Time Slot page with three sections: 1. Procedure Duration: CDT codes with durations (editable table, save per section) 2. Doctor Time Slot: drag-to-block visual grid (A/B/C columns, 8 AM–9 PM, edit/delete slots) 3. Hygienist Time Slot: procedure descriptions with durations - Backend: ProcedureTimeslot Prisma model, storage, and GET/PUT /api/procedure-timeslot route - DB migration: procedure_timeslot table - Appointment form: when type is "Other", show a free-text input for custom description; saved as other:<description> and decoded for display on the schedule card Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import { twilioStorage } from "./twilio-storage";
|
||||
import { aiSettingsStorage } from "./ai-settings-storage";
|
||||
import { officeHoursStorage } from "./office-hours-storage";
|
||||
import { officeContactStorage } from "./office-contact-storage";
|
||||
import { procedureTimeslotStorage } from "./procedure-timeslot-storage";
|
||||
|
||||
|
||||
export const storage = {
|
||||
@@ -45,6 +46,7 @@ export const storage = {
|
||||
...aiSettingsStorage,
|
||||
...officeHoursStorage,
|
||||
...officeContactStorage,
|
||||
...procedureTimeslotStorage,
|
||||
|
||||
};
|
||||
|
||||
|
||||
15
apps/Backend/src/storage/procedure-timeslot-storage.ts
Normal file
15
apps/Backend/src/storage/procedure-timeslot-storage.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { prisma as db } from "@repo/db/client";
|
||||
|
||||
export const procedureTimeslotStorage = {
|
||||
async getProcedureTimeslot(userId: number) {
|
||||
return db.procedureTimeslot.findUnique({ where: { userId } });
|
||||
},
|
||||
|
||||
async upsertProcedureTimeslot(userId: number, data: object) {
|
||||
return db.procedureTimeslot.upsert({
|
||||
where: { userId },
|
||||
update: { data },
|
||||
create: { userId, data },
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user