Fix: Nombre del archivo PDF modelo en el fetch

This commit is contained in:
Santiago Lavaise
2026-04-13 20:29:39 -03:00
parent 069dbe2394
commit 73c9250257
+1 -1
View File
@@ -311,7 +311,7 @@ export function HistoriaClinica({
<Button variant="outline" className="bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100" onClick={async (e) => { <Button variant="outline" className="bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100" onClick={async (e) => {
e.stopPropagation(); e.stopPropagation();
try { try {
const existingPdfBytes = await fetch('/MODELO%20INGRESO.pdf').then(res => res.arrayBuffer()); const existingPdfBytes = await fetch('/MODELO_INGRESO.pdf').then(res => res.arrayBuffer());
const pdfDoc = await PDFDocument.load(existingPdfBytes); const pdfDoc = await PDFDocument.load(existingPdfBytes);
const form = pdfDoc.getForm(); const form = pdfDoc.getForm();
const edad = paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) : ''; const edad = paciente.fechaNacimiento ? calcularEdad(paciente.fechaNacimiento) : '';