fix(enquiry-form): set name on createPatient

Patient records created from the enquiry form now get a platform title
from the typed name. Cosmetic fix — frontend was already showing the
fullName, only platform admin browsing showed "Untitled".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-15 09:32:33 +05:30
parent 180613a2f3
commit f4dcf6574f

View File

@@ -115,6 +115,7 @@ export const EnquiryForm = ({ isOpen, onOpenChange, callerPhone, leadName, leadI
try { try {
const phoneE164 = registeredPhone ? `+91${registeredPhone.replace(/^\+?91/, '').replace(/\D/g, '').slice(-10)}` : undefined; const phoneE164 = registeredPhone ? `+91${registeredPhone.replace(/^\+?91/, '').replace(/\D/g, '').slice(-10)}` : undefined;
const patientData: Record<string, any> = { const patientData: Record<string, any> = {
name: trimmedName,
fullName: nameParts, fullName: nameParts,
patientType: 'NEW', patientType: 'NEW',
}; };