Files
DentalManagement09/apps/Backend/src/storage/office-contact-storage.ts
T
GiteadandClaude Sonnet 4.6 800008792a feat: add Office Contact settings page and reorder Advanced sidebar
- Add OfficeContact Prisma model with receptionist name, dentist name, phone, email, fax fields
- Create GET/PUT /api/office-contact backend route and storage
- Add OfficeContactCard frontend component under Settings > Advanced
- Reorder Advanced sidebar: Office Hours → Office Contact → Twilio Settings → Google AI Settings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 21:19:30 -04:00

22 lines
512 B
TypeScript

import { prisma as db } from "@repo/db/client";
export const officeContactStorage = {
async getOfficeContact(userId: number) {
return db.officeContact.findUnique({ where: { userId } });
},
async upsertOfficeContact(userId: number, data: {
receptionistName?: string;
dentistName?: string;
phoneNumber?: string;
email?: string;
fax?: string;
}) {
return db.officeContact.upsert({
where: { userId },
update: data,
create: { userId, ...data },
});
},
};