- 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>
22 lines
512 B
TypeScript
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 },
|
|
});
|
|
},
|
|
};
|