fix(build): resolve type errors blocking production build
- agenda-create-form: capture prefilled patient name in const so the async closure sees a narrowed string type - tsconfig: exclude tests/ from next build typecheck (Cypress/Playwright files have their own type context) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,8 @@ export function AgendaCreateForm({ prefillData, onClose }: AgendaCreateFormProps
|
|||||||
const prefilledPatient = prefillData?.patient;
|
const prefilledPatient = prefillData?.patient;
|
||||||
if (!prefilledPatient?.name || prefilledPatient.id || patientId) return;
|
if (!prefilledPatient?.name || prefilledPatient.id || patientId) return;
|
||||||
|
|
||||||
const normalizedPrefill = normalizePatientName(prefilledPatient.name);
|
const prefilledPatientName = prefilledPatient.name;
|
||||||
|
const normalizedPrefill = normalizePatientName(prefilledPatientName);
|
||||||
if (autoResolvedPatientRef.current === normalizedPrefill) return;
|
if (autoResolvedPatientRef.current === normalizedPrefill) return;
|
||||||
|
|
||||||
autoResolvedPatientRef.current = normalizedPrefill;
|
autoResolvedPatientRef.current = normalizedPrefill;
|
||||||
@@ -112,7 +113,7 @@ export function AgendaCreateForm({ prefillData, onClose }: AgendaCreateFormProps
|
|||||||
async function resolvePrefilledPatient() {
|
async function resolvePrefilledPatient() {
|
||||||
setIsSearching(true);
|
setIsSearching(true);
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`/api/cortex/patients/search?q=${encodeURIComponent(prefilledPatient.name)}`);
|
const res = await fetch(`/api/cortex/patients/search?q=${encodeURIComponent(prefilledPatientName)}`);
|
||||||
if (!res.ok || cancelled) return;
|
if (!res.ok || cancelled) return;
|
||||||
|
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"app/epd/_archive/**/*"
|
"app/epd/_archive/**/*",
|
||||||
|
"tests/**/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user